Skip to content

claw: suggest_feed -- a spec that t27c fmt would reformat becomes a suggestion review on the PR (Closes #10365) - #10373

Merged
gHashTag merged 2 commits into
masterfrom
claw-suggest-10365
Oct 18, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claw-suggest-10365

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10365

What

A changed .t27 spec that t27c fmt would reformat now becomes one suggestion review from the TRI CLAW App ("Commit suggestion" on GitHub).

  • specs/tri/fmt_source.t27 -- the formatter behind t27c fmt, now lossless. A leading tab becomes four spaces, trailing space/tab/CR are dropped, trailing blank lines are dropped, the file ends with one newline, and every other byte is copied through. fmt_accept refuses to print unless the non-whitespace byte stream is identical, so a bug can refuse to format but cannot damage a file. The old AST printer dropped every ; comment and rewrote i += 1 as i = 1. run_fmt in bootstrap/src/main.rs is thin I/O glue around bootstrap/gen/rust/tri/fmt_source.rs (t27c gen-rust output); the pretty-printer is deleted.
  • specs/claw/suggest_feed.t27 -- the driver: head file + the @@ headers of the PR diff -> formatted text -> changed line ranges -> rows for specs/claw/suggest.t27 -> review JSON. Lowered to gen/c/claw/suggest_feed.c. Fails closed: bad path, bad sha, code fences or control bytes make it print nothing.
  • claw-suggest job in gate-topology.yml. Token from actions/create-github-app-token with exactly permission-pull-requests: write + permission-contents: read. Head files are read with git show (no symlink is followed), checkout uses persist-credentials: false. Event COMMENT only; a fork without the secret posts nothing and says so.
  • github_surface.t27: row pr-suggestions PLANNED -> LIVE (census 10/1 -> 9/2). spec-guards regenerates and diffs the two generated files. Census re-blessed (shell jobs 89 -> 91, run steps 316 -> 320, quiet 204 -> 208).
  • Docs: docs/claw/README.md, AGENTS.md.

Verified on the Railway lab

  • spec-status IMPLEMENTED, test-report 0 FAIL / 0 vacuous: fmt_source 15 tests, suggest_feed 19, github_surface 10.
  • gen-c / gen-rust output is byte-identical to the committed files.
  • cargo build --release -p t27c is green; t27c fmt over suggest.t27, suggest_feed.t27 and fmt_source.t27 keeps every ; and every +=, the non-whitespace stream is identical, and a second run is byte-identical.
  • Own-language gate and foreign-line budget pass in lefthook: +47 foreign lines added (main.rs +15, gate-topology +29, spec-guards +3) against 2030 deleted (14 spent scripts/gen_w*.py, all ported under specs/port/scripts/ and called by nothing).

Owner steps

The job needs the App permission pull_requests: write accepted on the installation (plus the secret/variable from docs/claw/README.md). Proof that a suggestion review appears on a real PR: see the draft proof PR linked below (never merged).

Opened as a draft on purpose: issue-gate.yml auto-merges every non-draft PR, and the job should be seen working first.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 10:04:15 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).

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 10:11:15 UTC

Summary

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

These columns do not partition: 0 + 48 + 0 + 0 = 48, 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

Copy link
Copy Markdown
Owner Author

Proof: on the throwaway draft #10374 (this branch plus two tab-indented lines in specs/claw/suggest.t27) the claw-suggest job posted a review from tri-claw[bot] with two suggestion blocks, event COMMENT: #10374 (review). The first run posted nothing because CLAW_APP_ID is a repository secret here, not a variable (the docs say variable); the job now accepts either. claw-sarif and claw-t27f still read only the variable, so they stay dormant until it is set or they get the same one-line fallback.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 10:18:37 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).

… suggestion review on the pull request (Closes #10365)

specs/tri/fmt_source.t27 is the formatter behind `t27c fmt`, now lossless: a leading
tab becomes four spaces, trailing space/tab/CR are dropped, trailing blank lines are
dropped and the file ends with one newline; every other byte is copied through, and
fmt_accept refuses to print unless the non-whitespace byte stream is identical. The old
AST printer dropped every `;` comment and wrote `i += 1` as `i = 1`. run_fmt in
bootstrap/src/main.rs is now thin I/O glue around bootstrap/gen/rust/tri/fmt_source.rs
(t27c gen-rust output); the stale pretty-printer is deleted.

specs/claw/suggest_feed.t27 is the driver: head file + the @@ headers of the pull
request diff -> formatted text -> changed line ranges -> rows for suggest.t27 -> review
JSON (gen/c/claw/suggest_feed.c). The new claw-suggest job of gate-topology.yml mints
the TRI CLAW token with exactly the pr-suggestions row of github_surface.t27
(pull_requests write, contents read), reads head blobs with git show (no symlink is
followed) and posts the review as event COMMENT. That row moves PLANNED -> LIVE
(census 10/1 -> 9/2). spec-guards regenerates and diffs both generated files.

Census re-bless: gates shell jobs 89 -> 91, run: steps 316 -> 320, quiet "named a path
but not quiet" 204 -> 208 (the new job plus the census base catching up).

Shrink offset: spent scripts/gen_w{672,681,682,683,698,709,713,716,718,721,728,729,731,732}.py,
all ported under specs/port/scripts/ and called by nothing.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 10:20:33 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).

Data and seal files only, no code.

- specs/claw/github_surface.t27 reseal: row pr-suggestions flipped
  PLANNED -> LIVE, so the spec text and its seal changed.
- tools/census/quiet.txt: "named a path but not quiet" 208 -> 210 (the new
  claw-suggest job's steps, counted on the merge ref).
- tools/duplicate_bodies_baseline.txt: re-blessed with dupe_scan.py --bless;
  suggest_feed.t27 repeats a few small byte helpers (bytes_eq, concat,
  text_append_*, starts_with).
- tools/verilog_width_baseline.txt: two lines added by hand, comments kept.
  suggest_feed.t27 (big fixed byte arrays, not a bus) is this branch's;
  trinity_fpga_adapter.t27 ([4294967295:0]) is on master and was never in
  the ledger.

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 10:23:43 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).

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: pr-suggestions -- t27c fmt keeps comments, and a changed spec becomes a suggestion review from TRI CLAW

1 participant