Skip to content

Make verdict-review-gate apply the landscape validator's withheld-key policy - #144

Merged
seathatflowsinourveins merged 2 commits into
mainfrom
claude/gate-shared-withheld-policy
Sep 23, 2026
Merged

seathatflowsinourveins merged 2 commits into
mainfrom
claude/gate-shared-withheld-policy

Conversation

@seathatflowsinourveins

Copy link
Copy Markdown
Owner

The gate kept its own copy of withheld_packet_keys, written before #124 merged, and that copy had drifted from scripts/landscape.py. It lacked:

  • the top-level current_choice, decision and rationale keys;
  • copy dispositions and a non-null review_status;
  • the requirement-gated archived/license keys;
  • the withheld[] policy-label check.

This was not a bypass in CI, because every verdict-changing PR also runs landscape.py as a validator at the base's copy. But the gate's own message under-reported. It also would not have picked up blind-lanes round 2's new gap_receipts/gap_receipts_note keys without a second edit. That gap was raised by agent-lab-17.

Change

  • The gate imports the base's scripts/landscape.withheld_packet_keys, so there is one policy.
  • The fixture packet now lists the policy labels, as a --withhold-labels packet does.
  • A new test asserts the import identity and 6 failure cases. All 6 fail against the old copy (mutation-checked).
  • There is a dated decision-record entry with alternatives and the overturn comparison.

Acceptance (local, raw)

  • 218 tests: gate, hardening and docs-consistency.
  • validate.py, evidence_manifest --check, landscape.py and build_verdicts --check.
  • The gate against origin/main: passed, with trust path scripts/verdict_review_gate.py only and no verdict data.
  • Guarded gitleaks: no leaks.

An independent review is running; auto-merge will be enabled after it.

🤖 Generated with Claude Code

…tead of a drifted copy

