Repository navigation
claw: merge_judge.t27 -- the 24/7 merger decided in a spec; claw-merge replaces claw-refresh (Closes #10973) - #10978
Merged
Merged
Conversation
…merge job replaces claw-refresh (Closes #10973) Owner order 2026-10-19: do autonomously what the PR-merge sweep did by hand all night. specs/claw/merge_judge.t27 (ClawMergeJudge) decides, from facts only, which open pull requests merge and why it leaves the rest alone; it moves nothing. It composes check_latest, check_state, required_red, red_origin, refresh and text. Rules, first match wins: no-auto-merge label (H), draft (H), base not master (H), queen- bee branch (N: auto-merge-ready-prs.yml's), conflict or unknown mergeability (W), no closing reference (W), rollup unread or cut short (W), check pending (W), required check red or missing (W), any other red must be inherited per red_origin (claw-sarif is, by definition; own or unknown is H with the reason; a red master also fails asks for its failing log with an L line), head commit younger than 10 minutes (W); then G: squash, pinned to the judged head sha, five per run at most, lowest number first. 67 tests on both backends, 0 vacuous, the negative controls of 2026-10-18/19 among them; a mutation sweep of the decision functions (104 mutants) found one survivor, now killed by a test. The claw-merge job of gate-topology.yml (push to master, the 10-minute schedule, dispatch) lists once, feeds gen/c/claw/merge_judge.c and applies the G lines; it is plan-only into the step summary unless the repository variable CLAW_MERGE_LIVE is 1. It folds claw-refresh in (update-branch after a push, same decisions, a pull request merged in the run is skipped). Foreign-line budget: gate-topology.yml +27/-27, spec-guards.yml +2/-2, net 0, exit 0. Census moved: tools/census/quiet.txt, "steps in a quiet shape" 33 -> 35 (failure branch passes 14 -> 16, a variable in the path 7 -> 8, no path anywhere 7 -> 8). The two new shapes are claw-merge's reads of master's last rollups and of a job log; both fail soft on purpose, because the spec treats a missing B or O line as an unread fact and never merges on it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
gHashTag
enabled auto-merge (squash)
October 19, 2026 10:34
gHashTag
added a commit
that referenced
this pull request
Oct 19, 2026
…d the spec without one; the reference and t27b both pass it) (Refs #10549) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Closed
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.
Closes #10973
What
specs/claw/merge_judge.t27(module ClawMergeJudge) is the 24/7 merger written in .t27. It decides, from facts only, which open pull requests TRI CLAW merges and why it leaves the rest alone; it moves nothing. It composescheck_latest,check_state,required_red,red_origin,refreshandtext.The
claw-mergejob ofgate-topology.yml(push to master, the existing 10-minute schedule, dispatch) lists once, feeds the lowered C (gen/c/claw/merge_judge.c) and applies what it prints. It replacesclaw-refreshand keeps its behaviour (update-branch after a push, same spec, same decisions); a pull request merged in the same run is not refreshed.The rules (first match wins; each is a unit-tested branch)
no-auto-mergequeen-(the reviewer-bee merger's)red_origin(claw-sarif is, by definition); own or unknownL) and waitsRoll-out safety
Plan-only unless the repository variable
CLAW_MERGE_LIVEis1: the step summary lists what it would merge and every skip with its reason. Nothing sets the variable here. Every API read fails closed (an unread fact is a W, never a G); the merge call carriessha, so GitHub refuses it if the head moved.Checked
t27c test-report: 67 tests, 0 vacuous, on the Zig runner and on the generated C (-DT27_TEST_MAIN);t27c seal --verifyMATCH; the gen file isgen/c/claw/merge_judge.c, regenerated inspec-guards.yml.==/!=,</<=,>/>=,and/or,return true/return false; then 104 on the functions that changed): one survivor (the name of a required red in the first table row), killed by a new test.check_budget): gate-topology.yml +27/-27, spec-guards.yml +2/-2, net 0, exit 0. The deletions are the replaced claw-refresh lines and six prose comments whose content moved into the spec header.tri census pin --bless: "steps in a quiet shape" 33 -> 35 (failure branch passes 14 -> 16). The two new shapes are claw-merge's soft reads of master's rollups and of a job log; both are fine on purpose, a missing B or O line is an unread fact.tools/dupe_scan.py: no new duplicate body.Limits
The module reads whether a failing log names a file the PR changes, not the failure set; reviews are not read; a master run older than twenty commits is not seen, so a path-filtered workflow's red is unknown and held; a bot PR with no closing reference waits; two PRs merged in one run were each green alone (the ruleset is not strict); a push run cancels the older push run, so a lane merge made with the App token can cut its own tick short (the next one re-plans).
Expected red:
t27b-native-ratchetlists the new spec UNLISTED until the steward adds its row (spec PRs do not edit the ledger). It is not a required check.🤖 Generated with Claude Code