Skip to content

claw: claw-t27f/suggest/refresh pass with a note when the App token cannot be minted; claw-refresh can read the queue (#10576) - #10585

Merged
gHashTag merged 4 commits into
masterfrom
claw-heal-10576
Oct 18, 2026
Merged

gHashTag merged 4 commits into
masterfrom
claw-heal-10576

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

App-token shape (#10576). Three jobs now follow the #10568 pattern: claw-t27f, claw-suggest and claw-refresh.

  • The token step is continue-on-error.
  • A steps.tok.outcome == 'failure' step writes the owner's fix to the step summary.
  • Later steps run only if: steps.tok.outputs.token.

claw-t27f's latest scheduled run was red for exactly this reason: "The level of access for permissions requested are not granted to this installation" (checks write).

claw-batch stays red on purpose. An operator dispatches it with a list of PRs, so a token that cannot be minted must fail that run. The token step carries the # token_shape: red marker, which the law in #10577 reads.

claw-refresh gets actions: read. #10559 added the queue read. The job's permissions: block has no actions scope, so if the read is refused the count falls to -1 and the job refreshes nothing, silently. The header comment now gives #10559's limits: a cap of 5 and a queue limit of 150, not 30.

Superseded part. This branch also carried its own claw-refresh listing fix and queue budget (#10588). #10559 landed the same fix first, with more: three tries, a cap of 5, and a refresh only for PRs the merger lands next. The merge takes master's specs/claw/refresh.t27, gen/c/claw/refresh.c and seal unchanged.

Run over this branch, specs/claw/token_shape.t27 names only claw-sarif, which #10568 fixes. Once both merge, it names nothing.

Shrink offset. scripts/mcp-wrapper.sh is deleted (−10). It is ported to specs/port/scripts/mcp-wrapper.t27 and sealed, and nothing runs it. The workflow is +16/−13 against master, so foreign lines move +16/−23. The census does not count run: inside a flow mapping (#10569).

Refs #10576, #10588, #10545

🤖 Generated with Claude Code

… App token cannot be minted; claw-refresh lists PRs 25 a page (#10576)

claw-refresh was red on every push to master: its GraphQL listing asked for
100 open PRs with mergeStateStatus a page, and with 207 open the second page
outran GitHub's timeout (an HTML 502, "invalid character '<'"). 25 a page
lists all 207 in the same time.

claw-t27f, claw-suggest and claw-refresh now have the #10568 shape: the token
step is continue-on-error, a failure step writes the owner's fix to the step
summary, and later steps run only with a token. claw-batch is operator-
dispatched and stays red on purpose, marked `# token_shape: red` for the law
in specs/claw/token_shape.t27 (#10577).

Shrink offset: scripts/mcp-wrapper.sh (-10), ported to
specs/port/scripts/mcp-wrapper.t27 and sealed; nothing runs it.

Refs #10576

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…most (100 - queued) / 25 pull requests (#10588)

With the GraphQL listing healed, claw-refresh would update up to 30
behind pull requests after every push to master. Each moved head
starts about 25 workflow runs, so one merge could queue 750 runs while
886 were already waiting. The master ruleset is not strict, so a
refresh only buys freshness: it never unblocks a merge.

specs/claw/refresh.t27:
- refresh_budget(queued) refreshes nothing at QUEUE_ROOM (100) or more
  queued runs. Below that it allows (QUEUE_ROOM - queued) /
  RUNS_PER_REFRESH (25), never more than REFRESH_CAP. An unread count
  refreshes none.
- refresh_plan_queued is what the job calls. It adds one summary line
  saying which case applied.
- refresh_plan_within carries the old body with the cap passed in;
  refresh_plan keeps its meaning (REFRESH_CAP).
- Six new cases: a budget sweep over -1..1000, a busy queue, a quiet
  queue, an unread queue, a limit above the cap, and the text pins.
- Lab results: 50/50 passing, 0 vacuous. Three negative controls fail
  their cases as they should: cap not lowered, room check removed,
  unread branch removed.

gate-topology.yml claw-refresh:
- reads actions/runs?status=queued total_count (permissions gain
  actions: read) before the listing loop;
- passes the count to the harness, which parses it strictly (empty,
  non-numeric, negative or > i32 is unread);
- these inputs were run through the harness on the lab: 886, 0, 30,
  empty, abc, -, -3 and 99999999999.

gen/c/claw/refresh.c regenerated; seal claw_ClawRefresh.json remade.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag gHashTag changed the title claw: claw-refresh lists PRs 25 a page (red on every push); claw-t27f/suggest/refresh pass with a note when the App token cannot be minted (#10576) claw: claw-refresh lists PRs 25 a page and is held to the Actions queue; claw-t27f/suggest/refresh pass with a note when the App token cannot be minted (#10576, #10588) Oct 18, 2026
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 18:15
…ried listing)

#10559 landed the same queue gate and listing fix this branch carried
(refresh_budget, first:25), with more: three tries, a cap of 5 and only
PRs the merger lands next. specs/claw/refresh.t27, gen/c/claw/refresh.c
and the seal are master's. This branch keeps the token shape for
claw-t27f, claw-suggest and claw-refresh, the claw-batch red marker,
and adds actions: read to claw-refresh: without it the queue read
falls to -1 and the job refreshes nothing, silently.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 19:53:50 UTC

Summary

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

These columns do not partition: 1 + 43 + 0 + 0 = 44, 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 1db3f9d into master Oct 18, 2026
27 of 28 checks passed
gHashTag added a commit that referenced this pull request Oct 18, 2026
 #10633) (#10634)

The spec landed in #10585 without a ledger row, so every PR against
master is red on t27b-native-ratchet with UNLISTED 1. The native run on
#10627 (919c636) reports it as t27b pass.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 18, 2026
…ecs, one run set (#10652)

* claw: queue_cost.t27 -- job-time share and queued-run classes, so the queue measurement is reproducible (Closes #10600)

The 2026-10-18 queue measurement (#10590) was taken by hand with jq and awk.
This spec is that measurement: cost_plan sums job seconds per workflow and
names the top holder (t27b native, 88% in the fixture); class_plan sorts
queued runs into current head, superseded head, closed PR, draft PR, other
event and unreadable.

Writing it found a defect in the published table: the 97 draft runs were
counted twice (94 on a current head, 3 on a superseded one), so the classes
summed to 1019, not 922. One row is one class here; the fixture sums to 922.

13 tests pass under t27c test-report and under t27b; five mutations (floor
rounding, draft before superseded, no sha check, no seconds bound, empty
name) each fail at least one test.

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

* claw: push_gate.t27 -- skip a fix push that only restarts required checks (Closes #10606)

Every push to a PR head restarts its required checks at the back of the
Actions queue. push_gate decides each lane push first: hold a new PR while
more than QUEUE_LIMIT runs are queued, imported from refresh.t27 rather than
copied; push a fix only when a required check is red or the PR's own diff
causes the red; skip it when master already fixed the job, as on #10585.

14 tests, t27c and t27b pass, six mutations each fail, gen-c and gcc clean.

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

* docs(claw): competitors addendum -- merge queue, Kodiak and push_gate on when checks run again (Refs #10606)

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

* claw: seal evidence, evidence_pins and suggest_feed -- every claw spec sealed, 24 of 24 (Refs #10608)

All three pass t27c test-report and t27b (12, 4 and 19 tests, none
vacuous); their seals were the only ones missing in specs/claw.

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

* feat(claw): check_state.t27 reads a queued check as pending, not failing (#10617)

The PR Dashboard's per-PR line counts a check as failing when its
conclusion is not SUCCESS, SKIPPED or null. A queued check has conclusion
"" and a commit status has none, so #10585 read "21 failing" with no
failure, and a failed commit status was never counted.

check_state.t27 classifies each rollup row (status TAB conclusion, or
CONTEXT TAB state) as pass, fail, wait or unreadable, and gives one
verdict: red, pending, none or green. Unreadable is never green; no
checks is none (#3248). The dashboard's current rule is kept as a named
function so the #10585 measurement is a test.

t27c 12/12 with 0 vacuous, t27b 12/12, five mutations each fail a test,
gen-c and gcc clean, seal saved. queue_cost.t27 exports qc_line_end and
qc_split for it; its seal is re-saved.

Refs #10617

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

* feat(claw): check_latest.t27 -- a re-run supersedes the run it replaces (#10617)

check_state.t27 read every rollup row. On 2026-10-19 #10563 held
"Issue Gate/check-linked-issue" twice: run 39151562346 COMPLETED FAILURE
and its re-run 39157315158 QUEUED. check_state called that red; the
check that decides the merge is the queued re-run, so it is pending.

check_latest.t27 takes rows with the check's name and run id. Per name,
the largest run id (compared as a number) is live; older rows are
superseded. A commit status is never superseded. A malformed row is
unreadable and supersedes nothing. Live rows are classed by check_state.

check_state's MAX_ROWS is renamed CHECK_MAX_ROWS: queue_cost also exports
MAX_ROWS, and a spec importing both lost the name in both compilers.

t27c 11/11 with 0 vacuous, t27b 11/11, six mutations each fail a test,
gen-c and gcc clean; check_state still 12/12; seals saved and verified.

Refs #10617

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

* feat(claw): required_red.t27 -- push_gate's req_red flag read from the rollup (#10606)

push_gate.t27 takes req_red from its caller, and the lane set it by eye.
On 2026-10-18 that eye pushed #10585 for a red claw-sarif, which is not a
required check.

required_red.t27 reads check_latest's rows (name, run id, status,
conclusion). A row is required when its job is exactly validate,
check-linked-issue, parse-ratchet or own-language. Only the newest run
per name counts. req_red is true when a live required check fails,
unknown when any row is unreadable, false otherwise. A missing required
check is counted and is not red.

t27c 9/9 with 0 vacuous, t27b 9/9, five mutations each fail a test,
gen-c and gcc clean, seal saved; the five branch seals verify.

Refs #10606, #10617

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

* feat(claw): merge_lane.t27 -- the merger's starvation read from its own runs (#10644)

TRI CLAW's merger job waits in the same ubuntu-latest pool as every
pull_request job. On 2026-10-18 it had 34 runs queued, the oldest 6598 s
old, and one job waited 57 min for a runner. ClawMergeLane reads one row
per merger run (status TAB conclusion TAB age) and prints counts, the
oldest open age, and F merger idle|flowing|starved|unknown (starved: an
open run older than 1800 s; a known starve wins over an unreadable row).

t27c 8/8 with 0 vacuous, t27b 8/8, 7 mutations caught, gen-c clean
(the duplicate-const warning is gen-c's, #10645), seal saved.

Refs #10393

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

* feat(claw): merge_lane yield -- the merger's runs merged 0 PRs (#10644)

39 of the last 40 merges on 2026-10-18 had GitHub's native auto-merge
enabled (auto_squash_enabled in the timeline); the merger workflow is not
on the merge path. Its last 10 successful runs merged nothing: nine
workflow_run runs each took a runner to log "no bee-reviewed label".
yield_plan reads one row per merger run (event TAB merged TAB no_label
TAB other) and prints a Y line and F merger-yield zero|some|unknown|none.

t27c 15/15 with 0 vacuous, t27b 15/15, 6 new mutations caught (none
BLOCKED), seal re-saved, 6 branch seals verify.

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

* feat(claw): merge_lane share -- the merger is 11% of the queue (#10644)

On 2026-10-19, 23 of the repository's 209 queued runs were the merger's
(22 of them workflow_run), the largest single group, while its last 10
runs merged nothing. share_plan reads one row per queued run (workflow
TAB event) and prints an S line and F merger-share low|high|unknown|none;
high at 10% or more, counting each unreadable row as somebody else's.

t27c 23/23 with 0 vacuous, t27b 23/23, 8 new mutations caught (none
BLOCKED; the eighth needed a new test), seal re-saved and verified.
gen-c compiles with warnings (#10645).

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

---------

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.

1 participant