Skip to content

claw: merge_judge.t27 -- the 24/7 merger decided in a spec; claw-merge replaces claw-refresh (Closes #10973) - #10978

Merged
gHashTag merged 1 commit into
masterfrom
claw/merge-lane-10973
Oct 19, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw/merge-lane-10973

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

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 composes check_latest, check_state, required_red, red_origin, refresh and text.

The claw-merge job of gate-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 replaces claw-refresh and 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)

# rule out
1 label no-auto-merge H
2 draft H
3 base is not master H (added)
4 head branch starts queen- (the reviewer-bee merger's) N
5 CONFLICTING or DIRTY, or mergeability not computed W
6 no closing reference (L1) W
7 rollup not the head commit's, cut short, or a row unreadable W (added: fail closed)
8 a check still waiting, or none posted W
9 a required check red (validate, check-linked-issue, parse-ratchet, own-language) W
10 a required check not posted W
11 any other red not inherited per red_origin (claw-sarif is, by definition); own or unknown H with the reason; a red master also fails asks for its failing log (L) and waits
12 head commit younger than QUIET_MIN = 10 minutes W
13 otherwise squash, pinned to the judged head sha; five per run, lowest number first G

Roll-out safety

Plan-only unless the repository variable CLAW_MERGE_LIVE is 1: 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 carries sha, 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 --verify MATCH; the gen file is gen/c/claw/merge_judge.c, regenerated in spec-guards.yml.
  • Negative controls from 2026-10-18/19: t27b ratchet red on a spec the PR adds (own although master is red), claw-sarif alone (inherited, merges), Corpus ratchet red on a green master (own), required red, draft, label, bee branch, no closing reference, pending, pushed 3 minutes ago, a re-run that supersedes its old failure.
  • Mutation sweeps of the code (173 mutants of ==/!=, </<=, >/>=, 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.
  • Foreign-line budget (own-language 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.
  • Dry run of the lane against the live open-PR list (159 open): 0 to merge, 9 waiting, 20 held, 130 not mine (bee branches), 0 unreadable.

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-ratchet lists 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

…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>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 10:25:25 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 48
PRs with All Checks Green 2
READY 1
FAILING 48
PENDING 0
NO CHECKS YET 0

These columns do not partition: 1 + 48 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=2d301cdb4a58 != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag enabled auto-merge (squash) October 19, 2026 10:34
@gHashTag
gHashTag merged commit 5261455 into master Oct 19, 2026
33 of 35 checks passed
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>
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.

[spec] TRI CLAW merge lane: the 24/7 merger written in .t27 (specs/claw/merge_judge.t27)

2 participants