Skip to content

Capability gate: retain scored results, enforce tool identity and directory-change forms (GPT-6 review repair); first host receipts with that review - #440

Merged
seathatflowsinourveins merged 6 commits into
mainfrom
claude/capability-gate-retain-identity-20260927
Sep 27, 2026
Merged

seathatflowsinourveins merged 6 commits into
mainfrom
claude/capability-gate-retain-identity-20260927

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes:
  • Base commit: 7fa3849c (Pre-push registry gate: run the three registry tests on every pushed commit #438), merged into the branch at e0e863ae; manifests/evidence.json re-registered per docs/lanes.md (the result equals git's automatic merge)
  • Lane: lane:foundation
  • Paths touched:
    • tools/capability-gate/: run_gate.py, assertions.js, m13_hooks.js, the jcodemunch and ai-memory configs, README.md;
    • tests/test_capability_gate.py;
    • docs/decisions/2026-09-27-capability-gate-harness.md (amendment);
    • the three first receipts under evidence/hosts/nativestack-5975wx-20260925/;
    • manifests/evidence.json (registration only) and the regenerated reports.

Why

The three receipts recorded at 55fc8d17 passed, but they claimed more than the harness verified. A read-only GPT-6 review (codex exec, gpt-6-astra at max) found this and appended its own verdict to each receipt, under its own identity, as codex_lane needs_changes.

# Finding Repair
P1 The scored promptfoo results were deleted after each run, so no verdict could be checked again against the returned results (docs/acceptance-evidence-policy.md, "Preserve the returned result"). run_gate.py keeps each run's results file in a private state directory at native-agent-stack/capability-gate/<gate>-<UTC>-<pid>/results.json. Directories are 0700 and the file 0600; it is never overwritten. The verdict line prints the file's sha256, and a run that cannot retain the file fails.
P2 The jcodemunch and ai-memory rows passed on any tool of the server, and jcodemunch needed only a signature fragment. completedResult counts only the tool the config names (order or memory_query), called with every argument field the row's call prescribes. The jcodemunch detail is now the symbol id (<file>::<name>#function) plus the full signature.
P2 M13 rejected cd but no other directory change, and the shell item has no working-directory field. DIRECTORY_CHANGE now rejects the directory-change forms each tool's --help gives on the workstation (GNU coreutils 9.4 env, GNU make 4.3, GNU tar 1.35, git 2.43.0, sudo 1.9.15p5, util-linux 2.39.3, systemd 255); the README lists them. The README states that the check is a list of syntactic forms, and that a working-directory argument to the shell tool itself is invisible to the scorer.
P3 The M13 receipt omitted the README's limitation that the shell class is not reconciled against Loki. The round-2 receipt states it.
Re-check An attached -C (env -C/dir) still passed the first repair. Fixed in 622d54d1: -C is now caught whether its directory is separate or attached, and when grouped with other short options. Regression cases cover the attached, grouped and argument-list forms.
Found in verification Re-scoring the retained smoke results with the final assertions showed that promptfoo 0.123.1's sanitizer (src/util/sanitizer.ts) had written vars.token as [REDACTED] in all 52 M13 rows. The retained file could therefore not re-derive the own-token verdicts, the property P1 claims. m13_hooks.js stores the token as vars.sentinel. An echo-provider eval confirmed that promptfoo keeps that name verbatim and redacts token. An M13 run whose results file lacks any row's sentinel now fails.

SOTA sources

  • promptfoo 0.123.1 (tag commit 34f74d34):
    • the openai:codex-sdk provider and its raw items (src/providers/openai/codex-sdk.ts:2430);
    • javascript assertions with assertion-level config;
    • the secret-field sanitizer (src/util/sanitizer.ts), read in the installed dist and confirmed by an eval.
  • @openai/codex-sdk 0.153.4 (bundled): dist/index.d.ts defines CommandExecutionItem (command, aggregated_output, exit_code, status; no working directory) and McpToolCallItem (server, tool, arguments, result).
  • jcodemunch-mcp 1.108.319: search_symbols returns id, file, line and signature per symbol, as observed through the MCP server on 2026-09-27.
  • Each directory-changing tool's --help on the workstation, as listed in the P2 row above.
  • docs/acceptance-evidence-policy.md: "Preserve the returned result" and "Confirm consequential claims through independent observations".

Evidence-class table

Claim Evidence class Command / receipt
The three first receipts pass at 55fc8d17. Each carries the GPT-6 reviewer's codex_lane needs_changes, recorded under an identity other than the recorder's. native_proven (the receipts) and independent review evidence/hosts/nativestack-5975wx-20260925/…--{jcodemunch-mcp,ai-memory,context-mode}--use--20260927.json
The repaired gates pass live, and their retained results give the same verdicts when re-scored with the final assertions. native_proven (smokes; not receipts) the smoke lines and re-scores under Local commands run
promptfoo 0.123.1 writes a var named token as [REDACTED] in the results file and keeps sentinel verbatim. native_proven (upstream eval, echo provider) promptfoo eval -o results.json with both vars
Retention; tool identity; the argument subset; the directory-change forms; the jcodemunch id and signature patterns; the sentinel check; the summary's hash requirement; the configs' prescribed calls. synthetic python3 -m unittest tests.test_capability_gate (27 tests)

Local commands run

$ python3 -m unittest tests.test_capability_gate
Ran 27 tests ... OK
$ python3 scripts/component_matrix.py --write
{"flip_rule_violations": 0, "rows": 32, "status": "written"}
$ python3 scripts/new_host_grand_list.py --write
{"status": "written", "layers": 32, "winners": 66}
$ python3 scripts/validate.py
{"components": 69, "hashed_files": 7370, "profiles": 4, "receipts": 159, "status": "passed"}
$ GIT_NO_LAZY_FETCH=1 python3 scripts/host_receipts.py validate
{"receipts": 179, "status": "passed"}
$ git diff --check origin/main...HEAD   # clean

# smokes (host-private retained results; their sha256 is the 'results' field)
# at a0cbcb07 (first repair):
capability-gate ai-memory: PASS | gate 6/6 pass; ctrl-disabled 2/2 fail as predicted; ctrl-prompt 2/2 fail as predicted | 10 rows as expected, 10 distinct sessions | loki 10/10 rows match (8 MCP tool results) | results 07693e87eb3ea615de2c506b9a8501541df84290c078466b9ea5af5d2178fcfd | promptfoo 0.123.1, codex-cli 0.157.1, run 2026-09-27T22:15:54Z
capability-gate jcodemunch: PASS | gate 6/6 pass; ctrl-disabled 2/2 fail as predicted; ctrl-prompt 2/2 fail as predicted | 10 rows as expected, 10 distinct sessions | loki 10/10 rows match (8 MCP tool results) | results bcf89d5c0f918d475ace8f8530db9088b7b5aee536b490cb88beb59fb4ab1bb7 | promptfoo 0.123.1, codex-cli 0.157.1, run 2026-09-27T22:21:30Z
# at 622d54d1 (final harness):
capability-gate m13: PASS | gate 40/40 pass; ctrl-disabled 6/6 fail as predicted; ctrl-wrongroot 6/6 fail as predicted | 52 rows as expected, 52 distinct sessions | loki 52/52 rows match (236 MCP tool results) | results 89fed46b244d07bdb5ed731a838fc9201765645f6626f0d9afaaaebcf910a5a8 | promptfoo 0.123.1, codex-cli 0.157.1, run 2026-09-27T22:37:41Z
# final assertions.js re-applied to each retained results file, compared with the recorded component verdicts:
#   ai-memory 10 of 10 identical; jcodemunch 10 of 10 identical; m13 260 of 260 identical
#   (the earlier m13 smoke file, whose vars.token was [REDACTED], reproduced only 36 of 260: every own-token verdict failed)

Independent review

  • The re-check. The GPT-6 reviewer resumed its own read-only thread to re-check the first repair at dc05ec64.
    • Resolved: P1, the P2 tool-identity finding and P3.
    • Partly resolved: the P2 directory-change finding. An attached -C still passed, so the verdict was RECHECK: not resolved.
    • It ran the 26 tests and the three config validations, and reported no other P0–P3 defect.
  • After the re-check. 622d54d1 fixes that gap and the sentinel redaction found in verification.
  • PR-head review. The same reviewer resumed its read-only thread on f025fb1e to review 622d54d1, and returned PRHEAD: ready.
    • The attached -C gap is closed: 24 direct checks rejected every form, and relative reads still pass.
    • The sentinel repair is sound: no vars.token reader remains, and the installed sanitizer redacts none of the harness's vars.
    • It found no new P0–P3 defect. It ran the 27 tests and the three config validations.
    • e0e863ae only merges Pre-push registry gate: run the three registry tests on every pushed commit #438 and re-registers the manifest.
  • The review loop stays bounded. There was one review and one repair round. The PR-head review is the standing pre-merge cross-family check, not another repair round, and it found nothing to repair.
  • The round-2 receipts will get fresh independent reviews covering the harness at the commit they record.

Host evidence

  • The first receipts are host executions on nativestack-5975wx-20260925 (linux-wsl2-x86_64) at 55fc8d17.
  • The smokes are not receipts:
    • ai-memory and jcodemunch ran at the first repair;
    • M13 ran at 622d54d1.

🤖 Generated with Claude Code

Scout and others added 5 commits September 27, 2026 18:15
… directory changes

A GPT-6 cross-family review of the first capability-gate host receipts (recorded at 55fc8d1) returned
needs_changes. This repairs the harness so re-recorded receipts can claim what the checks verify:
- run_gate.py retains each run's promptfoo results file (the Codex items every verdict is scored from) under a
  private state directory (0700/0600, never overwritten) and prints its sha256 in the verdict line; a run whose
  results cannot be retained fails.
- assertions.js completedResult counts only the prescribed tool (config.tool) with every argument in the row's
  `call`; the jcodemunch detail is the symbol id plus the full signature.
- M13 rejects pushd, popd, chdir, Set-Location and -C/--chdir/--directory besides cd, including in the
  ctx_execute_file snippet; the README states that the shell item carries no working directory.
- Tests: 26 (was 22); decision record amended.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…PT-6 review's needs_changes

The three receipts recorded at main 55fc8d1 (jcodemunch-mcp 1.108.319, ai-memory 2.4.1, context-mode 1.0.169 for
M13), each passing, with the codex_lane review a GPT-6 cross-family reviewer appended under its own identity:
needs_changes (results not retained; tool identity and M13 directory checks weaker than the limitations state; the
M13 receipt omits the shell reconciliation limitation). Kept as recorded; the repaired harness in this branch
re-records receipts that supersede them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…he M13 sentinel in retained results

The GPT-6 re-check of the repair found that an attached -C (env -C/dir) still passed the
directory-change check. The check now covers a short-option group containing C with its
directory separate or attached, --work-tree, --git-dir, --wd, --working-directory,
Push-/Pop-Location, and chroot, nsenter, unshare, systemd-run and sudo, in the forms each
tool's --help gives on the workstation. The README now claims only these syntactic forms.

Re-scoring the retained smoke results with the final assertions showed that promptfoo
0.123.1's sanitizer (src/util/sanitizer.ts) wrote vars.token as [REDACTED] in all 52 M13
rows, so the retained file could not re-derive the own-token verdicts. The hook now stores
the token as vars.sentinel (kept verbatim, confirmed with an echo-provider eval), and an M13
run whose results file lacks any row's sentinel fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
docs/lanes.md hot-file protocol: main's manifests/evidence.json with the branch's eleven
files re-registered (the three first receipts newly), and the component evidence matrix
regenerated. The first ai-memory receipt counts as dissented under its standing
needs_changes review; no status changes (flip-rule violations 0).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Sep 27, 2026
@seathatflowsinourveins
seathatflowsinourveins merged commit eb5ca78 into main Sep 27, 2026
24 of 28 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/capability-gate-retain-identity-20260927 branch September 27, 2026 23:28
seathatflowsinourveins added a commit that referenced this pull request Sep 28, 2026
…first recording; GPT-6 review agree) + dashboard gate row (#442)

* Capability-gate host receipts round 2 (at main eb5ca78), superseding the first recording, with GPT-6 review agree

The three gates re-ran live through host_receipts.py record --supersedes at the published
repair (#440). Each receipt quotes only its own verdict line, which carries the retained
results' sha256. The GPT-6 cross-family reviewer independently re-applied assertions.js to
the retained results (260/260, 10/10, 10/10 component verdicts; hashes 3/3; M13 sentinels
52/52) and recorded codex_lane agree on each receipt itself. The grand-dashboard gets the
codex-capability-gate row.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

* Register the round-2 capability-gate receipts and dashboard row (hot files)

docs/lanes.md hot-file protocol after merging origin/main at b26add9 (#439): main's
manifests/evidence.json with the three -2 receipts and observability/grand-dashboard/state.json
registered, and the component evidence matrix regenerated (flip-rule violations 0).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

---------

Co-authored-by: Scout <scout@local>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant