Repository navigation
ci(pr-verify): capture the changed app in its own workflow for the judges - #13053
Conversation
…dges Refs #12232 The capture runs pull request code, so it runs in pr-verify-capture.yml, never in a pr-verify.yml run, whose record is what authenticates a verdict (owner decision on Q1, issuecomment-6620015178). The capture job takes the judges' trigger, in-repo-head `if` and gates, holds a read-only token, and runs a reach probe (capture-probe.mjs) as a Bash child of a driver leg before any head code: a reachable key, job token or runtime token, or a scan that misses its canary, fails the job. It drives the app with /testing:run-e2e --unattended app= base= trusted-root=.base and uploads pr-capture-<pr>-<head-sha>. Each judge job runs identical find-capture and download steps: check-intent waits at most 35 minutes for the capture run its upstream run started, and the later jobs find it done. A missing, unfinished or blocked capture never fails a verdict. write-verdict.mjs reads run-e2e's e2e-summary.json into the evidence block, and localLoop reads the "Evidence loop: 3/3 cap reached, last NEEDS WORK" line, which prompt.md makes a fail. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015te8Cqhc6ANUKyPoYQrPgN
Codex Review SummaryThis 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: aa393532db
ℹ️ 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".
|
claude-security-review reviewed Security review: PR #13053 (pr-verify capture workflow), round 3I read every hunk of all 23 changed files. Each trusted-path file got a full read of its change and of what it gates:
No security issues found. critical-findings: 0 Prior and settled points:
Checked and clean:
Spend (not a hold):
|
|
claude-review reviewed Code review: PR #13053, the capture workflow for pr-verify's judges (round 3 of 3)I read every hunk of all 23 changed files in No new findings. Prior and settled points:
What I checked and found sound:
Not verified by me: the author's test counts, negative controls, actionlint, zizmor and gitleaks results, and the skill-fence probing on Claude Code 2.1.318 are the author's own claims; I ran nothing. No live capture has run. The PR body already lists the open follow-ups: the retention row records 30 days while the config accepts 1 to 90, Spend (not a finding): nothing changes while No closing issue is listed ( |
… run directory Refs #12232 The driver holds pr-verify's key, and its file tools were allowed whole. They now take only path-scoped allow rules (Read in head/, capture-run/ and .base/plugins/, Edit in head/ and capture-run/) under dontAsk, plus deny rules on /proc, /sys, the runner's temp directory and the home's credential files. The probe leg carries the same deny rules, Reads /proc/self/environ and a file in the runner's temp directory, and the check step fails the job unless its transcript shows both reads refused (capture-probe.mjs reads). The prompt names $GITHUB_WORKSPACE/capture-run as run-e2e's run directory, which run-e2e takes no argument for, and the collect step takes a summary only from there. check-intent hands the capture ids it found to the later judge jobs as a job output, so they read no listing; a job that must look for itself reads from the upstream run's creation on, page by page, so a capture past the newest 50 runs is still found. The hold-floor copies are regenerated with scripts/sync-hold-floor.py for the new workflow, and the floor count pin moves to 75. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015te8Cqhc6ANUKyPoYQrPgN
Refs #12232 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015te8Cqhc6ANUKyPoYQrPgN
… wire local_loop The driver's bare Skill rule would let a head skill that declares hooks run beside the key if a later CLI loaded it. Name the two skills run-e2e needs, so dontAsk refuses it. Pass CONTEXT_FILE to the three verdict steps so evidence.local_loop reads the trusted body's evidence-loop line in production. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Refs: #12232
Summary
Problem: pr-verify's judges have no capture of the changed app to look at. This PR adds the capture as its own workflow,
pr-verify-capture.yml. The owner chose that option on #12232's Q1 (decision): a capture job inside the pr-verify run would put PR code beside node steps that hold the run's upload token, so PR code could upload a forgedpr-verify-<pr>-<sha>-pass. With the capture in a separate workflow,pr-verify.yml's rule "No pull request code runs here" still holds.The capture stays off:
merge.verify-capture.appis unset, so the new workflow skips with a note and the judges see no capture. Switching it on waits on #11386 and #11390.Fix
pr-verify-capture.yml: runs on the same trigger, with the same in-repo-head check, as the judges. It runs the gate steps first. Its permissions are read-only, and every checkout setspersist-credentials: false. A probe step runs before any head code. It scans its own environment, every readable/proc/*/environand known credential files, and the job fails closed on any hit, or when its canary child does not show up in the scan. The driver step alone holds the API key (Q11). The app runs as a Bash child of the driver. The run-claude-cli launcher setsCLAUDE_CODE_SUBPROCESS_ENV_SCRUBfor the driver (lane.cjslegEnv, asworkflow.test.mjs:1361records), so the app does not inherit the key. The probe checks this at run time. The capture artifactpr-capture-<pr>-<sha>has a retention row (30 days), and the job has a 30-minute timeout.testing:run-e2eandapp-control:drive, so a skill in the head that declares hooks is refused.pr-verify.yml: all three judge jobs carry identical steps that find the capture run for the same upstream run and head SHA (find-capture.mjs) and download its artifact intopr-verify-data/capture/. They wait only when the app is set, for at most 35 minutes. A missing, unfinished or blocked capture never fails a verdict. Each verdict step now getsCONTEXT_FILE, soevidence.local_loopreads the trusted body's evidence-loop line.write-verdict.mjs:fromE2eSummarymaps run-e2e'se2e-summary.jsonto the verdict's capture fields.localLoopnow parsesEvidence loop: 3/3 cap reached, last NEEDS WORK.prompt.mdtreats the capture as untrusted data.--unattendedflag, not the bare word (plugins/testing/skills/run-e2e/SKILL.md:45-49).Verification
node --teston every.github/scripts/pr-verify/*.test.mjsat this head: 283 pass, 0 fail. An earlier full run over.github/andscripts/was 7915 pass, and 7 shell suites passed; CI covers the rest at this head.writepermission, a job-levelalways(), the probe moved after the head checkout,persist-credentialsremoved,needs: capture, and a head checkout in pr-verify.Skill,--add-dir head, no--restricted: the skill ran and the marker appeared, so the path is real without the other controls.dontAsk: the hook-carrying skill was denied. A head skill with no hooks and no tool grant still ran; it adds prompt text only.--restricted, as the lane runs: head skills do not load at all (Unknown skill), with bareSkilland after a Read in the head. A named plugin skill still runs withSkill(name *).actionlinton both workflows: clean, apart from thecache-modekey, which actionlint 1.7.12 also reports on main'spr-verify.yml. zizmor andcheck-artifact-retentionpassed on the earlier head. gitleaks at this head: no leaks.Related
maxEntryPointscap, and the changed-plugin launch.Remaining
merge.verify-capture.app: claude-codeset. This waits on feat(harness-ops): let control-claude-code run unattended on sessions it launches #11386. ci(pr-verify): add the capture job that drives the affected app (S7 of #8651) #12232 closes when it is shown.check-intentpolls about once a minute for the capture run. An event trigger would spend fewer API calls.no-app, with no signal.pr-capture-*retention row records 30 days, while the config accepts 1 to 90.🤖 Generated with Claude Code