|
| 1 | +# DeltaWire supervisory generation control |
| 2 | + |
| 3 | +## Boundary |
| 4 | + |
| 5 | +The agent-facing mechanism proposes a finite dataset specification. It never |
| 6 | +owns the final output path. `deltawire supervise` freezes the specification, |
| 7 | +compiles it to the unchanged `deltawire.plan.v1` IR, renders in a private |
| 8 | +staging repository, and compares that result byte-for-byte with a separately |
| 9 | +implemented reference evaluator. Only the synthesized supervisor can enable |
| 10 | +atomic promotion. |
| 11 | + |
| 12 | +The finite plant is modeled as a discrete-event system. Synthesis removes |
| 13 | +forbidden states, states with unsafe uncontrollable successors, and states that |
| 14 | +cannot reach a marked terminal. The resulting policy is maximally permissive |
| 15 | +within the declared model: a controllable event is disabled only when it leaves |
| 16 | +the safe, nonblocking region. |
| 17 | + |
| 18 | +This proves artifact-release safety relative to an approved specification. It |
| 19 | +cannot prove that an approved specification captures an unstated human intent. |
| 20 | +That residual risk requires external approval, examples, or a task oracle. |
| 21 | + |
| 22 | +## Modes and safe terminals |
| 23 | + |
| 24 | +- `direct_spec`: parse and normalize the strict YAML proposal. |
| 25 | +- `json_ir`: execute the compiled, stable plan-v1 representation. |
| 26 | +- `recovery`: retain evidence and expose only safe recovery actions. |
| 27 | +- `abstained`: preserve the previous output when no admissible path succeeds. |
| 28 | +- `failed_safe`: preserve the previous output after an authority/evidence fault. |
| 29 | + |
| 30 | +`released`, `abstained`, and `failed_safe` are marked terminal states. Unknown, |
| 31 | +missing, stale, replayed, or hash-inconsistent evidence can never enable |
| 32 | +publication. |
| 33 | + |
| 34 | +## Hazard/control record v1 |
| 35 | + |
| 36 | +| Hazard | Prevention | Monitor and isolation | Reconfiguration / safe state | Executable evidence | |
| 37 | +| --- | --- | --- | --- | --- | |
| 38 | +| Incorrect approved intent | Make invocation approve an exact canonical spec hash | Report the residual-risk boundary; task oracles remain independent | Require a corrected, newly hashed spec | framework corpus and task-family oracles | |
| 39 | +| Ambiguous specification | Strict typed YAML; finite domains; mutually exclusive and exhaustive rules | Parser/evaluator diagnostics | abstained | direct-spec rejection tests | |
| 40 | +| Contract/schema tampering | Freeze canonical spec and schema hashes before compilation | Recheck hashes in the receipt chain | failed-safe | transition-chain and staging tests | |
| 41 | +| Compiler defect | Reference evaluator does not import compiler or DeltaWire engine | Byte comparison plus task oracle | abstained | differential fixtures and mutation tests | |
| 42 | +| DeltaWire runtime defect | Keep plan-v1 lifecycle validation and limits | Regeneration/check hash and reference comparison | abstained | lifecycle integration tests | |
| 43 | +| Common-mode verifier defect | Separate plan execution, direct evaluator, and evaluation-family oracle | Disagreement is isolated as reference failure | abstained | canonical family corpus | |
| 44 | +| Path escape or symlink | Existing safe-path rules and private fixed supervision root | Path resolution and regular-directory checks | failed-safe | store/path tests and CLI integration | |
| 45 | +| TOCTOU / partial write | Stage privately; promote by same-filesystem atomic rename | Post-promotion hash | rollback or failed-safe | publication fault injection | |
| 46 | +| Stale evidence | Content-addressed run identity and hash-linked transitions | Sequence, prior hash, policy hash, and state replay | failed-safe | receipt replay tests | |
| 47 | +| Resource exhaustion | Existing plan/schema/record/output limits; finite ranges only | Preflight counts and byte limits | abstained | limit tests | |
| 48 | +| Policy drift | Deterministic synthesized-policy hash in every transition | Replay against the current model | failed-safe | policy determinism tests | |
| 49 | +| Missing observation | No event and no transition authority | Release remains disabled | recovery then abstained | exhaustive state/event tests | |
| 50 | +| Unauthorized publication | Final path is absent from candidate authority; early promotion enters a forbidden state | Synthesized event policy | deny and preserve output | maximal-permissiveness and early-promotion tests | |
| 51 | +| Infrastructure corruption | Boundary failures are distinct from candidate failures | `DW_SUPERVISION_FAULT` and retained receipt | failed-safe | malformed state/evidence tests | |
| 52 | + |
| 53 | +## Strict direct specification v1 |
| 54 | + |
| 55 | +The YAML surface supports exactly one primary construction: ordered Cartesian |
| 56 | +product, explicit rows, or base-plus-variants. Products may use finite ordered |
| 57 | +values or bounded integer ranges. Record templates preserve scalar types for an |
| 58 | +exact `${name}` placeholder. Structured rules use only `eq`, `ne`, `lt`, `lte`, |
| 59 | +`gt`, `gte`, `in`, `all`, `any`, or `otherwise`; there is no expression or code |
| 60 | +execution surface. Exceptions match finite domain or record fields and apply |
| 61 | +JSON-pointer `set`/`omit` operations. |
| 62 | + |
| 63 | +Aliases, anchors, custom tags, merge keys, duplicate keys, unknown fields, |
| 64 | +non-string mapping keys, multiple documents, excessive nesting, and oversized |
| 65 | +specifications are rejected. `applicability: should_abstain` deliberately |
| 66 | +selects the safe abstention path. |
| 67 | + |
| 68 | +## Deterministic admission |
| 69 | + |
| 70 | +`eval/supervision/evaluate_frameworks.py` compares strict YAML with a |
| 71 | +hand-authored JSON plan on the same semantic cases. It performs no model or |
| 72 | +provider call. A framework becomes an AI-evaluation candidate only when all |
| 73 | +applicable outputs are exact and deterministic, all supervisory tests pass, |
| 74 | +irregular work abstains, and YAML is smaller than JSON on the high-fit range |
| 75 | +and matrix cases. This is admission to a later experiment, not a token-savings |
| 76 | +claim. |
0 commit comments