Skip to content

fix(run-claude-cli): stop on a 403 instead of handing off - #841

Merged
kyle-sexton merged 5 commits into
mainfrom
fix/run-claude-cli-403-stop
Oct 21, 2026
Merged

kyle-sexton merged 5 commits into
mainfrom
fix/run-claude-cli-403-stop

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: #840

Summary

Owner decision (2026-10-21, ledger Q38-Q39): the run-claude-cli auth handoff added in #840 (released as v0.57.0) still hands off from a role's API key to its subscription token on numeric API status 401 or 402, but no longer on 403.

  • A 403 (permission_error) stops the run with class auth and handoff set to false. The key reached the API but may not use the resource. That is a key or workspace setting the owner fixes, and a handoff would hide it.
  • The failed leg's error type, error.details.error_code (when present) and request_id now show in the step's ::error line, in a new Error cell in the job summary, in the JSONL log record, and in report-lane-outcome's lane record (error-type=, error-code=, request-id=).
  • fix(run-claude-cli): hand off a rejected key to the subscription and resolve the latest CLI #840's docs called lane role keys whole-account Console keys with "no per-key scope". That line is corrected. A key is bound to one workspace, or acts across several, and carries its identity's workspace role (authentication). It has no per-model or per-endpoint restriction (model config). A 403 means the key lacks permission for the resource (API errors).

Fix

  • run-claude-cli/lane.cjs: NEXT_STEPS.auth.statuses is now [401, 402]. The class's note says that 401 or 402 hands off and a 403 stops. legRecord adds api_error_status, error_type, error_code and request_id. summaryTable gains an Error column, and run's final error line ends with the same tokens.
  • report-lane-outcome/classify.cjs: new apiErrorFacts. It reads the CLI's own error text only, from a failed run with no tool call, every assistant message an SDK error and zero output tokens (the check moved out of creditStopText into cliOnlyRun). Each value is kept only when it matches a closed pattern. readRunRecord carries the facts, and recordTokens prints them only on a failure.
  • Unchanged: the handoff still keys on the numeric status only, never on errors[] text. The handoff output is still written after the step files are restored. fallback-reason still accepts auth, and intake-triage still gates on handoff == 'true'.
  • Docs: run-claude-cli and report-lane-outcome action.yml, the README, and the intake-triage comments.

