Skip to content

ci(evals): run evals on the API key alone, never subscription tokens - #18268

Merged
kyle-sexton merged 4 commits into
mainfrom
ci/eval-legs-api-key-only
Nov 23, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
ci/eval-legs-api-key-only

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Closes #18272. Owner decisions Q14 (https://github.com/melodic-software/architecture/blob/82e424b1e753943442cd6359f3a6896a5f661f2b/docs/owner-decisions.md#L341) and Q53 (https://github.com/melodic-software/architecture/blob/82e424b1e753943442cd6359f3a6896a5f661f2b/docs/owner-decisions.md#L340); #18272 quotes the owner's words and names each loosened check. Merges after #18269, which adds docs/review/evals.md.

Summary

The suite and label legs of pr-run-plugin-evals.yml, the measuring passes of maintenance-measure-skill-edit-pass.yml and the generate-edit proposer fell back from the maintenance API key to the subscription and central fallback tokens on their own. Flipping CLAUDE_EVALS_DISABLED to false would have let any eval run spend plan usage unasked. Compare mode was already key-only (Q136, #18234).

Fix

  • The subscription and fallback legs are deleted from pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml, along with generate-edit's subscription and fallback steps. The pass takes only MAINTENANCE_CLAUDE_API_KEY from its callers.
  • A key that is off, empty, skipped by the credit gate or stopped mid-run reaches a Stop at the key's stop step. It warns on a suite or label run, and fails a measuring pass or the proposer, so no caller reads an artifact that was never uploaded.
  • lane-funding.json lists the eval lanes key-only. callers.test.mjs gives them a permanent key-only exemption that cites docs/review/evals.md, replacing the ci(lanes): run every model lane on the same key, subscription and fallback chain #13586 "not yet" entry, and it now covers compare mode too.

Scope

Tradeoffs

Deleting the legs instead of gating them behind a variable removes about 1,900 lines nothing would run, and avoids a second switch beside CLAUDE_EVALS_DISABLED. Bringing the subscription path back means reverting this PR.

Risk

Low: evals are switched off org-wide (CLAUDE_EVALS_DISABLED=true), and the change only removes credentials. select-model-credential at the pinned commit still prints its own notice ("the subscription job runs") when the credit gate skips the key; the stop step that follows says what actually happens.

Verification

  • 1,052 tests across the 13 related test files pass locally (node --test --test-concurrency=4): callers.test.mjs, check-kill-switch, check-upstream-status, plugin-eval/*, maintenance-measure-skill-edit/*, release-eval-hold, label-unblocked.
  • The two credential-legs.test.mjs truth tables are rewritten. The old ones held the deleted three-leg chain to its pre-action expressions; the new ones drive every key state (set or empty, switched off, gate-skipped) and every launcher outcome from the pinned run-claude-cli contract through each workflow's own conditions.
  • actionlint and zizmor --offline are clean on the three workflows.
  • git grep -cE "secrets\.[A-Z_]*CLAUDE_CODE_OAUTH_TOKEN" on both eval workflows finds nothing.
  • The pre-commit comment lint removed the comment blocks this change touched.

Related

After merge

Mark issue 18235 (the subscription headroom pre-step) moot by hand, since no subscription eval path is left, and tell the AI Hero session (#18188, #18222) that the switch may be set to false for a decided, costed run once the org API key returns.

🤖 Generated with Claude Code

kyle-sexton and others added 2 commits November 22, 2026 19:50
Delete the subscription and fallback legs from pr-run-plugin-evals.yml
and maintenance-measure-skill-edit-pass.yml, and from generate-edit in
maintenance-measure-skill-edit.yml (owner decision Q14). A key that is
off, empty, skipped by the credit gate or stopped mid-run now ends the
run at a "Stop at the key's stop" step: a warning for a suite or label
run, a failure for a measuring pass or the proposer, so no caller reads
an artifact that was never uploaded.

The pass takes only MAINTENANCE_CLAUDE_API_KEY from its callers, and
lane-funding.json lists the eval lanes key-only. callers.test.mjs gives
them a permanent key-only exemption citing docs/review/evals.md instead
of a #13586 "not yet" entry. The two credential-legs truth tables are
rewritten for the key-only chain.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body conforms to the issue-linkage contract. Nothing to do.

@github-actions github-actions Bot added the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 23, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 23, 2026 00:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T00:55:12.907201Z a318a85 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.

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 087c5969c0476a51fe112e8216a41be64fb4bfc8: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18268, incremental (cad3e64 → 087c596)

No security issues found. This review covered only the new push and reported blocking findings only, since this lane already reviewed an earlier head of the pull request.

I read 1 of 1 changed files in full.

What changed: the push edits one line in .github/scripts/lib/model-job-permissions.test.mjs. That line is the // test-scope: header comment, and the push adds .github/actions/resolve-config/package.json to the files it says the test reads. The header only declares which files the test reads. No test logic, assertion, workflow, action or trust control changed. The rule that model jobs hold no write scope, write credential or dependency cache (ADR 0085) still runs exactly as it did at the previously reviewed head.

Controls checked: the push touches no merge hold, trusted-actor list, lane-token scope, kill switch or plugin manifest. Declaring that the test reads resolve-config's package.json gives that action nothing new. It is metadata about what the test inputs.

PR context: the description matches the pull request, and nothing in it is addressed to the review lane.

Spend: this push changes no spend.

critical-findings: 0

@github-actions github-actions Bot removed the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 23, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 2 inline finding(s) on a318a85eb2065ccb437a11ce7a4ca68bb872eff1; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 087c5969c0476a51fe112e8216a41be64fb4bfc8: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #18268, cad3e647..087c5969

No blocking findings. I read the whole incremental diff, which is one file: .github/scripts/lib/model-job-permissions.test.mjs. This lane already reviewed an earlier head, so this review reports blocking findings only.

What changed. The // test-scope: header now lists .github/actions/resolve-config/package.json as well. The test does read that file: line 11 loads yaml through createRequire(new URL("../../actions/resolve-config/package.json", import.meta.url)). The header now names a real input of the test, so a change to that manifest selects the test. No behavior changed.

Earlier findings, checked again under "Fail a change that loosens a check"

  • The detector floor drop from 40 to 36 (model-job-permissions.test.mjs:115, discussion_r4660935994) now passes. The PR closes Run CI evals on the API key alone, never on subscription tokens #18272, and its "Done when" names this floor drop and gives the reason: the four deleted subscription and fallback legs, under owner decision Q14. The spec names this loosening and says why, so it passes.
  • The leg exemptions and the widened EXEMPTION_ISSUE in callers.test.mjs (discussion_r4660908168) also pass. Run CI evals on the API key alone, never on subscription tokens #18272 names each exemption (run-eval in both eval workflows, compare-before, compare-after, measure-baseline, measure-baseline-again, generate-edit, measure-edit). It also names the (docs/review/evals.md) suffix and gives the reason: these lanes are key-only by a recorded decision.
  • The prompt had no loosened_check_spec: line, so I could not confirm the issue author is on the trusted-actor list. I judged the closing issue's text as the spec.

Other notes

  • Loosened checks would be marked: fail (lane default: the prompt had no loosened_check_verdict: or loosened_check_patterns: line); patterns: 0. The prompt also had no loosened_check_decision_record: line, so I did not check the citation requirement.
  • Closing issue Run CI evals on the API key alone, never on subscription tokens #18272: its other "Done when" items cover files this push did not touch, and this lane reviewed them at earlier heads. The test results in the PR body are the author's claims; I ran nothing.
  • Spend: none new. This push changes only a test-scope comment.
  • Embedded text: none seen that tries to steer the review.

Verifier dropped 0 of 0 candidates.

The stop step fired whenever the credential step's present output was
not 'true', which also held when an earlier step (the kill switch, a
trust check) failed and skipped the credential step, so it logged a
false "API key stopped" next to the real reason. It now requires the
credential step to have succeeded, and the truth table covers a skipped
credential step.

model-job-permissions.test.mjs's floor drops from 40 to 36 model jobs:
the four deleted subscription and fallback legs are the difference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on cad3e6478e1df91aba8043922d5cd6e342d7d7f3; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

The pr-verify verifier failed head 087c5969c0476a51fe112e8216a41be64fb4bfc8. What it wrote, as data:

What it wrote (30 lines)
Summary: Issue #18272 asks for evals to run on MAINTENANCE_CLAUDE_API_KEY alone, and the diff
  delivers every done-when item. It deletes the subscription and fallback legs from
  pr-run-plugin-evals.yml and maintenance-measure-skill-edit-pass.yml, and generate-edit's
  subscription and fallback steps. The pass's workflow_call.secrets and its callers now take only
  the key. A "Stop at the key's stop" step fires when the key is off, empty, skipped by the credit
  gate or handed off mid-run. It warns on a suite or label run and exits 1 on a measuring pass or
  generate-edit. It requires steps.credential.outcome == 'success', so a kill-switch or trust-check
  stop is not blamed on the key. lane-funding.json lists the lanes key-only, and both
  credential-legs tests are rewritten as key-only truth tables. All Test Node jobs passed on the
  judged head (e.g.
  https://github.com/melodic-software/claude-code-plugins/actions/runs/45092807803/job/137426274917),
  and those lanes cover the changed .mjs tests. The workflow logic looks correct. The change to
  check-kill-switch.test.mjs only drops jobs that no longer exist. The unasked test-scope addition
  to model-job-permissions.test.mjs widens test selection and is harmless. It blocks for one reason:
  two changes loosen checks. callers.test.mjs adds permanent leg-chain exemptions and widens
  EXEMPTION_ISSUE to accept a new suffix. model-job-permissions.test.mjs lowers its detector floor
  from 40 to 36. The issue names both, but it links owner-decisions.md without a #L<line> anchor and
  gives no verbatim: quote of the owner's words. So, by the rule for loosened checks, the spec does
  not yet authorize them. Separately, the new exemption reasons cite docs/review/evals.md, which
  #18269 adds. Per the review comments this PR should merge only after #18269.
- `.github/actions/resolve-config/callers.test.mjs:10882`: this widens EXEMPTION_ISSUE to accept
  `(docs/review/evals.md)`, and lines 10870-10880 add permanent subscription/fallback exemptions for
  eight eval lanes. Both loosen the leg-chain check. Issue #18272 names them, but it has no line
  link to the owner's decision (`https://github.com/melodic-software/architecture/blob/<commit or
  main>/docs/owner-decisions.md#L<line>`) and no `verbatim:` quote of the owner's words. Add both to
  issue #18272, or drop the loosening.
- `.github/scripts/lib/model-job-permissions.test.mjs:115`: lowering the detector floor from 40 to
  36 model jobs loosens a numeric guard. Issue #18272 names this change but has neither the
  `owner-decisions.md#L<line>` link nor the `verbatim:` quote. Add both to the issue so the lowered
  floor is authorized.

This pull request leaves the merge queue, and ci-status holds it out while it carries pr-verify-failed. A pr-verify pass removes the label, at a new commit or at this same head: once a trusted person edits the body, and only trusted people have edited it since the fail, this head is judged again, so a fail on the body or the issues it links needs only the body fixed, no new commit.

@github-actions github-actions Bot added pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. and removed pr-verify-failed pr-verify failed this head; a pass at a new commit, or after a trusted body edit, removes it. labels Nov 23, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit 7559c71 Nov 23, 2026
94 checks passed
@kyle-sexton
kyle-sexton deleted the ci/eval-legs-api-key-only branch November 23, 2026 01:56
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run CI evals on the API key alone, never on subscription tokens

1 participant