Repository navigation
cmux guards: a merge goes to the landing gate installed from cmuxterm-hq; the repository keeps no merge guard - #23858
Conversation
… refused when none is installed (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-hq; the repository keeps no merge guard After hq#2830, #23472 still ran a merge_compile_guard.py copy without its gh-throttle fix: a guard here reaches a worktree only through a fetch or a base merge (deputy-2, 2026-10-21). Every rule it enforced is in the landing gate guards-sync installs from cmuxterm-hq main every 10 minutes (require-cmux-guards: the green Release compile on the exact head for a Swift change, its gh reads past the PATH guard's throttle, one bounded budget), so guards-from-base.sh defers to that gate when the account registers it, runs it when only its file is installed, and refuses the merge when it is missing, naming guards-sync and install.py. The update-branch warning still runs from origin/feat-cmux-next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Bead |
|
Owned by an agent session · session |
|
Orphaned: no activity for 14 h, and no lane holds a lease on it. The orphan sweep could not merge |
Conflicts with #24265 (merge-compile-guard: only a compile that finished red refuses) resolved toward both: the repository still keeps no merge guard, and guards-from-base.sh takes #24265's rules. A gate that is not installed, crashes or can't be read is a warning and the merge goes ahead; a refusal still wins and is printed before the update-branch warning runs; every warning is joined into one answer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-707fe4a5f156f632733f
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
|
…cher can't be read; the merge fetch uses gtimeout where timeout is missing From the Codex review of #23858: when origin/feat-cmux-next:scripts/ci/guards-from-base.sh could not be read, the settings hook warned and let the merge through without running an installed but unregistered landing gate, so its refusal was lost. And stock macOS has no timeout, so the merge-time fetch never ran there. tests/test_guard_hooks_from_base.py: the two new tests fail on the previous hook (2 errors of 24) and pass with this one (24/24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-707fe4a5f156f632733f
…y under a matcher that covers Bash From the second Codex review of #23858: - mergePullRequest and enablePullRequestAutoMerge (gh api graphql) count as merges in both the settings hook and guards-from-base.sh, so an installed but unregistered gate judges them. - guards-from-base.sh defers to a registration only when its PreToolUse matcher covers Bash. - With no launcher to read, the settings hook runs an installed gate whether or not it looks registered (at worst a second read), so its refusal is never lost. tests/test_guard_hooks_from_base.py: the new tests fail on the previous code (3 failures, 1 error of 27) and pass with this (27/27). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-707fe4a5f156f632733f
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
…ot one that mentions it From the third Codex review of #23858: this repository's own settings hook names require-cmux-guards.sh in its fallback, so an account whose settings carried that hook read as registered and nothing judged the merge. A command counts only when one of its words (shlex) is the gate's file, as install.py writes it (bash '<hooks>/require-cmux-guards.sh'). The new test fails on the previous code (1 of 28) and passes with this (28/28). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-707fe4a5f156f632733f
|
Review (Codex gpt-6-astra xhigh, via review-router): SHIP at 81033a4 Four rounds. Rounds 1 to 3 said FIX FIRST, and each finding was fixed with a regression test that fails on the code before it:
Round 4 found nothing. |
|
Shipped in:
|
After hq#2830, #23472 at 7e68847 still got "could not read #23472". Its hook already runs
scripts/ci/guards-from-base.shfrom origin/feat-cmux-next (#23316), but the merge guard it runs is a copy in this repository. A copy here reaches a worktree only through a fetch or a base merge, so a fix in it can lag behind. Decision (deputy-2, 2026-10-21): every merge guard runs from the copy guards-sync installs from cmuxterm-hq main (every 10 minutes), never from a copy in a worktree.The installed landing gate (
require-cmux-guards, cmuxterm-hqtools/agent-guards) already enforces every rulemerge_compile_guard.pydid, on the exact head of a feat-cmux-next PR that changes Swift:cmux-next Release compile (Xcode 26), using the same Swift file set.CMUX_GH_GUARD_DISABLE=1).Any merge
merge_compile_guard.pyrefused, the gate refuses too, so its rules have nothing left to move.So this PR:
guards-from-base.shno longer runs a merge guard from the repo. For a merge it does one of three things:${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json, checked the same wayinstall.pychecks): it defers, because Claude Code runs the gate itself. That avoids a second set of GitHub reads.~/.claude/hooks/require-cmux-guards.shitself.guards-syncandinstall.py. That follows merge-compile-guard: only a compile that finished red refuses; a slow read or a pending compile warns and merges #24265: no guard blocks a merge it can't judge, only a compile that finished red. A gate that crashes or exits non-zero is a warning too.scripts/ci/merge_compile_guard.py, its hook, and its test. The CI step and the test-execution entry for them go too.Not carried over:
merge_compile_guardlet a fleet compile-check pass stand in for a queued Release compile. Neither the installed gate nor next-autoland ever accepted that, so it was already dead wherever the gate is installed. Accepting it would loosen the gate, and that is a separate decision.Takes back #22947: it added the in-repo merge guard and its CI test entries; this PR removes that guard on purpose, since the installed landing gate from cmuxterm-hq judges every merge.
Takes back #23423: only its edit to tests/test_merge_compile_guard.py, which goes with the guard.
Takes back #23827: only its edit to tests/test_merge_compile_guard.py, which goes with the guard.
Takes back #24265: only its edits to the removed guard and its test; its rules (only a red compile refuses, everything else warns) are kept in guards-from-base.sh.
Base merge (2026-10-26, adopted by the stall reconciler): the merge with feat-cmux-next conflicted with #24265, which had loosened the repository guard this PR removes. I resolved it toward both: the repository still keeps no merge guard, and
guards-from-base.shfollows #24265's rules (above). #24265's tests were ported to the installed gate.tests/test_guard_hooks_from_base.pypasses 22/22 andtests/test_base_merge_warning.pypasses at aa84860.Earlier tests (cmux16; the test needs
timeouton PATH, which Linux CI has and macOS lacks):tests/test_guard_hooks_from_base.pypasses 15/15 on Python 3.13 and on /usr/bin/python3 3.9, andtests/test_base_merge_warning.pypasses 10/10.Agent session: agent session
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Merges are now judged by the landing gate installed from cmuxterm-hq (
require-cmux-guards), never by a copy of the merge guard in this repository.For a merge,
guards-from-base.shdefers to the gate when registered in this account's settings, runs the installed gate file when present but not registered, and refuses the merge with install instructions when the gate is missing. The update-branch warning still runs fromorigin/feat-cmux-next.Removed:
scripts/ci/merge_compile_guard.py, its hook, tests, and the CI step that ran them. The old guard let a fleet compile-check pass stand in for a queued Release compile; the installed gate never accepted that, so that behavior is dropped too.Written for commit a8230d0. Summary will update on new commits.