Skip to content

feat: add delivery-receipt delegation gate - #7

Merged
ahrazzle merged 3 commits into
mainfrom
feat/delegation-receipt-gate
Oct 7, 2026
Merged

ahrazzle merged 3 commits into
mainfrom
feat/delegation-receipt-gate

Conversation

@ahrazzle

@ahrazzle ahrazzle commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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, declared
as op-delegation). A receipt carries one DELEGATION-RECEIPT block with
open/close markers on their own lines; inside, one line per specialist lane
(specialist=, lane=, stage=, evidence=). The gate fails:

  • a block with zero specialist lanes (presumed self-made),
  • placeholder lane values (angle brackets, none, test),
  • roles outside the declared role manifest (--roles, $PROTEAN_ROSTER, or
    ROSTER.txt beside the receipt; fails closed when none is available),
  • world-writable receipt files.

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

Check Result
python3 -m unittest discover -s tests 151 pass (144 pre-existing + 7 new TestDelegation cases)
Shipped valid fixture passes, check-delegation: PASS
Shipped DELEGATION-RECEIPT-self-made.md fails 5, presumed self-made
Shipped DELEGATION-RECEIPT-placeholder.md fails 5, named placeholder diagnostics
gates/protean-ops/check-internal-names.py . clean, 0 findings
Declared op-delegation descriptor command exit 0 from a fresh clone

Files

  • 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-delegation descriptor row)
  • README.md (Use paragraph + gate table entry)
  • tests/test_gates.py (TestDelegation, gate added to --help matrix)
  • CHANGELOG.md (Unreleased entry)

Mirrors: encodes the delivery-provenance incident class hardened in the
internal store on 2026-10-07 (no internal references).

Automated posting by agentic team with human oversight.

@ahrazzle

ahrazzle commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

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.

@ahrazzle
ahrazzle merged commit ab48260 into main Oct 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant