Skip to content

feat(pr-pipeline): gate lanes on the repository kill switch as well as the org one - #7233

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/kill-switch-repo-name
Oct 11, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/kill-switch-repo-name

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Refs: #6720

Hold: a human merges this.

Summary

The runner gate now reads two switches: the org CLAUDE_LANES_DISABLED and a new per-repository CLAUDE_LANES_REPO_DISABLED. A lane proceeds only when both are exactly false. One repository can now be stopped without creating a same-name repository variable, which shadows the org value in vars (#6720).

#6720 stays open after this merges: a repository variable named CLAUDE_LANES_DISABLED still shadows the org value at this gate, and the read lane makes no broker call, so the read lane still runs under an org-wide stop while such a shadow exists. Closing it needs the broker check for every lane (design option Q1-C), which is still waiting on a decision: a new read-only broker check endpoint, or a read mint.

Fix

  • check-kill-switch gets a repo-value input and proceeds only when value and repo-value are both exactly false. Unset, empty and every other value stop the lane.
  • pr-run-activity-read.yml, pr-run-activity-write.yml and eval-browser-dispatch.yml pass vars.CLAUDE_LANES_REPO_DISABLED as repo-value.
  • Docs: the action README, pr-run-activity.md (variables, broker 403 row) and the pipeline README.

Merge order

Merge this only after the github-iac PR that declares CLAUDE_LANES_REPO_DISABLED=false in this repository is merged and deployed, and gh variable list -R melodic-software/claude-code-plugins shows it as false. Until then the variable is unset and this gate stops every lane in this repository. That is the safe direction, but it is still an outage.

Verification

  • npm test in .github/actions/check-kill-switch: 15 tests, 15 pass; 6 failed before the change (every case that needs the repository switch). Cases: org {unset, empty, true, FALSE, " false"} × repo {false, true, unset} stop; repo {unset, empty, true, FALSE, " false"} with org false stop; only (false, false) proceeds.
  • scripts/run-outside-node-suites.sh: all suites pass.
  • actionlint on the three changed workflows: clean. markdownlint-cli2 on the three changed docs: 0 issues.

Related

  • melodic-software/azure-iac#21: the broker reads CLAUDE_LANES_REPO_DISABLED and denies a same-name shadow
  • melodic-software/github-iac#690: declares CLAUDE_LANES_REPO_DISABLED per lane repository

🤖 Generated with Claude Code

…s the org one

check-kill-switch takes a second input, repo-value, fed
vars.CLAUDE_LANES_REPO_DISABLED, and proceeds only when it and the org
CLAUDE_LANES_DISABLED both read exactly "false"; an unset repository
switch stops the lane. One repository now stops through its own name
instead of a same-name repository variable, which shadows the org value
in vars (#6720). The gate cannot see such a shadow; the broker denies a
write lane's mint while one exists, and the read lane is not covered yet.

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

github-actions Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

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

@kyle-sexton
kyle-sexton marked this pull request as ready for review October 11, 2026 21:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 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-11T21:20:26.363555Z a9f0f7f 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 11, 2026 •

Copy link
Copy Markdown
Contributor

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


Reviewing PR #7233

  • Gather context (PR body, diff, CLAUDE.md/AGENTS.md)
  • Review changed files for correctness/maintainability
  • Adversarially verify candidate findings
  • Post inline comments + summary

Summary

Reviewed the diff (git diff origin/main...HEAD) against a9f0f7f for correctness and maintainability, scoped to this lane (security findings route to /review:security-review, which runs separately in this repo).

No blocking findings. The implementation is sound and internally consistent:

  • checkKillSwitch(value, repoValue) (check-kill-switch.mjs#L9-L13) correctly fails closed: only the exact pair ("false", "false") proceeds; unset, empty, or any other value on either input stops the lane.
  • All three call sites (eval-browser-dispatch.yml, pr-run-activity-read.yml, pr-run-activity-write.yml) consistently pass both value and the new repo-value — no caller was missed.
  • action.yml's new repo-value input defaults to "", matching the existing value input's fail-closed default.
  • The test suite's new cases (org/repo cross-product of not-false values, both-unset CLI case) match the implementation's behavior; I read through the logic by hand but did not execute npm test myself (sandbox denied the node --test invocation), so the PR's claimed "15 tests, 15 pass" is author-reported and unverified by me.
  • Docs (action README, pr-pipeline/README.md, pr-run-activity.md) accurately reflect the new two-switch gate for the parts that live in this repository.

One thing I did not turn into a finding because it's unverifiable from this repository alone: the updated broker 403 table row in pr-run-activity.md describes behavior (CLAUDE_LANES_REPO_DISABLED causing a broker-side 403) that depends on azure-iac#21, which this PR lists only as "Related," not as a merged prerequisite. If that broker-side change isn't live yet, this row documents target-state behavior as current fact. Worth double-checking the azure-iac PR's merge status before/soon after this merges, but I can't confirm either way from here.

The PR's own "Merge order" section already calls out the CLAUDE_LANES_REPO_DISABLED=false dependency on the github-iac PR and the resulting outage window if merged out of order — that tradeoff is explicit and accepted, not a gap I'm flagging.

@claude

claude Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

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


Security review — no issues found

  • Gather context (PR diff, changed files)
  • Review check-kill-switch action logic for the new repo-value input
  • Review workflow changes (pr-run-activity-read.yml, pr-run-activity-write.yml, eval-browser-dispatch.yml)
  • Review docs changes
  • Check for instruction-surface deletions
  • Post findings

Reviewed the diff against origin/main...HEAD (head a9f0f7f). Scope: the new repo-value input and REPO_KILL_SWITCH_VALUE env var in check-kill-switch/action.yml, the updated checkKillSwitch(value, repoValue) gate in check-kill-switch.mjs, the three workflow call sites, and the doc updates.

No security issues found.

Notes from the review (informational, not findings):

  • The gate stays fail-closed: checkKillSwitch requires both value === "false" and repoValue === "false" via strict equality, so an unset, empty, or mistyped repo-value input (the expected state until the companion github-iac PR lands, per this PR's own "Merge order" section) stops the lane rather than silently permitting it.
  • The new REPO_KILL_SWITCH_VALUE is passed into the composite action via the env: map, not interpolated into the run: script body, so it carries no shell/expression-injection surface — consistent with the existing KILL_SWITCH_VALUE handling.
  • writeOutputs in check-kill-switch.mjs already guards against output-delimiter injection (unique UUID delimiter per write); unchanged by this PR.
  • Test coverage (check-kill-switch.test.mjs) explicitly exercises the fail-closed matrix for the new second switch (org not-false × every repo value, repo not-false × org false, CLI unset cases), matching the verification claims in the PR description.
  • This PR does not change any GitHub Actions trust boundaries (no new triggers, no permission widening, no new unpinned actions) and does not weaken any standing instruction — the docs/action description changes only add a second required condition to the existing gate, they don't remove or soften the existing "treat unreadable as off" behavior.
  • The PR body is explicit that this does not close pr-run-activity-read proceeds when the org kill switch is true and the repo variable is false #6720 (a same-named repository variable can still shadow the org value in vars, and the read lane makes no broker call); that residual gap is disclosed by the author and tracked separately, not something this diff introduces or hides.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@kyle-sexton

Copy link
Copy Markdown
Member Author

Re the issue-linkage contract comment (github-actions[bot]):

Finding Classification Basis
Negated closing reference "does not close #6720" still registers a closing reference VALID (fix now) verified: gh pr view 7233 --json closingIssuesReferences returned 6720, so merging would auto-close #6720, which this PR states it does not resolve

Fix: reword the body sentence to "#6720 stays open after this merges: ..." so no closing keyword precedes #6720; the Refs: #6720 line stays. This is a PR body edit, no commit.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Follow-up to the issue-linkage finding: PR body edited (no commit). gh pr view 7233 --json closingIssuesReferences now returns []; Refs: #6720 is the only link.

@kyle-sexton

Copy link
Copy Markdown
Member Author

Re the claude-review summary: no findings to classify. On the informational note about the broker 403 row in pr-run-activity.md depending on azure-iac#21:

Note Classification Basis
Broker 403 row may describe target state if melodic-software/azure-iac#21 is not live INCORRECT (concern does not hold) verified: gh pr view 21 -R melodic-software/azure-iac shows MERGED at 2026-10-11T21:04:38Z; github-iac#690 MERGED at 21:13:51Z; CLAUDE_LANES_REPO_DISABLED reads false in this repo

The security-review summary reported no issues; nothing to classify there.

@kyle-sexton
kyle-sexton added this pull request to the merge queue Oct 11, 2026
Merged via the queue into main with commit 2614c71 Oct 11, 2026
45 of 55 checks passed
@kyle-sexton
kyle-sexton deleted the feat/kill-switch-repo-name branch October 11, 2026 21:37
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