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
gHashTag
added a commit
that referenced
this pull request
Oct 22, 2026
…ria they can (Closes #10549) (#10572) * wip: specs/claw/criteria.t27 (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: criteria.t27 literal lengths measured, not counted (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: criteria.t27 plan_of lengths and the forged-row test (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: criteria.t27 writes the CR as a byte; string literals know only \n \t (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: claw-criteria jobs, gen/c, seal, surface row live (Refs #10549) The claw gen-c freshness lines fold into one loop and scripts/gen_w368_lean.py, an unreferenced one-shot wave generator, is dropped so foreign lines shrink. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: github_surface resealed 15/15; census re-blessed (Refs #10549) Census moves, both from the two new jobs claw-criteria and claw-criteria-post in gate-topology.yml: shell jobs 93 -> 95 (and the run: step counts with them); quiet 'named a path but not quiet' 233 -> 239, the new run: steps naming paths without a quiet shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: criteria.t27 edge tests for the mutation survivors (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * wip: criteria gen/c and seal for the edge tests (Refs #10549) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: gate-topology.yml parses again - the claw/criteria post line held ': ' in a plain scalar (Refs #10549) GitHub refused the whole file, so every gate-topology job was skipped on pull_request and only a zero-job failed push run appeared. The jq object now writes key:value without the space; actionlint is clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * census: quiet 'named a path but not quiet' 237 -> 243 after merging master (Refs #10549) Master moved it 233 -> 237; the two claw-criteria jobs of this PR add 6. Re-blessed with tri census pin --bless on the Railway lab; gate clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * claw/criteria: kill mutation survivors, close <!--> like HTML (Refs #10549) Five new spec tests aim at the survivors of the mutation run: later commands keep their own outcomes, a planned run with no result is not run, records are read to their last byte, body line edges (table rules with spaces, blank indented lines, ". x", three-digit lists, SC-7x), and helpers called off-center. 42/42 pass, 0 vacuous, on the Railway lab. read_body now looks for "-->" from s + 2, so "<!-->" and "<!--->" close themselves, as in HTML; before, they opened a comment that hid every following criterion. gen/c and the seal are regenerated on the lab. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * claw-criteria-post: a missing checks write leaves a note, not a red job, per specs/claw/token_shape.t27 (Refs #10549) The post job's token step now carries continue-on-error and a failure note (rules R1 and R2 of the law master landed). The separate secret-presence step goes: a missing secret fails the same mint and leaves the same note. Census moves, both from that removed run: step: - quiet 'named a path but not quiet' 243 -> 242 - shell 'run: steps' 329 -> 328, 'the runner does' 308 -> 307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * seal: re-seal specs/claw/github_surface.t27 after the master merge (Refs #10549) Both sides edited the spec; the merged text gets a fresh seal. Lab: test-report 0 FAIL, 0 vacuous of 18; seal --verify MATCH; census pin --gate PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * spec-guards: claw gen-c freshness loop again covers criteria, beside master's secret_gate line (Refs #10549) Restores this branch's side of the merged hunk: one loop over the claw specs, criteria included, plus master's specs/policy/secret_gate.t27 line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * census: re-bless after the master merge (Refs #10549) Master moved the baselines (jobs 94, run: steps 326, quiet 239); this branch's two gate-topology jobs (claw-criteria, claw-criteria-post) add on top of them: shell jobs 94 -> 96, run: steps 326 -> 329, the runner does 305 -> 308; quiet "named a path but not quiet" 239 -> 244. Lab: claw gen-c and secret_gate gen-c fresh, criteria test-report 0 FAIL / 0 vacuous of 42, seals for criteria and github_surface MATCH. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * spec-guards: claw gen-c freshness step covers criteria again, beside master's merge_judge line (Refs #10549) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * census: re-bless quiet 'named a path but not quiet' 243 -> 248 after the master merge (the claw-criteria steps add 5 on master's 243) (Refs #10549) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * census: re-bless quiet 'named a path but not quiet' 252 -> 257 after the master merge (the claw-criteria steps add 5 on master's 252) (Refs #10549) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> * ledger: t27b row for specs/claw/merge_judge.t27 (master's #10978 added the spec without one; the reference and t27b both pass it) (Refs #10549) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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