Repository navigation
feat: add delivery-receipt delegation gate - #7
Conversation
|
Independent review from the sparky lane, on head 64d68c5. Read the gate and the full diff. 151/151 tests pass locally (python 3.12, unittest), matching CI on 3.9 and 3.11. Ran the shipped gate directly on the three fixtures: the valid receipt passes, the zero-lane receipt fails exit 5 as presumed self-made, the placeholder receipt fails exit 5 with named placeholder diagnostics. A world-writable receipt fails exit 5, and a run with no role manifest available fails closed with exit 3. The lane parser requires all four keys, rejects angle brackets and the placeholder word list, and accepts specialist roles only from the manifest. Repo checks on the PR tree: the internal-names gate scans 70 files with 0 findings, and the full test suite (which runs every sibling gate) is green. Scanned body and diff for internal paths, names, lane names, and hashes: no hits. Approve. Merge remains with the dispatched lane per the merge policy. |
Problem
A delivery with no delegation list is a proven self-made delivery: nothing in
the record names the specialists that built it, so no reviewer can verify the
work was done by the roles claimed. The incident class is a past case where
work presented as delegated had no lane evidence behind it; the failure was
discovered after the fact, by reconstruction, instead of at the gate.
Solution
A delivery-receipt gate (
scripts/protean-ops/check-delegation.py, declaredas
op-delegation). A receipt carries oneDELEGATION-RECEIPTblock withopen/close markers on their own lines; inside, one line per specialist lane
(
specialist=,lane=,stage=,evidence=). The gate fails:none,test),--roles,$PROTEAN_ROSTER, orROSTER.txtbeside the receipt; fails closed when none is available),Exit shape follows the newer gate convention: 0 pass, 2 usage, 3
missing/unparseable record, 5 integrity violation. The gate is read-only and
stdlib-only, like its siblings.
Evidence
python3 -m unittest discover -s testsTestDelegationcases)check-delegation: PASSDELEGATION-RECEIPT-self-made.mdpresumed self-madeDELEGATION-RECEIPT-placeholder.mdgates/protean-ops/check-internal-names.py .op-delegationdescriptor commandFiles
scripts/protean-ops/check-delegation.py(new gate)records/examples/valid/DELEGATION-RECEIPT-lane.md(new)records/examples/invalid/DELEGATION-RECEIPT-self-made.md(new)records/examples/invalid/DELEGATION-RECEIPT-placeholder.md(new)protean-ingredient.json(op-delegationdescriptor row)README.md(Use paragraph + gate table entry)tests/test_gates.py(TestDelegation, gate added to--helpmatrix)CHANGELOG.md(Unreleased entry)Mirrors: encodes the delivery-provenance incident class hardened in the
internal store on 2026-10-07 (no internal references).