Verification

  • node --test .github/actions/run-claude-cli/*.test.cjs: 68/68. node --test .github/actions/report-lane-outcome/*.test.cjs: 52/52. node --test .github/scripts/*.test.cjs: 548/548. These are the commands in pr-require-checks.yml.
  • New tests: 401 and 402 hand off. A 403 does not hand off, and its record carries permission_error, the error_code and the request_id. A 403 whose errors[] text names authentication_error still does not hand off, and a 401 whose errors[] text names permission_error still does. With model output present, no facts are read. Values outside the closed patterns are dropped. run on a 403 throws the exact error line and writes the summary cell and the log record. The report-lane-outcome record carries the three tokens and none of the error message text. The 403 fixture follows the error shape on the API errors page, and its error_code value is made up.
  • Mutation: putting 403 back in statuses fails 3 tests.
  • actionlint, markdownlint-cli2 (README) and typos are clean. Biome's config covers only .github/scripts/**, which this change does not touch.

Related

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits October 21, 2026 00:24
A key leg refused with API status 401 or 402 still hands off to the
role's subscription job. A 403 (permission_error) no longer does: the key
reached the API but may not use the resource, a key or workspace setting
the owner fixes, and a handoff would hide it. The run stops with class
auth and handoff false.

The launcher's error line, the job summary's new Error cell and the log
record now carry api_error_status and, read from the CLI's own error text
under closed patterns, the error type, error.details.error_code and
request_id. report-lane-outcome's record prints error-type=, error-code=
and request-id= on a failure.

The docs no longer call lane role keys whole-account keys with no
per-key scope; they point at the authentication, model-config and API
errors pages instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
creditStopText ran before the numeric-status check, so a 403 whose text
and SDK error matched a credit stop became class credit-stop and handed
off to the subscription. It now returns null for any 403, so a 403 stays
class auth, does not hand off, and is reported with its error facts.

The public-log comments in classify.cjs now name the closed-pattern
error facts read from the CLI's own text.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-21T04:38:35.205506Z d75fdf7 Draft marked ready
ℹ️ 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.

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 40s —— View job


Security review complete

  • Gather context (PR diff, changed files)
  • Review diff for security-relevant logic (auth handoff, error classification, token/credential handling)
  • Check for instruction-surface deletions in docs/comments changes
  • Adversarial validation of any candidate findings
  • Post findings / summary

No security issues found.

What was reviewed: the full diff against origin/main across all 9 changed files, with the main security-relevant surface in lane.cjs and classify.cjs.

  • The behavior change (403 now stops the run instead of handing off to the subscription) tightens a trust boundary rather than loosening one — it removes a path where a permission-denied key silently fell back to the subscription credential. No guardrail was weakened; this is the opposite of an instruction-surface deletion concern.
  • apiErrorFacts (classify.cjs#L196-L217) extracts error_type, error_code, request_id from the CLI's own error text (only when cliOnlyRun confirms zero output tokens and every assistant message is an SDK error, so model-authored text can't be mistaken for it), and each value is bounded by a closed regex ([a-z_]{1,40}, [a-z0-9_]{1,64}, req_[A-Za-z0-9]{8,64}). These charsets exclude |, backtick, ::, and newlines, so the values are safe to embed in the ::error annotation line, the job summary table cell, and the JSONL log record — no workflow-command or table injection path, even if the CLI's free text were adversarial.
  • outcome-step.test.cjs's new test explicitly asserts the raw error message text ("not permitted") never reaches the annotation line, confirming the module's "nothing but the class token and structured projection leaves this module" invariant still holds after the refactor (creditStopText → cliOnlyRun extraction).
  • The docs/conventions/instruction-exception-register/README.md register referenced by this skill's instruction-surface lens is not present in this checkout, so that specific list wasn't consulted; recognition was done by consequence instead, and no matching protected-class rule was found to be weakened by this diff's doc/comment edits (they just correct and narrow the same 401/402/403 statement consistently everywhere).
  • Remaining changes (action.yml, README.md, intake-triage.yml comments, test files) are documentation/test-only and consistent with the code behavior.

claude-lane-summary: lane=claude-security-review sha=d75fdf793e8e9928664e522651ba8c86bfd6a40d run=39544958991
· Branch

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Code review in progress

  • Gather context (PR diff, CLAUDE.md/AGENTS.md/REVIEW.md, path-scoped rules)
  • Review changed files for correctness/maintainability
  • Check path-scoped rule compliance (pr-body-contract, etc.)
  • Verify candidate findings
  • Post findings and summary

View job run

gitleaks' generic-api-key rule read the API errors page's example
request id after `request-id=` as a key in two test lines. The fixtures
now use req_fake0000000000000000, and .gitleaksignore records the two
findings in the earlier commit by fingerprint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d75fdf793e

ℹ️ 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".

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

claude-security-review has reviewed this pull request through d2bf938; a later push is reviewed from there.

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 20s —— View job


Code review complete

  • Gather context (PR diff, CLAUDE.md/AGENTS.md/REVIEW.md, path-scoped rules)
  • Review changed files for correctness/maintainability
  • Check path-scoped rule compliance (pr-body-contract, etc.)
  • Verify candidate findings
  • Post findings and summary

Scope: code-review lane only (security findings are out of scope here since pr-review-security.yml runs a dedicated security lane per REVIEW.md).

Checks performed:

  • Traced the new cliOnlyRun extraction, apiErrorFacts, and the 403 bail added to creditStopText in classify.cjs against every new test case — the 403-never-credit-stop guard, the closed-pattern extraction of error_type/error_code/request_id, and the "model output present → read nothing" gate all check out against their assertions.
  • Verified NEXT_STEPS.auth.statuses = [401, 402] and handsOff() in lane.cjs correctly stop (not hand off) on a 403, including the no-numeric-status case.
  • Checked legRecord's new fields, errorTokens, the summary table's new column/separator count, and run's error-line suffix — all internally consistent and match the new tests' expected strings byte-for-byte.
  • Confirmed the .gitleaksignore entries (commit 1b6fe5d, specific line numbers) against that commit's actual file contents — the referenced lines really did hold the higher-entropy req_011CSHoEeqs5C35K2UUqR7Fy fixture before the later commit swapped in the low-entropy fake.
  • Checked the pr-body-contract.md path rule: the PR body opens with Refs: #840 (link without closing) and includes ## Summary, ## Fix, ## Verification, ## Related — compliant.
  • No standards index paved-path row exists in this repo, so no paved-path findings apply.
  • Could not execute the test suites myself (this lane has no Bash access — Read/Grep/Glob only); the 68/68, 52/52, 548/548 counts and the mutation-testing claim in the PR body are author-claimed and unverified by me, though the test code I read matches what the PR body describes.

No correctness or maintainability findings. The 403-vs-401/402 split is implemented consistently everywhere it's referenced (lane.cjs, classify.cjs, both action.yml files, README.md, intake-triage.yml comments), and the new tests exercise the behavior changes described in the PR body.

claude-lane-summary: lane=claude-review sha=46b6b10f55ab85852a1c1d07eb7dc0ec61955712 run=39545120033

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 53s —— View job


Security review complete

Incremental review scoped to changes since d75fdf7, limited to:

  • .github/actions/report-lane-outcome/classify.test.cjs

  • .github/actions/report-lane-outcome/outcome-step.test.cjs

  • .github/actions/run-claude-cli/lane.test.cjs

  • .gitleaksignore

  • Gather context (incremental diff, AGENTS.md/REVIEW.md, pr-body-contract rule)

  • Review changed files for security issues

  • Verify candidate findings

  • Post findings and summary

Findings: none.

What changed here is test-fixture-only: the real-looking example request_id (req_011CSHoEeqs5C35K2UUqR7Fy, Anthropic's own published API-errors doc example) is replaced with a clearly-fake, low-entropy placeholder (req_fake0000000000000000) in all three 403 test files, plus a new .gitleaksignore suppressing the two generic-api-key matches gitleaks raised against the prior literal at the historical commit.

I checked this for the things that matter from a security standpoint:

  • Value sensitivity: a request_id is a support/debugging correlation ID, not a credential — not secret material even before the swap.
  • .gitleaksignore precision: both entries are pinned to an exact commit, file, rule, and line (1b6fe5d9…:…/classify.test.cjs:generic-api-key:795 and …/outcome-step.test.cjs:generic-api-key:538). I diffed those line numbers against the actual historical blobs at 1b6fe5d9 and they match exactly — this isn't a broad or stale suppression that could mask a real future secret.
  • Completeness vs. over-suppression: lane.test.cjs carried the same literal at that commit (const REQUEST_ID = "req_011CSHoEeqs5C35K2UUqR7Fy";) but has no ignore entry. That's consistent, not a gap — that line is a bare identifier assignment with no key/token/auth/credential keyword nearby, so gitleaks' generic-api-key rule (which needs a keyword context) wouldn't have flagged it in the first place, unlike the other two lines which render into strings containing credential=…KEY / class=auth. No evidence this ignore list is incomplete in a way that would hide a genuine secret.
  • Scan scope: confirmed via .github/actions/gitleaks/scan.sh that PR runs scan BASE_SHA..HEAD in git mode, so the historical commit 1b6fe5d9 is in-range and the ignore entries are actually load-bearing, not dead weight.

No logic, auth, or injection surface in this slice — it's test data and a secret-scanner suppression list, and both check out.

(GitHub Actions hardening, if any, is zizmor's lane and out of scope here.)

claude-lane-summary: lane=claude-security-review sha=46b6b10f55ab85852a1c1d07eb7dc0ec61955712 run=39545120033

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

claude-review has reviewed this pull request through d2bf938; a later push is reviewed from there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 10s —— View job


Code review complete

  • Gather context (incremental diff, AGENTS.md/REVIEW.md, path-scoped rules)
  • Review changed files for correctness/maintainability
  • Check path-scoped rule compliance (pr-body-contract, etc.)
  • Verify candidate findings
  • Post findings and summary

Scope: incremental review of the two files changed since 46b6b10 — .github/actions/report-lane-outcome/classify.cjs and classify.test.cjs (commit d254db2, which fixes Codex's finding that apiErrorFacts ignored errors[] on the error_during_execution result variant). Everything else in the PR was reviewed at 46b6b10 and is unchanged. Security findings are out of scope for this lane per REVIEW.md (a dedicated security lane runs on this repo).

What I checked:

  • Traced apiErrorFacts's new errors[]-reading line against cliOnlyRun's guarantees and the errorMessage() test fixture shape (type: "result", subtype: "error_during_execution", errors: [...]) — the fix correctly mirrors creditStopText's existing result.errors handling (same toStringLikeJq mapping, same closed-pattern extraction afterward), and the new test (classify.test.cjs:817-827) exercises exactly the shape Codex flagged.
  • Checked the new test doesn't conflict with any existing readRunRecord/classifyExecutionFile test that exercises the error_during_execution variant — none assert apiErrorFacts-sourced fields for that variant, so no regression.
  • Confirmed the regex extraction (error_type, error_code, request_id) still only reads inside the module and the closed patterns are unchanged.
  • Checked the pr-body-contract.md path rule — unaffected by this incremental change (PR-body-level, already confirmed compliant in the prior review round).

Finding (1, Suggestion/maintainability): posted inline on classify.cjs:206-214 — apiErrorFacts's new text assembly is now a near-identical duplicate of creditStopText's (lines 168-174). This duplication was completed, not pre-existing: before this commit apiErrorFacts read only 2 of the 3 sources, which is the exact gap Codex caught. The fix copied the missing line rather than sharing the logic, so the two copies can silently drift apart again. Suggest extracting a shared cliOnlyText(run) helper. Verified adversarially via a review:lane-verifier subagent, which confirmed both the duplication and that it was newly completed by this commit.

I could not run node --test myself in this lane (no Bash execution); the PR body's test counts are author-claimed and unverified by me, though the test code itself matches the behavior it claims to cover.

claude-lane-summary: lane=claude-review sha=d254db291f254c43579c619bfac97431705fe4d8 run=39602962977

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 38s —— View job


Security review complete

Incremental review scoped to changes since 46b6b10, limited to:

  • .github/actions/report-lane-outcome/classify.cjs

  • .github/actions/report-lane-outcome/classify.test.cjs

  • Gather context (incremental diff, AGENTS.md/REVIEW.md, pr-body-contract rule)

  • Review changed files for security issues

  • Verify candidate findings

  • Post findings and summary

Findings: none.

This slice is the fix for Codex's earlier P2 finding on this PR ("Extract error facts from error-variant result messages"): apiErrorFacts (classify.cjs#L196-L217) now also scans run.result.errors[] (via the existing toStringLikeJq helper) for the error_during_execution SDK variant, where the API error body lives in errors[] instead of result.

What I checked:

  • No widening of the public-surface boundary. The module's header invariant (classify.cjs#L9-L15) is that result and errors[] are raw, potentially sensitive free text, and nothing but the class token and the structured projection may leave this module. The new errors[] read is gated by the same cliOnlyRun check used for the pre-existing result.result and assistant-text reads, and the three extracted fields (errorType, errorCode, requestId) still go through the same closed, bounded-charset regexes ([a-z_]{1,40}, [a-z0-9_]{1,64}, req_[A-Za-z0-9]{8,64}) as before — so arbitrary text from errors[] still can't escape into an annotation, summary cell, or log record.
  • toStringLikeJq reuse is safe. It's the same helper already used in creditStopText for the identical errors[] shape, so this isn't new untested code reading untrusted structured data — it's the same proven projection applied to one more consumer.
  • Test fixture is inert. The new test's request_id (req_fake0000000000000000) and error_code (workspace_access_denied) are synthetic, consistent with the rest of the suite's fake-fixture convention — no real credential or identifier material.
  • Scope check: git diff 46b6b10..HEAD on these two files matches .claude-lane/incremental.diff exactly — nothing outside the stated scope changed.

No logic, auth, or injection surface introduced by this slice.

claude-lane-summary: lane=claude-security-review sha=d254db291f254c43579c619bfac97431705fe4d8 run=39602962977
· Branch

…readers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 34s —— View job


Security review complete

Incremental review scoped to changes since d254db2, limited to:

  • .github/actions/report-lane-outcome/classify.cjs

  • Gather context (incremental diff, AGENTS.md/REVIEW.md, pr-body-contract rule)

  • Review changed files for security issues

  • Verify candidate findings

  • Post findings and summary

Findings: none.

This slice is the pure refactor addressing the earlier code-review duplication finding: the three-source "CLI-only text" assembly (result.result, errors[] via toStringLikeJq, assistant text blocks) is extracted into a single cliOnlyText({ result, content }) helper, and both creditStopText (L166-L182) and apiErrorFacts (L208-L219) now call it instead of each inlining their own copy.

What I checked:

  • No behavior change. Both call sites still pass the same cliOnlyRun(messages) result ({ result, assistants, content }); cliOnlyText destructures only { result, content }, which is exactly what each copy used before. The join order and source list (result.result, errors[] via toStringLikeJq, assistant text) are unchanged byte-for-byte from the prior duplicated versions.
  • No widening of the module boundary. The closed-pattern regex extraction in apiErrorFacts ([a-z_]{1,40}, [a-z0-9_]{1,64}, req_[A-Za-z0-9]{8,64}) and the 403-never-credit-stop guard in creditStopText are both untouched by this diff — the refactor only moved where the text corpus is assembled, not what reads it afterward or what gets returned.
  • Fixes the drift risk, doesn't introduce one. This is the shared-helper extraction the prior review round suggested specifically so the two text-assembly copies couldn't silently diverge again (e.g. one gaining a source or a filter the other lacks). That risk is now closed rather than open.
  • Scope check: git diff d254db2..HEAD --stat confirms only classify.cjs changed, matching .claude-lane/incremental.diff exactly — no test file or other surface in scope.

No logic, auth, or injection surface touched by this slice.

claude-lane-summary: lane=claude-security-review sha=d2bf938fc6860f7fdd1c4e521f7f07e8902a14b0 run=39603758962
· Branch

@claude

claude Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 2s —— View job


Code review complete

  • Gather context (incremental diff, AGENTS.md/REVIEW.md, path-scoped rules)
  • Review changed lines in classify.cjs for correctness/maintainability
  • Check path-scoped rule compliance (pr-body-contract, etc.)
  • Verify candidate findings
  • Post findings and summary

Scope: incremental review of the one file changed since d254db2 — .github/actions/report-lane-outcome/classify.cjs (commit d2bf938). Everything else in this PR was reviewed at prior commits and is unchanged. Security findings are out of scope for this lane (dedicated security lane runs on this repo per REVIEW.md).

What changed: this commit extracts the shared cliOnlyText(run) helper (classify.cjs#L164-L174) that creditStopText (#L186) and apiErrorFacts (#L217) both now call, resolving the duplication I flagged earlier on this PR.

No findings. Verified:

  • cliOnlyText({ result, content }) assembles the same three sources, in the same order, as the two prior inline copies (result.result text, errors[] via toStringLikeJq, assistant text blocks) — a pure extraction with no behavior change.
  • creditStopText's destructuring narrowed from { result, assistants, content } to { result, assistants } since content is no longer used directly in that function (it's threaded through cliOnlyText(run) instead) — correct, no dead binding left behind.
  • Both call sites pass the full run object ({ result, assistants, content }); cliOnlyText only destructures the two fields it needs, so the extra assistants key is harmless.
  • The module's public-surface invariant (only the class token and apiErrorFacts' closed-pattern values may leave the module) is unaffected — this is an internal reshuffle of how CLI-only text is assembled, not a new read path.
  • No path-scoped rule (pr-body-contract.md) is affected by a code-only, non-PR-body change. No standards index/paved-path row exists in this repo to check against.

This closes out the maintainability suggestion from the prior review round cleanly.

claude-lane-summary: lane=claude-review sha=d2bf938fc6860f7fdd1c4e521f7f07e8902a14b0 run=39603758962

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 21, 2026
Merged via the queue into main with commit 5e18f3d Oct 21, 2026
30 checks passed
@kyle-sexton
kyle-sexton deleted the fix/run-claude-cli-403-stop branch October 21, 2026 13:01
kyle-sexton added a commit to melodic-software/standards that referenced this pull request Oct 21, 2026
…832)

Refs: melodic-software/ci-workflows#840
Refs: melodic-software/ci-workflows#841

## Summary

Registers ci-workflows

[v0.58.0](https://github.com/melodic-software/ci-workflows/releases/tag/v0.58.0)
(`5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c`) contracts for
`intake-triage.yml` and `intake-label-needs-triage.yml`, so

[claude-code-plugins#8800](melodic-software/claude-code-plugins#8800)
can repin both intake callers from v0.56.0 (`1bb8953`) to v0.58.0 and
intake
gets the 401/402 subscription handoff.

**Owner review needed.** Unlike #829, `intake-triage` is not
byte-identical to
the SHA its copied entry reviewed. Its contract surface is unchanged,
but its
steps changed, so the gate cannot auto-approve it and the copy rests on
the
review below. The README rollout line says "sign-off pending"; replace
it with
"signed off by hand on <date>" when you sign off.

## Fix

- `components/runner-policy/policy.json`: verbatim copies of the v0.56.0
  (`1bb8953`) entries at `5e18f3d6`, for `intake-triage` and
`intake-label-needs-triage`. No input, secret mapping, caller permission
or
  routing is added or widened.
- `components/runner-policy/README.md`: the v0.58.0 rollout line,
sign-off
  pending.
- `components/runner-policy/runner-policy.test.mjs`: a test that both
v0.58.0
entries equal their v0.56.0 entries and are the only two keys at that
SHA.

### Review basis

Git blob SHAs (`git rev-parse <sha>:.github/workflows/<file>`):

| File | `1bb8953` (v0.56.0) | `5e18f3d6` (v0.58.0) |
|---|---|---|
| `intake-label-needs-triage.yml` | `8d274a66` | `8d274a66` |
| `intake-triage.yml` | `d79b7e9e` | `8ff8eac3` |

`intake-label-needs-triage.yml` is byte-identical, so its copy has the
same
basis as #829.

For `intake-triage.yml`, parsing both versions and comparing them
structurally: `on.workflow_call` inputs (except the `cli-version`
description), secrets and outputs are identical, as are the top-level
permissions and every job's `permissions` and `runs-on`. The two jobs
that
hold `issues: write`, `apply` and `skipped`, are identical in full. The
`claude`, `subscription` and `status` jobs changed (ci-workflows#840,
#841).
Please review these changes:

1. **CLI default goes from the pinned `2.1.304` to `latest`.** When the
   caller passes no `cli-version` and sets no `CLAUDE_LANE_CLI_VERSION`
variable, run-claude-cli now installs whatever npm resolves as latest at
   run time, with a Claude credential in its environment

([L200](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L200),

[L527](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L527),

[L1053](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L1053)).
   The contract does not model this. It is a supply-chain change.
2. **The subscription token is used in more cases.** The secret mapping
is
   unchanged, but the `subscription` job, which holds
   `CLAUDE_CODE_OAUTH_TOKEN`, now runs when `handoff == 'true'`: after a
credit stop as before, and also when the API refuses the key with status
   401 or 402. A 403 stops the run

([L855](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L855)).
3. A new `handoff` job output on `claude` and `subscription`

([L340](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L340),

[L866](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L866)).
   These are job outputs, not `workflow_call` outputs.
4. `fallback-reason: auth` in the subscription job's lane record

([L1295](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L1295)),
   and a status-job warning and `class=auth` when the key was refused

([L1671](https://github.com/melodic-software/ci-workflows/blob/5e18f3d6cebd6fa5e66b0941ee0f7ed6ba288d6c/.github/workflows/intake-triage.yml#L1671)).

The contract has no allowlist entry for the `skipped-label` input. That
was
already true at v0.56.0, and this PR leaves it unchanged.

## Verification

- `npm run test:runner-policy`: 324 pass, 0 fail, including `✔ both
intake
contracts at the v0.58.0 tag copy their v0.56.0 entries forward
verbatim`.
- `npm run lint:runner-policy`: `Runner policy passed.`
- End to end, against a temp copy of the claude-code-plugins#8800
worktree's
  `.github` with both intake callers repinned to `5e18f3d6`
  (`--repository-visibility public`):
  - with #8800's vendored `runner-policy.mjs` and policy: two
`runner-target-contract` failures, `intake-label-needs-triage` ("carries
a
    reviewed allowedCallerPermissions grant; its steps cannot be proven
    unchanged by this surface diff, so auto-approval is declined") and
    `intake-triage` ("inputs changed since the previously reviewed
    ...intake-triage.yml@182aca3..."), and no others;
- with the vendored `runner-policy.mjs` and `--policy` set to this
branch's
    `policy.json`: `Runner policy passed.`;
- with this branch's `runner-policy.mjs` and `policy.json`: `Runner
policy
    passed.`
- lefthook pre-commit (typos, editorconfig, markdownlint, gitleaks,
biome):
  clean.

## Related

-
[claude-code-plugins#8800](melodic-software/claude-code-plugins#8800)
  can repin to v0.58.0 once this merges and syncs.
- v0.58.0 also changes `pr-review.yml` and `pr-review-security.yml` (4
lines
  each). This PR adds no contracts for them. #8800 calls both at v0.55.0
  (`3a2c748`), which already has contracts.
- Precedent: #829 (v0.56.0 verbatim copies), #828.

🤖 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