Skip to content

claw: refresh -- update-branch every behind, conflict-free PR after a merge (Closes #10397) - #10482

Merged
gHashTag merged 6 commits into
masterfrom
claude/claw-refresh-10397-c6a154
Oct 18, 2026
Merged

gHashTag merged 6 commits into
masterfrom
claude/claw-refresh-10397-c6a154

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10397

Lane 4 of the TRI CLAW epic (#10393): after a push to master, every open PR that is behind its base and conflict-free is brought up to date with PUT /repos/gHashTag/t27/pulls/{n}/update-branch, so its CI reruns on the new base without a person or a bee touching it.

What changed

  • specs/claw/refresh.t27 (module ClawRefresh): the whole decision, in t27. Input is one TAB record per open PR (number, head sha, createdAt, isDraft, labels, isCrossRepository, head repo, maintainerCanModify, mergeable, mergeStateStatus, behind_by). Output is R <number> <sha> lines, oldest first, at most 30, plus a summary. Skips, first match wins: held (no-auto-merge), draft, fork without maintainer edits, conflicting (listed once in the step summary), not decidable yet, already current. Any unreadable record (bad field count, number, sha, date, flag, duplicate, or past 512 records) is never refreshed.
  • 35 tests, 0 vacuous, with negative controls (label as a whole entry only, fork vs gone fork, cap boundary at 30/31, ties by number, clipped output). Mutation run on the Railway lab is still in progress when this PR opens; its result will be posted as a comment.
  • gen/c/claw/refresh.c and .trinity/seals/claw_ClawRefresh.json: generated and sealed on the lab; spec-guards.yml now regenerates refresh.c and fails on drift like the other claw C files.
  • claw-refresh job in .github/workflows/gate-topology.yml (no new workflow file): push to master only; a token minted with permission-pull-requests: write only (the update-branch row of specs/claw/github_surface.t27); lists open PRs with one GraphQL query (a warm-up query and a wait first, because mergeable is computed lazily after a push), reads behind_by from the compare API (the master ruleset is not strict, so GitHub never reports BEHIND), feeds the lowered C, calls the endpoint with expected_head_sha for each R line, writes the M lines to the step summary. The shell holds no decision. Concurrency group claw-refresh, cancel-in-progress.
  • Census re-blessed in a separate commit: jobs 91 -> 92, run: steps 320 -> 322, not-quiet path steps 210 -> 214.
  • Two dead wave generators deleted (scripts/gen_w658.py, scripts/gen_w659.py, referenced only by old reports) to pay the foreign-code shrink rule for the added workflow lines.

Not verified

  • The 24h success criterion can only be measured after landing.
  • No live update-branch call has been made with the narrow token. GitHub's REST docs say an App may also need contents: write on the head repo for this endpoint, which the surface row does not grant. If the first run answers 403, the job prints the warning with GitHub's text and the surface row needs a decision.
  • Merges done with github.token do not trigger push workflows, so the job only runs after merges that GitHub attributes to a user or App.
  • The harness was smoke-tested on the lab (build line copied from the YAML, three sample records); the full job has not run on Actions.
  • Inherited reds are not from this change: claw-sarif, Corpus ratchet, Verilog widths, t27b-native-*, withdrawn-live.

🤖 Generated with Claude Code

@tri-claw tri-claw Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRI CLAW formatting suggestions: 1 posted, 0 left out (outside this diff, over the caps, or unreadable). Whitespace only: every comment and token is kept.

Comment thread specs/claw/refresh.t27 Outdated
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 13:54:32 UTC

Summary

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != 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 18, 2026 13:55

@tri-claw tri-claw Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TRI CLAW formatting suggestions: 1 posted, 0 left out (outside this diff, over the caps, or unreadable). Whitespace only: every comment and token is kept.

Comment thread specs/claw/refresh.t27 Outdated
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 14:02:39 UTC

Summary

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

These columns do not partition: 0 + 49 + 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)=fad12492937a != 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 and others added 5 commits October 18, 2026 21:04
… merge (Closes #10397)

specs/claw/refresh.t27 decides which open PRs get PUT .../update-branch after a push to master (held, draft, fork without maintainer edits, conflicting, unknown and current ones are skipped; at most 30, oldest first; fail closed on unreadable records). The claw-refresh job in gate-topology.yml only lists, feeds gen/c/claw/refresh.c and calls the endpoint.

The foreign-code shrink rule is paid by deleting two dead wave generators (scripts/gen_w658.py, gen_w659.py: referenced only by old wave reports).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tools/census/shell.txt: jobs 91 -> 92, run: steps 320 -> 322, runner-named shell 299 -> 301 (the new claw-refresh job in gate-topology.yml, two run steps, no shell: key).
tools/census/quiet.txt: named a path but not quiet 210 -> 214 (the same job's steps name paths; none is a quiet shape).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…aps (Refs #10397)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#10397)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…uggestion, Refs #10397)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag force-pushed the claude/claw-refresh-10397-c6a154 branch from 5c8ccd4 to d9ebd81 Compare October 18, 2026 14:05
…the new master tip (Refs #10397)

Census moved: quiet 'named a path but not quiet' 210 -> 220 and shell 'run: steps' 320 -> 324
(runner-does 301 -> 303). The claw-refresh job in gate-topology.yml adds run steps; the rest
of the movement came from master (the merger workflow, #10474) while this branch waited.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@gHashTag

Copy link
Copy Markdown
Owner Author

Mutation run on specs/claw/refresh.t27 (tri mutate, final spec of 44 tests): 173 of 185 killed, 9 survived, 3 hung. The first run killed 155; the added tests close every real gap it showed. The 9 survivors are equivalent mutants: line 112 (an empty trailing entry never matches), 209 and 295/303 (an extra loop iteration that returns or reads an unused slot first), 265, 285, 330 (rank 30 is always capped), 364, and 440 (a test helper). The 3 hung mutants (lines 116 twice and 296) make a loop endless, so they cannot pass. Census moved: quiet 210 -> 220, shell 320 -> 324 (claw-refresh job adds run steps; the rest came from master).

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 14:07:31 UTC

Summary

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

These columns do not partition: 0 + 49 + 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)=fad12492937a != 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 merged commit 4171d16 into master Oct 18, 2026
33 of 35 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
…ensus itself, take master's

This branch touches no workflow, so master's quiet 220 and shell 324 are
the branch's numbers too.

Refs #10469

Co-Authored-By: Claude Opus 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.

claw: refresh -- update-branch every behind, conflict-free PR after a merge

1 participant