The gate's own withheld_packet_keys predated #124 and lacked the top-level, copy-disposition and
withheld[] label checks; importing scripts/landscape.withheld_packet_keys from the base makes a key
the tooling owner adds (gap_receipts, blind-lanes round 2) apply here with no gate change.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T19:49:52.169253Z c6539c5 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…ct the record's wording

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seathatflowsinourveins
seathatflowsinourveins enabled auto-merge (squash) September 23, 2026 19:47
@seathatflowsinourveins
seathatflowsinourveins merged commit 64863f4 into main Sep 23, 2026
22 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/gate-shared-withheld-policy branch September 23, 2026 19:52
seathatflowsinourveins added a commit that referenced this pull request Oct 11, 2026
…s host (correction #144)

On the current host (ai-memory 2.6.0) the capture-mode file the installer writes under --apply
was absent, so lifecycle capture ran in the default denylist mode and captured every directory,
including scratch and test worktrees and GPT read snapshots. The maintenance doc said the
allowlist installers had been applied. It now records the measurement, the vendor source lines,
and the repair under this stack's untracked per-checkout marker convention (.gitignore:73): the
main checkout carries the marker, the trading repository carries none, read snapshots strip
copied markers, and install-hooks re-applies allowlist mode; plus how to verify it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seathatflowsinourveins added a commit that referenced this pull request Oct 11, 2026
…ection #144) (#988)

* docs: record that ai-memory allowlist capture was not in force on this host (correction #144)

On the current host (ai-memory 2.6.0) the capture-mode file the installer writes under --apply
was absent, so lifecycle capture ran in the default denylist mode and captured every directory,
including scratch and test worktrees and GPT read snapshots. The maintenance doc said the
allowlist installers had been applied. It now records the measurement, the vendor source lines,
and the repair under this stack's untracked per-checkout marker convention (.gitignore:73): the
main checkout carries the marker, the trading repository carries none, read snapshots strip
copied markers, and install-hooks re-applies allowlist mode; plus how to verify it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: state ai-memory enrollment by the documented design and give the working check

The GPT read of #988 found two P2s. The prescribed `ai-memory hook --check-capture` cannot run
without --event, --agent and --server-url; the doc now gives the documented form
(recipes/README.md:418) and what to expect for enrolled and excluded directories, plus the
inverse. And "lane worktrees carry none and are not captured" was not exact: a worktree below
the enrolled checkout, or one that receives the marker through .worktreeinclude, is enrolled by
design (recipes/README.md, "Worktrees and the capture marker"). The paragraph now states that
design, that read snapshots and blind lanes must never carry or inherit the marker (the read kit
aborts on any ancestor marker), and the measured state: 2 of 404 worktrees carry a marker, none
nested under the main checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test: pin the ai-memory capture correction's two statements; fix the read's P3 citations

The GPT micro of 77e95b7 (P2) found no regression for the two corrected statements, so the
correction rule (AGENTS.md, Corrections) was not met. Two doc-contract tests fail on the
first version's text (8690d10: 2 failures) and pass at this head:
- the documented check carries hook --event --agent --server-url --check-capture --data-dir
  (HookArgs, ai-memory v2.6.0 cli.rs:2957-2966; the bare form exits 2);
- enrollment follows recipes/README.md "Worktrees and the capture marker" (marker walk to
  $HOME, marker.rs:938-1025; .worktreeinclude), without the false "lane worktrees carry none".
The independent Claude read's P3s: the per-event read is hook.rs:720-726 and the v2.6.3
reader sits unchanged at :1383-1399; the read kit strips markers, then aborts on a remaining
or ancestor marker; the trading-research bank is cited (foundation-finalization :70,157)
instead of the unsourced "exposure tags"; the check lines are recipes/README.md:419-421.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
seathatflowsinourveins added a commit that referenced this pull request Oct 12, 2026
… to the native profile

Fixes the two upheld Codex threads on #997 at 03fc660 (4245318057, 4245318059). The third,
4245318064 (P1, layer-resolution record), is not accepted: the layer-resolution protocol (#1008)
governs layer adoption and verdict decisions, and this change adds no layer verdict. It corrects a
host-state claim under AGENTS.md "Corrections", which the pinned sources already cited (ai-memory
v2.6.3 = 385b81ea, Codex rust-v0.162.1 = 092d3acd) and the fail-before tests below satisfy.

1. The installer lead (4245318057). The retained 2026-09-21 record,
   evidence/artifacts/memory-landscape-20260921/native-commands.json:295-393 at 03fc660, shows the
   three installers run with --capture-assistant, exit 0 each, so the lead was true but undated; what
   it contradicted was correction #149's undated "The earlier hook applications ran without the
   flag". The lead now opens "At the 2026-09-21 qualification", cites that record and says it is not
   the hook state now. Correction #149 says the qualification's installers carried the flag, so the
   flag was lost before the 2026-10-11 measurement (the loss path is host history not reconstructed
   here), and names the two later flagless applications, the #144 repair and the 2.6.3 re-stage of
   2026-10-10. "Not in force" is dated 2026-10-11.
2. The second Codex profile (4245318059). hook-trust.json at 03fc660 lists seven hook commands for
   the native profile (:35-77) and seven for the Desktop profile (:279-321), 14 in all, so the CC's
   0 of 7 is one profile's. Correction #149 and the qualification prose after it now bound the count
   and the Codex conclusions (trust pending, capture off) to the native profile and say the Desktop
   profile was not measured.

tests/test_memory_landscape_capture_doc.py has 16 tests (10 kept, 6 new). On the 03fc660 doc text
the module gives 11 OK and 5 failures, 0 errors; on this text 16 OK. The new tests read the
artifacts: the line ranges the doc cites, the flag and exit code of the three installer records, and
seven commands per profile. manifests/evidence.json: hashes of the doc and the test re-registered
only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
seathatflowsinourveins added a commit that referenced this pull request Oct 12, 2026
…rrection #149) (#997)

docs: ai-memory --capture-assistant was not in force on this host (correction #149)

* docs: ai-memory --capture-assistant was not in force on this host (correction #149)

The maintenance doc said the allowlist installers carried --capture-assistant. 0 of 9 Claude and
0 of 7 Codex hook commands did: ai-memory bakes the flag only into the Stop command and only
preserves an opt-in already present (install_hooks.rs:689-701, 1104-1109 @ 89bd8ded;
render_shared.rs:1425-1427), so applications without the flag never added it. Claude was
re-staged with it on 2026-10-11; Codex waits for a trust refresh (trusted_hash changes).

Also: the HookArgs v2.6.3 range in the doc-contract test becomes :2961-2970, test 1 checks every
--check-capture block, a new test fails on the previous text, and the read kit's "repositories
commit the marker" comment is listed as a host note against .gitignore:73.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* test: name the missing correction heading instead of raising ValueError

section_from() used str.index, so a document lacking the #149 heading (the 16f0a1f text) gave
3 test errors instead of contract failures. It now raises AssertionError naming the heading, and the
first #149 test no longer asserts on the whole document before extracting the section: the module
gives 6 OK on the head text and 4 assertion failures, 0 errors, on the 16f0a1f text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: reconcile correction #149 with the dated qualification prose and pin it to the installed releases

Fixes the four Codex review threads on #997 (each verified valid at 805aca0):

1. Contradiction. The two paragraphs after the correction said, in the present tense, that both
   clients' assistant Stop excerpts are opted in and that Codex trust ended in a captured outcome.
   They now open "At the 2026-09-21 qualification" (git blame 54896e7 and every artifact under
   evidence/artifacts/memory-landscape-20260921 carry that date) and point at correction #149. A
   new test reads that prose, which correction_149_section stops before.
2. Unverified host state. The 0 of 9 and 0 of 7 counts, the earlier hook applications, the Claude
   re-stage and the pending Codex trust are labelled CC host measurements, cited to correction #149
   in command-center/lessons-20261005/cc-corrections-20261005.md and "not re-read by this change".
3. Pin. The host runs ai-memory 2.6.3 (385b81ea). install_hooks.rs:689-701, :1104-1109 and :1142
   and render_shared.rs:1425-1427 are byte-identical at the same lines in v2.6.3 and v2.6.0
   (89bd8ded), so both pins are cited and the test requires the v2.6.3 pin beside each cite.
4. Trust hash. Re-rendering changes the computed current hash; the stored trusted_hash is
   unchanged, the mismatch marks the hook modified, and the /hooks review writes the reviewed hash
   into trusted_hash (docs/decisions/2026-10-04-codex-rtk-hook-qualified.md Decision 1 at
   rust-v0.159.3; re-read at rust-v0.162.1 = 092d3acd, the installed codex-cli: discovery.rs:796-813
   and :715-721, hooks_rpc.rs:58-92). The test rejects "re-rendering changes ... trusted_hash".

tests/test_memory_landscape_capture_doc.py now has 10 tests: on the 805aca0 doc text the module
gives 6 OK and 4 assertion failures, 0 errors (one per thread); on this text 10 OK.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: cite correction #149's ledger by its true locator, coordination/lessons-20261005/...

The #149 correction named the CC's ledger as command-center/lessons-20261005/cc-corrections-20261005.md, the
form the brief prescribed. The CC recorded that as its correction #180: the ledger sits at
coordination/lessons-20261005/cc-corrections-20261005.md (state-root relative), a sibling of command-center/,
not under it. The doc keeps "(host state, not in this repository)"; the test now pins the true locator and
rejects the old form. Found by looking up the file name under the host state root; the CC confirmed it in #180.

Fail-before: with the new pin the module gives 9 OK and 1 assertion failure, 0 errors, on the 8b8c8f5 doc
text; 10 OK after. validate.py and evidence_manifest.py --check pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* docs: date the installer lead and bound correction #149's Codex count to the native profile

Fixes the two upheld Codex threads on #997 at 03fc660 (4245318057, 4245318059). The third,
4245318064 (P1, layer-resolution record), is not accepted: the layer-resolution protocol (#1008)
governs layer adoption and verdict decisions, and this change adds no layer verdict. It corrects a
host-state claim under AGENTS.md "Corrections", which the pinned sources already cited (ai-memory
v2.6.3 = 385b81ea, Codex rust-v0.162.1 = 092d3acd) and the fail-before tests below satisfy.

1. The installer lead (4245318057). The retained 2026-09-21 record,
   evidence/artifacts/memory-landscape-20260921/native-commands.json:295-393 at 03fc660, shows the
   three installers run with --capture-assistant, exit 0 each, so the lead was true but undated; what
   it contradicted was correction #149's undated "The earlier hook applications ran without the
   flag". The lead now opens "At the 2026-09-21 qualification", cites that record and says it is not
   the hook state now. Correction #149 says the qualification's installers carried the flag, so the
   flag was lost before the 2026-10-11 measurement (the loss path is host history not reconstructed
   here), and names the two later flagless applications, the #144 repair and the 2.6.3 re-stage of
   2026-10-10. "Not in force" is dated 2026-10-11.
2. The second Codex profile (4245318059). hook-trust.json at 03fc660 lists seven hook commands for
   the native profile (:35-77) and seven for the Desktop profile (:279-321), 14 in all, so the CC's
   0 of 7 is one profile's. Correction #149 and the qualification prose after it now bound the count
   and the Codex conclusions (trust pending, capture off) to the native profile and say the Desktop
   profile was not measured.

tests/test_memory_landscape_capture_doc.py has 16 tests (10 kept, 6 new). On the 03fc660 doc text
the module gives 11 OK and 5 failures, 0 errors; on this text 16 OK. The new tests read the
artifacts: the line ranges the doc cites, the flag and exit code of the three installer records, and
seven commands per profile. manifests/evidence.json: hashes of the doc and the test re-registered
only.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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