test(bench): trial harness -- pinned container, run-trial.sh, parse-rollout.py - #389
Merged
Conversation
…ollout.py Adds the Tier-1 harness that actually runs a trial: a pinned debian:13 container image (digest + per-package version pins), bench/run-trial.sh (concurrency-cap gate, GraphQL rate-limit pause, baked-empty home, container lifecycle with destruction proof, repo reset, oracle scoring, ledger append), and bench/parse-rollout.py (turns Codex session logs into one schema-valid Tier-1 ledger record: token classes per actor, reference hit counts, blended USD, and the void-trial rule from PREREGISTRATION.md). Everything runs in a dry-run/stub mode with a synthetic session fixture -- no docker build, no real Codex spend -- which is the path tests/test-bench-harness.sh and tests/test-bench-parse-rollout.sh exercise end to end. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…ard gaps in the trial harness PR #389 adversarial review confirmed four findings against the Tier-1 harness (commit 0aaa0f4): (F1, P1) a fully-configured --live run built and started a real, credential-bearing container before dying "not implemented" at the invocation step, leaving it running -- --live is now rejected during argument validation, before any container/home/ledger allocation, with an EXIT trap as defense-in-depth for whenever a live container does start; (F2, P2) container-lifecycle functions only honored the --dry-run flag even though their own header documented BENCH_CONTAINER_DRY_RUN=1 as equivalent -- now both spellings route through one helper; (F3, P2) container_destroy/container_is_destroyed discarded docker rm -f/docker ps exit status, so a failed query could read as "destroyed" -- both now fail loudly and keep the running-marker on a genuine docker failure; (F4, P2) the ledger symlink guard used -e && -L, which a dangling symlink defeats (-e is false for it) -- now refuses on -L alone. Reproduced F1 and F2 live during RED verification (git-stashed the fixes and re-ran the new tests against the pre-fix code): the old code genuinely built an image and started two real containers with dummy secrets, and one BENCH_CONTAINER_DRY_RUN=1 test unexpectedly triggered a real docker build -- both cleaned up (docker rm -f / docker rmi) before restoring the fixes. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com>
Collaborator
Author
|
This was written agentically; verify its assertions: Adversarial review receipt
🤖 Co-authored by Claude Fable 5 (root orchestrator). |
4 tasks
thewrz
pushed a commit
that referenced
this pull request
Aug 23, 2026
…s from staleness record-tier0.yml pushes a post-merge [skip ci] commit to main after every merge; merge-gate.sh blocked the next queued PR on base: stale=yes, forcing a second merge-down and CI run per PR (agent-kit#394, 2026-08-22 queue #387-#389). gh-pr-state.sh now exempts a base advance whose new commits touch only the repository-declared AGENT_GENERATED_PATHS prefixes from staleness; any other base advance still stales. Documented in onboard-repo and the dispatch-plan generated-path handling, with a fixture test covering a base advance confined to bench/results/tier0.jsonl. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com>
5 tasks
thewrz
added a commit
that referenced
this pull request
Aug 23, 2026
…taleness (#416) * fix(pr-to-green): exempt declared generated/results-path base advances from staleness record-tier0.yml pushes a post-merge [skip ci] commit to main after every merge; merge-gate.sh blocked the next queued PR on base: stale=yes, forcing a second merge-down and CI run per PR (agent-kit#394, 2026-08-22 queue #387-#389). gh-pr-state.sh now exempts a base advance whose new commits touch only the repository-declared AGENT_GENERATED_PATHS prefixes from staleness; any other base advance still stales. Documented in onboard-repo and the dispatch-plan generated-path handling, with a fixture test covering a base advance confined to bench/results/tier0.jsonl. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): declare bench/results/ in AGENT_GENERATED_PATHS The base-staleness exemption added in f4c8728 was correct but inert for agent-kit's own record-tier0.yml commits: this repository's declared AGENT_GENERATED_PATHS (.agent/board.json only) did not cover bench/results/tier0.jsonl, so the issue's own Evidence-section defect stayed live on merge. Adds bench/results/ to the declaration, a regression-pin test asserting this repo's own config covers bench/results/tier0.jsonl, and a note on the dual meaning of AGENT_GENERATED_PATHS in its schema template. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): fail closed on truncated compares and undeclared renames Adversarial review of PR #416 (Codex gpt-5.6-terra, xhigh) confirmed two fail-open gaps in base_advance_is_automation_only: (1) GitHub compare API caps .files at 300 entries per page with no pagination follow-through here, so a base advance touching 301+ files could report stale=no if only the first 300 (all declared) were read; (2) a rename only checked the new filename, so a rename FROM an undeclared path INTO a declared one (or vice versa) reported stale=no despite moving application code. Both now fail closed: a files count at or above the named COMPARE_FILES_PAGE_CAP (300) is treated as unreadable evidence, and both filename and previous_filename must match a declared prefix for a renamed entry. Adds regression-pin tests for each. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> --------- Co-authored-by: mergetest <merge@test.local> Co-authored-by: Claude claude-sonnet-5 <noreply@anthropic.com>
thewrz
added a commit
that referenced
this pull request
Aug 23, 2026
…igest (#418) * fix(pr-to-green): exempt declared generated/results-path base advances from staleness record-tier0.yml pushes a post-merge [skip ci] commit to main after every merge; merge-gate.sh blocked the next queued PR on base: stale=yes, forcing a second merge-down and CI run per PR (agent-kit#394, 2026-08-22 queue #387-#389). gh-pr-state.sh now exempts a base advance whose new commits touch only the repository-declared AGENT_GENERATED_PATHS prefixes from staleness; any other base advance still stales. Documented in onboard-repo and the dispatch-plan generated-path handling, with a fixture test covering a base advance confined to bench/results/tier0.jsonl. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): declare bench/results/ in AGENT_GENERATED_PATHS The base-staleness exemption added in f4c8728 was correct but inert for agent-kit's own record-tier0.yml commits: this repository's declared AGENT_GENERATED_PATHS (.agent/board.json only) did not cover bench/results/tier0.jsonl, so the issue's own Evidence-section defect stayed live on merge. Adds bench/results/ to the declaration, a regression-pin test asserting this repo's own config covers bench/results/tier0.jsonl, and a note on the dual meaning of AGENT_GENERATED_PATHS in its schema template. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): fail closed on truncated compares and undeclared renames Adversarial review of PR #416 (Codex gpt-5.6-terra, xhigh) confirmed two fail-open gaps in base_advance_is_automation_only: (1) GitHub compare API caps .files at 300 entries per page with no pagination follow-through here, so a base advance touching 301+ files could report stale=no if only the first 300 (all declared) were read; (2) a rename only checked the new filename, so a rename FROM an undeclared path INTO a declared one (or vice versa) reported stale=no despite moving application code. Both now fail closed: a files count at or above the named COMPARE_FILES_PAGE_CAP (300) is treated as unreadable evidence, and both filename and previous_filename must match a declared prefix for a renamed entry. Adds regression-pin tests for each. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): report landed CodeRabbit review state instead of coderabbit=none gh-pr-state.sh derived provider: coderabbit=... from an issue-comment phrase scan, which an APPROVED review with zero actionable threads (or a CHANGES_REQUESTED review with inline threads only) never matches -- PR #386 read coderabbit=none for 15 wasted one-minute rounds after CodeRabbit had already approved it. The real signal is the reviews endpoint itself: an acknowledgement is a plain issue comment, never a review submission, so it can never be mistaken for one. provider_state() now reports the most recent terminal review directly (state=APPROVED|CHANGES_REQUESTED|COMMENTED threads=N since=TIMESTAMP), falling back to the rate-limit/none scan only when no review has landed yet. review-transition.sh gains a lightweight --observe --since TIMESTAMP mode that answers "has the review landed since I triggered it" without repeating the full ready-transition and provider-spend flow, returning LANDED (or PENDING); its TRIGGERED/ALREADY_SPENT results now carry that since= boundary. merge-gate.sh accepts LANDED as evidence-green, exactly like AUTO_REVIEW/ALREADY_SPENT. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): pin CodeRabbit review evidence to the current head SHA Adversarial review of PR #418 found that neither gh-pr-state.sh's provider_state() nor review-transition.sh's new --observe path checked a review's own commit_id: a CodeRabbit review submitted against an OLD head can finish AFTER the PR advances to a new one, with a submitted_at that looks perfectly current. That let a stale review (of code nobody has reviewed) be reported/accepted as landed evidence for the current head -- the exact failure this issue set out to fix, arriving from the other direction. Both selectors now require the review's commit_id to match the current head (fetched fresh for --observe, read from the already-fetched PR metadata for the digest) before calling it landed/reviewed. A terminal review that exists but targets a different head is reported distinctly (stale-head / STALE_HEAD) -- never reviewed/LANDED (misrepresents stale evidence as current) and never none/PENDING (hides that a review exists at all). merge-gate.sh blocks STALE_HEAD exactly like an in-flight TRIGGERED review. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> --------- Co-authored-by: mergetest <merge@test.local> Co-authored-by: Claude claude-sonnet-5 <noreply@anthropic.com>
thewrz
added a commit
that referenced
this pull request
Aug 23, 2026
…nly (#419) * fix(pr-to-green): exempt declared generated/results-path base advances from staleness record-tier0.yml pushes a post-merge [skip ci] commit to main after every merge; merge-gate.sh blocked the next queued PR on base: stale=yes, forcing a second merge-down and CI run per PR (agent-kit#394, 2026-08-22 queue #387-#389). gh-pr-state.sh now exempts a base advance whose new commits touch only the repository-declared AGENT_GENERATED_PATHS prefixes from staleness; any other base advance still stales. Documented in onboard-repo and the dispatch-plan generated-path handling, with a fixture test covering a base advance confined to bench/results/tier0.jsonl. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): declare bench/results/ in AGENT_GENERATED_PATHS The base-staleness exemption added in f4c8728 was correct but inert for agent-kit's own record-tier0.yml commits: this repository's declared AGENT_GENERATED_PATHS (.agent/board.json only) did not cover bench/results/tier0.jsonl, so the issue's own Evidence-section defect stayed live on merge. Adds bench/results/ to the declaration, a regression-pin test asserting this repo's own config covers bench/results/tier0.jsonl, and a note on the dual meaning of AGENT_GENERATED_PATHS in its schema template. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): fail closed on truncated compares and undeclared renames Adversarial review of PR #416 (Codex gpt-5.6-terra, xhigh) confirmed two fail-open gaps in base_advance_is_automation_only: (1) GitHub compare API caps .files at 300 entries per page with no pagination follow-through here, so a base advance touching 301+ files could report stale=no if only the first 300 (all declared) were read; (2) a rename only checked the new filename, so a rename FROM an undeclared path INTO a declared one (or vice versa) reported stale=no despite moving application code. Both now fail closed: a files count at or above the named COMPARE_FILES_PAGE_CAP (300) is treated as unreadable evidence, and both filename and previous_filename must match a declared prefix for a renamed entry. Adds regression-pin tests for each. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): report landed CodeRabbit review state instead of coderabbit=none gh-pr-state.sh derived provider: coderabbit=... from an issue-comment phrase scan, which an APPROVED review with zero actionable threads (or a CHANGES_REQUESTED review with inline threads only) never matches -- PR #386 read coderabbit=none for 15 wasted one-minute rounds after CodeRabbit had already approved it. The real signal is the reviews endpoint itself: an acknowledgement is a plain issue comment, never a review submission, so it can never be mistaken for one. provider_state() now reports the most recent terminal review directly (state=APPROVED|CHANGES_REQUESTED|COMMENTED threads=N since=TIMESTAMP), falling back to the rate-limit/none scan only when no review has landed yet. review-transition.sh gains a lightweight --observe --since TIMESTAMP mode that answers "has the review landed since I triggered it" without repeating the full ready-transition and provider-spend flow, returning LANDED (or PENDING); its TRIGGERED/ALREADY_SPENT results now carry that since= boundary. merge-gate.sh accepts LANDED as evidence-green, exactly like AUTO_REVIEW/ALREADY_SPENT. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): detect Code Quality disabled (403) and skip cleanly AGENT_REVIEW_PROVIDERS=github-code-quality was accepted at plan time even when the repository had GitHub Code Quality disabled, and code-quality-state.sh then died mid-gate on a raw 403. code-quality-state.sh gains --probe: a single lightweight request that decides state=enabled/not-enabled/unknown, treating only a confirmed "not enabled" 403 message as proof of disablement -- every other failure (network, auth/scope, 5xx) reports unknown and fails closed. review-provider-config.sh --probe uses it once to downgrade the declared github-code-quality plan line on a confirmed not-enabled, leaving every other provider and the default (no --probe) call path -- including review-transition.sh -- byte-for-byte unchanged. The review-remote-pr Step 5 recipe probes before fetching findings instead of dying on the 403, and merge-gate.sh accepts --code-quality-scan-state not-enabled as a pass, since a disabled repository has no scan to wait for. Closes #403. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): pin CodeRabbit review evidence to the current head SHA Adversarial review of PR #418 found that neither gh-pr-state.sh's provider_state() nor review-transition.sh's new --observe path checked a review's own commit_id: a CodeRabbit review submitted against an OLD head can finish AFTER the PR advances to a new one, with a submitted_at that looks perfectly current. That let a stale review (of code nobody has reviewed) be reported/accepted as landed evidence for the current head -- the exact failure this issue set out to fix, arriving from the other direction. Both selectors now require the review's commit_id to match the current head (fetched fresh for --observe, read from the already-fetched PR metadata for the digest) before calling it landed/reviewed. A terminal review that exists but targets a different head is reported distinctly (stale-head / STALE_HEAD) -- never reviewed/LANDED (misrepresents stale evidence as current) and never none/PENDING (hides that a review exists at all). merge-gate.sh blocks STALE_HEAD exactly like an in-flight TRIGGERED review. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * docs(pr-to-green): document --code-quality-scan-state not-enabled auto-merge.md still described --code-quality-scan-state as complete|pending after issue #403 added a third value; the STALE_HEAD provider-result direction was already current (issue #395 documented it in the same file). Updates the bullet to name not-enabled and explain it gates exactly like complete, while an unreadable probe (network failure, auth/scope 403, a 5xx) still blocks. Prose only, no behavior change. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> --------- Co-authored-by: mergetest <merge@test.local> Co-authored-by: Claude claude-sonnet-5 <noreply@anthropic.com>
thewrz
added a commit
that referenced
this pull request
Aug 23, 2026
…dence (#420) * fix(pr-to-green): exempt declared generated/results-path base advances from staleness record-tier0.yml pushes a post-merge [skip ci] commit to main after every merge; merge-gate.sh blocked the next queued PR on base: stale=yes, forcing a second merge-down and CI run per PR (agent-kit#394, 2026-08-22 queue #387-#389). gh-pr-state.sh now exempts a base advance whose new commits touch only the repository-declared AGENT_GENERATED_PATHS prefixes from staleness; any other base advance still stales. Documented in onboard-repo and the dispatch-plan generated-path handling, with a fixture test covering a base advance confined to bench/results/tier0.jsonl. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): declare bench/results/ in AGENT_GENERATED_PATHS The base-staleness exemption added in f4c8728 was correct but inert for agent-kit's own record-tier0.yml commits: this repository's declared AGENT_GENERATED_PATHS (.agent/board.json only) did not cover bench/results/tier0.jsonl, so the issue's own Evidence-section defect stayed live on merge. Adds bench/results/ to the declaration, a regression-pin test asserting this repo's own config covers bench/results/tier0.jsonl, and a note on the dual meaning of AGENT_GENERATED_PATHS in its schema template. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): fail closed on truncated compares and undeclared renames Adversarial review of PR #416 (Codex gpt-5.6-terra, xhigh) confirmed two fail-open gaps in base_advance_is_automation_only: (1) GitHub compare API caps .files at 300 entries per page with no pagination follow-through here, so a base advance touching 301+ files could report stale=no if only the first 300 (all declared) were read; (2) a rename only checked the new filename, so a rename FROM an undeclared path INTO a declared one (or vice versa) reported stale=no despite moving application code. Both now fail closed: a files count at or above the named COMPARE_FILES_PAGE_CAP (300) is treated as unreadable evidence, and both filename and previous_filename must match a declared prefix for a renamed entry. Adds regression-pin tests for each. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): report landed CodeRabbit review state instead of coderabbit=none gh-pr-state.sh derived provider: coderabbit=... from an issue-comment phrase scan, which an APPROVED review with zero actionable threads (or a CHANGES_REQUESTED review with inline threads only) never matches -- PR #386 read coderabbit=none for 15 wasted one-minute rounds after CodeRabbit had already approved it. The real signal is the reviews endpoint itself: an acknowledgement is a plain issue comment, never a review submission, so it can never be mistaken for one. provider_state() now reports the most recent terminal review directly (state=APPROVED|CHANGES_REQUESTED|COMMENTED threads=N since=TIMESTAMP), falling back to the rate-limit/none scan only when no review has landed yet. review-transition.sh gains a lightweight --observe --since TIMESTAMP mode that answers "has the review landed since I triggered it" without repeating the full ready-transition and provider-spend flow, returning LANDED (or PENDING); its TRIGGERED/ALREADY_SPENT results now carry that since= boundary. merge-gate.sh accepts LANDED as evidence-green, exactly like AUTO_REVIEW/ALREADY_SPENT. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): detect Code Quality disabled (403) and skip cleanly AGENT_REVIEW_PROVIDERS=github-code-quality was accepted at plan time even when the repository had GitHub Code Quality disabled, and code-quality-state.sh then died mid-gate on a raw 403. code-quality-state.sh gains --probe: a single lightweight request that decides state=enabled/not-enabled/unknown, treating only a confirmed "not enabled" 403 message as proof of disablement -- every other failure (network, auth/scope, 5xx) reports unknown and fails closed. review-provider-config.sh --probe uses it once to downgrade the declared github-code-quality plan line on a confirmed not-enabled, leaving every other provider and the default (no --probe) call path -- including review-transition.sh -- byte-for-byte unchanged. The review-remote-pr Step 5 recipe probes before fetching findings instead of dying on the 403, and merge-gate.sh accepts --code-quality-scan-state not-enabled as a pass, since a disabled repository has no scan to wait for. Closes #403. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(pr-to-green): pin CodeRabbit review evidence to the current head SHA Adversarial review of PR #418 found that neither gh-pr-state.sh's provider_state() nor review-transition.sh's new --observe path checked a review's own commit_id: a CodeRabbit review submitted against an OLD head can finish AFTER the PR advances to a new one, with a submitted_at that looks perfectly current. That let a stale review (of code nobody has reviewed) be reported/accepted as landed evidence for the current head -- the exact failure this issue set out to fix, arriving from the other direction. Both selectors now require the review's commit_id to match the current head (fetched fresh for --observe, read from the already-fetched PR metadata for the digest) before calling it landed/reviewed. A terminal review that exists but targets a different head is reported distinctly (stale-head / STALE_HEAD) -- never reviewed/LANDED (misrepresents stale evidence as current) and never none/PENDING (hides that a review exists at all). merge-gate.sh blocks STALE_HEAD exactly like an in-flight TRIGGERED review. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * feat(review-remote-pr): keep per-PR RUN_DIR pointers under .agent/evidence Step 0c minted a randomly named RUN_DIR under ${TMPDIR:-/tmp} every run, with no durable pointer beyond the harness scratchpad. A resumed session lost the mapping even though the directory still existed on disk, orphaning digests, consent records, and receipts (issue #405). The new run-dir.sh helper owns the PR -> RUN_DIR mapping: the same PR always resolves to the same private (0700) `.agent/evidence/pr-<N>` directory, already excluded from git. A pre-existing target that is a symlink, not a directory, not owned by this user, or not mode 0700 is refused rather than reused or silently widened. ${TMPDIR:-/tmp} is used only as a real fallback, keyed by repository and PR number, on hosts where `.agent/` genuinely cannot be created or secured. Step 0c in review-remote-pr/SKILL.md now calls the helper instead of `mktemp -d`; pr-to-green and parallel-issues Phase 3 already delegate to that same step by reference, so no separate recipe exists there to replace. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(parallel-issues): derive RUN_DIR from run-dir.sh in Phase 3 instead of recalling it Phase 3 still told its dispatched review-remote-pr loop to "re-set RUN_DIR to the Step 0c output" -- the exact unrecoverable-pointer pattern issue #405 fixes elsewhere: after a resume, nothing tells the reader what that prior output was. Both Phase 3 blocks (the pre-launch adversarial-review precheck and the post-fix receipt publish) now call run-dir.sh --pr "$PR" directly, the same way review-remote-pr's own Step 0c does, so RUN_DIR is actively re-derived rather than remembered. The guard reordering keeps the fail-loud intent: the PR guard and the agentkit cache-rehydration guard both still run before the derivation, and a run-dir.sh failure still exits 1. Net effect on parallel-issues/SKILL.md: 1133/1133 lines (unchanged) and 19554 -> 19529 estimated tokens (a small decrease), so no size-gate ceiling raise is needed. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * docs(pr-to-green): document --code-quality-scan-state not-enabled auto-merge.md still described --code-quality-scan-state as complete|pending after issue #403 added a third value; the STALE_HEAD provider-result direction was already current (issue #395 documented it in the same file). Updates the bullet to name not-enabled and explain it gates exactly like complete, while an unreadable probe (network failure, auth/scope 403, a 5xx) still blocks. Prose only, no behavior change. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> * fix(review-remote-pr): refuse a dangling symlink in run-dir.sh instead of falling back Adversarial review (Codex, xhigh) on PR #420 found: `[[ -e $dir ]]` follows a symlink, so it is FALSE for a dangling symlink (target does not exist). Both `ensure_private_root` and try_primary's `.agent` check gated their `-L` refusal inside an `-e` branch, so a dangling symlink at `.agent` or `.agent/evidence` skipped the refusal entirely, fell through to `mkdir` (which fails EEXIST against the link itself), and that failure was read as "not writable" -- silently routing evidence to the /tmp fallback instead of refusing the hostile path. Both sites now check `-L` unconditionally, before any `-e`-gated branch, matching the shape private_dir_ensure (private-dir.sh) already uses -- confirmed that shared helper does not have this bug. `finding-ledger.sh` records this as a confirmed P2, fixed, from the adversarial-review receipt. Added regression coverage for the dangling case at every level a symlink can occupy: .agent/evidence, .agent itself, the per-PR leaf (via the shared private_dir_ensure, confirming it was already correct), and the /tmp fallback root -- each asserting the actual refusal (RC=1, symlink named, "not writable" NOT reported), not merely that the primary path was not returned. Co-Authored-By: Claude claude-sonnet-5 <noreply@anthropic.com> --------- Co-authored-by: mergetest <merge@test.local> Co-authored-by: Claude claude-sonnet-5 <noreply@anthropic.com>
Refresh the trial harness branch onto the current repository state for final verification. Co-Authored-By: Codex <noreply@openai.com>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was written agentically; verify its assertions:
Why
Slice 5 of the token-benchmark epic (#152). Tier 0 (#343), the fixtures and gold tree (#349), the oracle (#326) and the pre-registration (#324) are merged; nothing yet runs a Tier-1 trial. The design's validity lives in its controls — one fresh container per trial, a baked-empty home, an identical concurrency cap on both arms, a GraphQL budget that pauses rather than fails — and those controls have to be mechanical, not remembered, before the pilot (#329) can spend anything.
What
bench/container/Dockerfile(+ README):debian:13pinned by digest, every apt package pinned by exact version,ghfrom GitHub's keyed apt repo at a pinned version, the Codex CLI musl binary atrust-v0.148.0verified against the sha256 GitHub's release-asset API reports. Non-root user, no secrets in any layer, no ENTRYPOINT. The header comment records the exact command used to resolve each pin.bench/lib/:concurrency-cap-gate.sh(reuses the shippedconcurrency-cap.shparser; both arms present and identical or abort before spend),home-empty.sh(build + verify the baked-empty home against a named stateful-path list),container-lifecycle.sh(build/run/destroy plus an independent destruction proof; dry-run mode runs the same state machine on marker files),rate-limit-gate.sh(decides proceed/pause fromgh api rate_limit, never sleeps itself),ledger-append.sh(append-only, symlink-refusing, extracted sotier1.jsonldoes not carry a divergent copy oftier0.sh's inline logic).bench/run-trial.sh: the nine-step trial sequence — cap gate → rate gate → empty home → container build/run → repo reset → invocation → oracle scoring viarun-accept.sh→bench_trial_metaappend +parse-rollout.py→ ledger append → destroy and prove destroyed.--dry-run(default) exercises every step with no docker, no Codex, no spend;--livevalidates secrets then stops at the real invocation.bench/parse-rollout.py: one trial's session logs → one ledger row: the grouping key, assigned vs realised (model, effort) with the pre-registered void rule made mechanical, the four token classes per actor, blended USD from an explicit placeholder rate table (--pricingoverride), per-path reference-read counts (the primary instrument), and the orchestration facts carried by a harness-appendedbench_trial_metarecord.tests/test-bench-harness.sh(every gate, the lifecycle state machine, and two full dry-run trials — gold tree scores 10/10, untouched skeleton 0/10, a cap mismatch aborts before the home or ledger exist) andtests/test-bench-parse-rollout.sh(every expected number recomputed independently from the fixture bytes with jq/grep/awk; void paths; duplicate-meta and unpriced-model failures). Synthetic session fixtures undertests/fixtures/bench/.Decisions
--livetherefore stops withnot implementedat the invocation step rather than shipping an unexerciseddocker execpath; wiring it is the first task of the pilot (test(bench): stage 1 pilot — two trials, go/no-go #329).~/.codex/sessions/*.jsonlshape was not readable within this slice's scope and a real trial was out of scope, soparse-rollout.pyis written against a documented model of it and pinned by the synthetic fixture. The first real trial is the first chance to reconcile field names;parse-rollout.py's header says so.bench_trial_metais a harness-emitted record, not parsed prose. Selected set, chain plan, serialization/retry events, wall clock, worker count and exit condition are facts about how the harness drove the trial; recovering them by pattern-matching an LLM transcript would be unreliable, sorun-trial.shappends one record and the parser treats only those fields as ground truth — every token and reference figure still comes from the per-turn records.DEFAULT_PRICINGexists soblended_usdis deterministic and spot-checkable; it is not live pricing and the parser never fetches any. Replace via--pricingbefore a real trial.bench/results/tier1.jsonlis not committed: every test passes its own--ledger, sotests/test-bench-accept.sh's "no tier1.jsonl exists yet" assertion stays true until a real trial.base=origin/main
files=22
total.insertions=1761
total.deletions=0
total.lines=1761
operational.files=12
operational.insertions=1702
operational.deletions=0
operational.lines=1702
generated.files=0
generated.insertions=0
generated.deletions=0
generated.lines=0
lockfile.files=0
lockfile.insertions=0
lockfile.deletions=0
lockfile.lines=0
fixture.files=10
fixture.insertions=59
fixture.deletions=0
fixture.lines=59
non_operational.files=10
non_operational.insertions=59
non_operational.deletions=0
non_operational.lines=59
Testing
ALL GREEN, rc=0)run-trial.sh: gold tree 10/10, untouched skeleton 0/10, ledger row appended, container destruction independently provenparse-rollout.pyarithmetic spot-checked against independently computed fixture sums; void rule exercised both waysdocker build -t agent-kit-bench-tally:local bench/containersucceedsparse-rollout.py's schema against the real rollout🤖 Co-authored by Claude Sonnet 5 (worker) / Claude Fable 5 (root).
Closes #327