Repository navigation
feat(harness-ops): accept the one CI credential in unattended control-claude-code runs - #12372
Conversation
…-claude-code runs Under --unattended, the driver keeps the single credentials.ci variable the job set, turns on CLAUDE_CODE_SUBPROCESS_ENV_SCRUB so the plugin under test cannot read it, refuses two set at once, and Ready and logs accept that credential's apiKeySource. Attended runs are unchanged. Refs: #11386 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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: edccab9c3d
ℹ️ 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 (incremental): PR #12372,
|
|
claude-review reviewed Code review (incremental,
|
… drop the key from the holder Attended runs pass the person's own CLAUDE_CODE_OAUTH_TOKEN through, as before; the docs and test now say so. The session holder deletes the kept CI credential once claude starts. SKILL.md states that the scrub does not prove the credential is out of the plugin's reach (#8651's probe does) and points at the env-vars row instead of restating the key prompt. Refs: #11386 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d does not stop Refs: #11386 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs: #11386
Summary
control-claude-codecan now run unattended with the one CI credential its job provides, as the owner's Q10 decision on #11386 puts in this slice. Under--unattended, the driver keeps the singlecredentials.civariable the job set, turns on the subprocess scrub, refuses two set at once, and Ready andlogsaccept that credential'sapiKeySource. Attended runs are unchanged: the API-key, gateway and provider variables are cleared, the person's ownCLAUDE_CODE_OAUTH_TOKENpasses through as before, and Ready requiresnone.Fix
config/defaults.json:credentials.cinamesANTHROPIC_API_KEYandCLAUDE_CODE_OAUTH_TOKEN(variable names only, per the app-control config contract'scredentialsfield).driver/driver.mjs:launch,readyandlogtake--unattended, andlaunchpasses it on to the session holder.buildLaunchkeeps the one set CI variable and setsCLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1(env-vars), and the session holder unsets the key onceclaudestarts, which stops later children and in-process reads but not/proc/<pid>/environ. This does not prove the credential is out of the plugin under test's reach: a hook can read the/proc/<pid>/environofclaudeor of the holder. feat(harness-ops): verify PR acceptance criteria by driving Claude Code (screenshots, video) before merge #11364's superseding Q11 record requires that proof, and feat(pr-pipeline): run the project's app-control skill in pr-verify after the deterministic tests #8651's S7 isolation probe gives it before any CI job passes--unattended; no workflow passes it today.apiKeySource(ANTHROPIC_API_KEYfor the key;nonefor the OAuth token) and throws before anything starts when both are set.credentials.cinaming a variable the driver has no key source for is refused.SKILL.md: Launch and Ready describe--unattended, state that the credential's isolation waits on feat(pr-pipeline): run the project's app-control skill in pr-verify after the deterministic tests #8651's probe, and point at the env-varsANTHROPIC_API_KEYrow for the interactive session's first screen.README.mdrow and aminor.changes/harness-opsfragment.Verification
bash plugins/harness-ops/skills/control-claude-code/driver/driver.test.sh: 46 pass, 0 fail (was 39). The new cases cover:none;launchandreadywith exit 1, and no claude starts;credentials.ciname is refused;claudethe key with the scrub on, and the holder then unsets it;readyandlogpass onANTHROPIC_API_KEY, and attendedreadywith the same key set still fails;nonefails.scripts/check-affected.sh --testson the committed head: 14 passed, 2 skipped.CLAUDE_CODE_OAUTH_TOKENreportingapiKeySource: none. That is the owner's spike leg; until it is recorded, a token that reports any other source fails Ready. The scrub removingCLAUDE_CODE_OAUTH_TOKENis also unverified: the docs table listsANTHROPIC_API_KEYand says names that look like a credential (NPM_TOKEN) are removed. feat(pr-pipeline): run the project's app-control skill in pr-verify after the deterministic tests #8651's S7 probe tests both in CI before capture is enabled.driver.test.shon Ubuntu 24.04 locally (this host is 26.04), covered by thetest-bashjob onubuntu-24.04.Remaining on #11386
CLAUDE_CODE_OAUTH_TOKENleg (apiKeySourceand first screen) is the owner's step. It needs a token fromclaude setup-token, thendriver.mjs ready --unattendedwithCLAUDE_CODE_OAUTH_TOKENset. If the source is notnone, changeCI_KEY_SOURCESindriver.mjsto match.Related
🤖 Generated with Claude Code