fix(ci): route merge-train dequeue ClaudeBox sessions to the target repo's mode - #24523
Merged
Conversation
ludamad
approved these changes
Jul 4, 2026
ludamad
marked this pull request as ready for review
July 4, 2026 17:22
ludamad
enabled auto-merge
July 4, 2026 17:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a
merge-train/*PR onaztec-packages-privateis dequeued from the merge queue,merge-queue-dequeue-notify.ymlposts to the team channel (e.g.#honk-teamformerge-train/barretenberg) and kicks off a ClaudeBox session to investigate and open a fix PR.That kickoff (
.github/workflows/claudebox.yml) hardcodedCLAUDEBOX_MODE: public. So the fix session lands in public mode, where it has no access toaztec-packages-private— it can't read the dequeued PR, can't fetch the privatemerge-train/*branch, and can't open the fix PR. The session correctly refuses and tells a human to re-run with--private, which defeats the point of the automated kickoff.Root cause: two things defeated claudebox-server's existing "private repo ⇒ private mode" safety net (
RepoRequiresPrivateMode):mode: publicwas sent explicitly, overriding the inference.reposent to ClaudeBox wasgithub.repositoryof the (public) workflow run, not the private repo the train actually lives on.Fix
Thread the target repo through the kickoff so the session's mode matches where the train lives:
ci3/merge_train_failure_slack_notify— pass--repo "$GITHUB_REPOSITORY"on both the dequeue and CI-failure kickoffs (the repo the dequeue/failure fired in is the repo the train is on).ci3/slack_notify_with_claudebox_kickoff— accept--repo/--modeand forward them as-f repo=/-f mode=workflow inputs. Existing callers (release_canary_slack_notify) are unaffected — the flags are optional..github/workflows/claudebox.yml— addrepoandmodeworkflow_dispatchinputs. Mode is now selected in priority order:modeinput;…-private);vars.CLAUDEBOX_MODE || 'public') for ordinary/claudeboxwork onaztec-packages.The kickoff still dispatches the public
aztec-packagesclaudebox.yml(which holdsCLAUDEBOX_API_SECRET); only the payload'srepo/modechange, so a private-train dequeue now runs the fix session in private mode againstaztec-packages-private.The
/claudeboxPR-comment path is unchanged: for public-repo comments the target repo is public, so it stays public.Testing
These are GitHub Actions / bash config files with no unit-test harness in this repo, so no red/green unit test is feasible. Verified:
bash -non both edited ci3 scripts.claudebox.yml.endsWith('AztecProtocol/aztec-packages-private', '-private')→private;endsWith('AztecProtocol/aztec-packages', '-private')→ falls through topublic. Emptyinputs.mode/inputs.repo(theissue_commentpath) fall through to the public default.Notes
These files mirror to
aztec-packages-private, where the dequeue workflow actually runs, so the fix takes effect there once mirrored.Created by claudebox · group:
slackbot