Repository navigation
fix(session-flow): seed the remote refs each resume-eval case names - #17700
Conversation
Resumed readers looked for a PR head branch, a release branch or a tag that the case story names, found none in the seeded origin, and ran git ls-remote or git fetch origin. Auto mode refuses those calls, so the run counted as not delivered. A new optional seed.remote_refs lists full ref names. seed_run creates each at the seeded HEAD in the run's local origin.git (tags annotated), adds a pull-ref fetch refspec when needed, and fetches with --prune, so refs/remotes/origin/* and the tags mirror origin with no stale base-clone ref left. A case without the field seeds as before. Eight re-* cases gain the refs their story implies, and each open PR's stub pr view answer now carries headRefName. No probe, grader or deny rule changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…branch Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A trial on the seeded refs still failed: readers confirm refs on the remote with git -C <repo> ls-remote origin, which no rule matched, so the auto-mode classifier refused it and the run did not deliver. Eval sessions now allow git ls-remote and git fetch, with or without -C. The URL, user@host and host:path forms stay denied (deny wins over allow), and so does re-pointing a remote through git remote add or set-url or git config remote.*, so a named remote stays the local origin the harness created. The rules name no repository or path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c189ab5f35
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Lane run report
Failed GitHub API callsNo failed call recorded by the run job's scripts. |
The host:path deny for git fetch (*:*) also matched a source:destination refspec, so git fetch origin refs/pull/4460/head:review-4460 was denied against the run's local origin, the PR-head fetch the seeded cases need. fetch now denies only its URL and user@host forms; ls-remote, which takes no refspec, keeps the host:path deny. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
claude-security-review reviewed Security review: PR #17700, incremental (f0d5743..7389ad0)I found no security issues in this push. This lane had already reviewed earlier heads, so the review was blocking only: SUGGESTION findings were dropped. I read every hunk of the three files in scope:
What changed:
Prior findings: both earlier inline findings are addressed. The Trusted paths and controls: none of the three files matches a Spend: none beyond the prepaid eval runs the harness already makes. critical-findings: 0 |
The ls-remote and fetch allow rules also passed --upload-pack=<cmd> (and ls-remote's --exec and -u), which git runs through the shell against a local remote, so a reader could run any command with no classifier check. The eval sessions now deny those flags, the ext:: transport for fetch, and any `git -C <dir> -c <config>` form that the -C allow rules would otherwise pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
claude-security-review finding (allow rules pass |
|
claude-review reviewed Code review (incremental, blocking only): resume-eval sessions run in the Bash sandbox (#17700)No blocking findings in this push. Scope: this review covers only what changed since What changed
Scope notes
Verifier dropped 0 of 0 candidates. |
|
The pr-verify verifier failed head What it wrote (40 lines)This pull request leaves the merge queue, and ci-status holds it out while it carries |
The git allow and deny globs could not keep eval readers off the network: reviews found --upload-pack, scp-style host:path fetches, -C to another checkout and --exec-path all slipping through, because a glob cannot tell which argument a colon or flag belongs to. Each eval session now runs every shell command in the OS sandbox with no allowed network host, a strict allowlist and no unsandboxed retry, writable only in its working directory, its run folder and the harness temp directory. The git ls-remote and fetch globs are gone, so a reader can read the local origin's refs while any network attempt fails at the OS level. WebFetch and WebSearch, which the sandbox does not cover, stay denied. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dbox pr-verify and the review lanes on f0d5743 found three gaps. The run fell back to unsandboxed shells if the sandbox could not start; the Bash network denies were gone, so nothing backed the sandbox up; and a second reader's copied settings still named the first reader's run folder as writable. Eval sessions now set sandbox.failIfUnavailable, keep the curl, wget and URL or user@host git ls-remote/fetch denies (with and without -C) next to the sandbox, and every reader workspace gets settings written for its own folder. Tests pin the denied forms, the local reads that stay open, and the second reader's writable folder. Refs: #17792 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: #17792
Summary
In the resume eval, the resumed reader looks for refs the case story names: a PR's head branch, a release branch, a tag. The seeded
originhad none of them, and the eval sessions deniedgit ls-remoteoutright, so the reader'sgit -C <repo> ls-remote originorgit fetch originwas refused and the run counted as not delivered. In the last A/A, thebeforearm delivered 0 of 16 runs onre-decision-trimmed-to-fitand 0 of 15 onre-late-event.This change seeds those refs locally and runs each eval session's shell commands in the Bash sandbox with no network host allowed, so a reader can read the run's local origin while any network attempt fails at the OS level. The owner decided both (Q63, Q66), recorded in the owner-decisions record and quoted in #17792.
Fix
seed.remote_refs: full ref names (refs/heads/…,refs/tags/…,refs/pull/<N>/head).seed_runcreates each one at the seeded HEAD in the run's localorigin.git; tags are annotated. It adds arefs/pull/*fetch refspec when a pull ref is listed, then runsgit fetch --prune --prune-tags originagainst that local bare repo and setsorigin/HEAD. A ref outside the three prefixes is refused. A case without the field seeds as before.gh pr viewanswer carries aheadRefNamethat is seeded. Tags the stories say are not cut yet (v1.8.0,v2.8.*,v2.14.0) and past release tags are not created.run_settings):sandboxwithenabled,autoAllowBashIfSandboxed,allowUnsandboxedCommands: false,failIfUnavailable: true(the session refuses to start without the sandbox rather than run unsandboxed),network.allowedDomains: [],network.strictAllowlist: true, andfilesystem.allowWritelimited to the run folder and the harness temp directory.write_run_settingswrites each run's settings, and a second reader's private copy of the workspace gets its own, so its writable folder is the copy, not the first reader's run folder.NETWORK_DENY, kept as a second layer beside the sandbox: curl, wget, WebFetch and WebSearch, and the URL (*://*) and user@host (*@*) forms ofgit ls-remoteandgit fetch, with and without-C. The blanketgit ls-remotedeny narrows to those forms. No allow rule is added. Earlier heads tried git allow and deny globs; review lanes and pr-verify found network forms those globs let through, which is why the sandbox replaces them.Verification
uv run --with pytest python -m pytest -q plugins/session-flow/scripts/harness: 235 passed.-C), that 4 localoriginreads (including--sort=v:refnameand a refspec fetch) are not denied, and that no allow rule exists.remote_refsgives the exactgit branch -r,git tagandrev-parseanswers with the base clone's stale remote refs pruned; a seed without it pushes only HEAD; a ref outside the prefixes is refused; every open PR'spr viewnames a seededheadRefName; each not-yet-cut tag is absent.beforearm, Claude Code reader, 4 runs per case): seeds only,re-late-event2/4 andre-decision-trimmed-to-fit0/4 delivered; seeds plus the earlier git allow rules, 4/4 and 3/4. A trial on the sandbox settings is running; thedo-not-mergelabel comes off when it delivers at least 2 of 4 per case.scripts/run-ruff.sh checkpasses on the changed Python files.Related
🤖 Generated with Claude Code