Skip to content

feat(runner-policy): register the v0.65.16 review contracts with the fallback secret - #893

Merged
kyle-sexton merged 1 commit into
mainfrom
feat/review-fleet-fallback
Oct 26, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
feat/review-fleet-fallback

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: registers the ci-workflows v0.65.16 review contracts so fleet review lanes can map the central fallback subscription

Summary

ci-workflows v0.65.16 (ci-workflows#897) renames the review lanes' optional fallback secret slot to FALLBACK_CLAUDE_CODE_OAUTH_TOKEN, so a caller can map the org secret under its own name, which runner-policy requires for contracts with allowedCallerPermissions (runner-policy.mjs:239-255). The owner approved giving the fleet's review lanes the central fallback token.

The review lanes retry once on the fallback after a usage limit (class rate-limit) only; a credit stop or a 401 does not fall back there.

Fix

  • policy.json: pr-review.yml and pr-review-security.yml at b26e355fe98c372f02a13d74c10a785ad8c9ce2d (v0.65.16) copy their v0.65.14 entries and add the FALLBACK_CLAUDE_CODE_OAUTH_TOKEN secret and the fallback-credential-name input. No permission or routing change.
  • README rollout line and a test asserting the entries differ from v0.65.14 by exactly those two additions.

The caller repin and mapping follow in a separate PR after this syncs.

Verification

  • node --test components/runner-policy/runner-policy.test.mjs: 370 pass, 0 fail.
  • node components/runner-policy/runner-policy.mjs --root .: passed.
  • Tag v0.65.16 resolves to b26e355fe98c372f02a13d74c10a785ad8c9ce2d.

Related

🤖 Generated with Claude Code

…fallback secret

Both review contracts copy their v0.65.14 entries forward and allow the
FALLBACK_CLAUDE_CODE_OAUTH_TOKEN secret, mapped to the org secret of that
name, plus the fallback-credential-name input (ci-workflows#897).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kyle-sexton
kyle-sexton enabled auto-merge (squash) October 26, 2026 13:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T13:43:26.364212Z 6774904 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

claude-security-review reviewed 6774904a4246d12adee6ba05998cb194cdc7e65e: 0 finding(s), 0 as inline comments.

No security issues found in PR #893 at 6774904.

The PR adds two approvedReusableWorkflowContracts entries in components/runner-policy/policy.json. They cover pr-review.yml and pr-review-security.yml, both pinned to the full 40-character SHA b26e355fe98c372f02a13d74c10a785ad8c9ce2d in the org-owned ci-workflows repo. The README gets a rollout note, and the test file gets one new test.

  • Scope of the change: Each entry copies its v0.65.14 predecessor. The only additions are the fallback-credential-name input and a FALLBACK_CLAUDE_CODE_OAUTH_TOKEN secret mapped to the org secret of the same name. Routing (runner-input) and allowedCallerPermissions (contents: read, pull-requests: write, id-token: write) are unchanged.
  • Secret mapping: The secret is mapped 1:1 to its own name, and the contract's secret allowlist covers only the two review tokens. The secret reaches only a contract pinned to an immutable org-owned SHA. The existing CLAUDE_CODE_OAUTH_TOKEN already reaches the same lanes, so this adds no new class of exposure beyond a second credential for the same lanes. The PR body says the owner approved sharing the fallback token with the fleet's review lanes.
  • Trust controls: None of the changed files is on the trust-control list: trusted-trigger check, lane-token scope, kill switch, token-broker rules, merge holds, or .github/actions/* isolation. No permission was widened.
  • Test: The new test asserts the new entries equal the v0.65.14 entries plus exactly those two additions, and that exactly two contracts exist at the new SHA. That guards against silent drift.
  • Instruction surfaces and plugin manifests: The diff touches neither.
  • Not verified: I did not independently confirm that tag v0.65.16 resolves to the pinned SHA. The sandbox declined the gh api call. The PR body states it does resolve there.

manifest fields: not hit by this diff.
critical-findings: 0

@github-actions

Copy link
Copy Markdown

claude-review reviewed 6774904a4246d12adee6ba05998cb194cdc7e65e: 0 finding(s), 0 as inline comments.

No findings.

What I checked

  • Read the full diff (3 files) and the PR context.
  • Compared both new contract entries in policy.json (pr-review.yml and pr-review-security.yml at b26e355f…) with their v0.65.14 entries (31802170…). Each differs only by the fallback-credential-name input and the FALLBACK_CLAUDE_CODE_OAUTH_TOKEN secret, mapped to the org secret of that name. Permissions and routing are unchanged, as the README and PR body say.
  • The new secret mapping uses the same form as the existing FALLBACK_CLAUDE_CODE_OAUTH_TOKEN entries elsewhere in policy.json.
  • The new README paragraph matches the entries. It supersedes the earlier v0.65.14 note that fallback-credential-name stayed unallowed because no caller passed it, and this PR now allows it for the stated reason.
  • The new test asserts that the entries differ from v0.65.14 by exactly those two additions, and that exactly two contracts exist at the new SHA. It would fail if either entry drifted.
  • No closing issue: the PR declares "No related issue" with a reason. There were no criteria to check and nothing unread.
  • The only rule file, .claude/rules/pr-body-contract.md, covers PR bodies. The PR body follows it.
  • No plugin manifests changed, so no manifest <field> lines apply.

Not verified

  • I could not run node --test or runner-policy.mjs here: the sandbox blocked the Bash calls. The 370 passing tests and the passing policy check come from the PR author and are unverified by me.
  • I did not confirm the v0.65.16 tag's SHA or the contents of ci-workflows#897. That would need access to the other repository.

@kyle-sexton
kyle-sexton merged commit aa5c2fc into main Oct 26, 2026
22 checks passed
@kyle-sexton
kyle-sexton deleted the feat/review-fleet-fallback branch October 26, 2026 13:47
kyle-sexton added a commit that referenced this pull request Oct 26, 2026
…iption (#894)

No related issue: gives the fleet review lanes the central fallback
subscription the owner approved

## Summary

Repins `pr-review` and `pr-review-security` to ci-workflows v0.65.16 and
maps the central fallback subscription in the review callers, so the 12
fleet repos' review lanes keep reviewing when their subscription token
hits a usage limit. Contracts were registered in #893.

Scope of the fallback: the review retries once on
`FALLBACK_CLAUDE_CODE_OAUTH_TOKEN` after a usage limit (class
`rate-limit`) only. A credit stop or a revoked token (401) does not fall
back in these lanes.

## Fix

In `components/claude-lanes/`, `components/claude-lanes-hosted/`
(`claude-review.yml`, `claude-security-review.yml`) and standards' own
`.github/workflows/pr-review.yml` and `pr-review-security.yml`:

- pin `b26e355fe98c372f02a13d74c10a785ad8c9ce2d # v0.65.16` (was
v0.65.14);
- add `FALLBACK_CLAUDE_CODE_OAUTH_TOKEN: ${{
secrets.FALLBACK_CLAUDE_CODE_OAUTH_TOKEN }}` (an org secret, visibility
all);
- add `fallback-credential-name: FALLBACK_CLAUDE_CODE_OAUTH_TOKEN`, so
the lane-outcome record names the fallback attempt.

## Verification

- `bash components/claude-lanes/claude-lanes.test.sh`: 0 failures
(materializes and lints every fleet target).
- `bash components/claude-lanes/repin-callers.test.sh`: pass.
- `node components/runner-policy/runner-policy.mjs --root .`: passed;
runner-policy and trusted-actors tests pass.
- `actionlint` on both standards callers: clean.

## Related

- #893
- melodic-software/ci-workflows#897

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Oct 28, 2026
…contract (#902)

Refs: melodic-software/claude-code-plugins#10782

## Summary

Registers the reviewed
`pr-review-cli.yml@20a822d73b6e2d7e21d48e609a01b427e0e161e7` (v0.66.1)
contract. The claude-code-plugins repin fails `runner-target-contract`
because surface-diff auto-approval declines: `jobPermissions changed
since the previously reviewed
...pr-review-cli.yml@3180217076b19bbdfccc43026c7f91c604da673d`.

## Fix

- `policy.json`: the new entry copies the v0.65.14 (`3180217`) entry
forward unchanged. From `3180217` to `20a822d`, the workflow changes in
three non-comment lines, all from melodic-software/ci-workflows#904: the
`status` job adds `actions: read` and `checks: read` (the hold step
reads this workflow's earlier runs and their check-run cost notices),
and that step takes a `STATUS_JOB` env built from the `lane` input. No
input, secret, write scope or routing change. A hosted-only contract
records no job permissions and checks no caller permissions, so the
callers' existing read grants need no entry.
- `README.md`: a v0.66.1 paragraph that names ci-workflows#904 and the
permission change.
- `runner-policy.test.mjs`: pins the new entry as equal to its v0.65.14
entry.

## Verification

- `node --test components/runner-policy/runner-policy.test.mjs`: 371
pass, 0 fail.
- `npm run lint:runner-policy` on this repo: `Runner policy passed.`
- On the claude-code-plugins repin branch
`ci/repin-pr-review-cli-v0.66.1`:
- before (its synced policy): both review callers fail
`runner-target-contract` with the auto-approval decline above, exit 1.
- after (`--policy` pointed at this branch's `policy.json`): `Runner
policy passed.`, exit 0.

## Related

- melodic-software/claude-code-plugins#10782 (the repin this unblocks)
- melodic-software/ci-workflows#904 (the permission change)
- #893 (precedent)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant