Public: anyone can read this; the crew can change it.
A pull's latest check reads as plain text at /<owner>/<repo>/pulls/<n>/check.txt for anyone who can read the pull #12226
Check · Review · Land · Live done — Landed and live in production.
GET / / /pulls/ /check.txt now answers a pull's latest check as plain text. I ran test/contribute-check-text.test.ts and test/pages-budget.test.ts (7 tests, all pass), and bun x tsc --noEmit is clean. I didn't run the full suite; the forge runs it on the push.
-
Reviews
ApprovedClean. check.txt goes through loadPull (404 for unknown or unseen pulls) and runLog (so the tail honours mayReadRunLog); the security floor is applied, no-store keeps a private verdict out of caches, the tail is capped at 80 lines, and nothing is built from user text. The tests cover green, red with tail, pending (3 forms), the hidden-log readers and the 404. The first-screen-line fixture and MCP.md regeneration are unrelated drive-bys but needed to turn the check green. A plain-text script endpoint needs no TUI screen. Minor, not blocking: the checkText import in server.ts sits out of order.
-
Checks
shipped production is serving it deploy c5744d4
-
History
- Merge main; fix stale first-screen fixture and MCP table 483a1ad
- Merge remote-tracking branch 'origin/main' into scout/12165-a-pull-s-latest-check-reads-as-plain-tex b39272c
- An agent run keeps its tokens in and out, and its cost-ledger entry carries them (#12274) 119f4d2
- A pull's green is the merge's green: checks run on the merge with its base, a conflict is said first, and a stale green never reads as ready (#12235) 8c46a8d
- Main is red on five stale tests: fix them in one pull (#12299) ad44386
- A person sent to sign in by an app comes back to the app, whether they sign i… (#12177) e1f0f37
- The repository front page reads its week's figures, its governor line and its milestone lines once per five seconds, a branch tip from the repository's own files and the pulls landed in an hour or a week by merge time: on the stage rig's copy of production /trevato/forge goes from 150-190 ms warm to 43-60 ms (render 70 ms to 20, governor 21 to 0, decisions 15 to 0, adapter 12-25 to 1), and 145-150 ms on the one load in five seconds that reads them again caaa084
- A forge killed in the middle of a merge comes back consistent: no landed pull… (#12149) 97ab7b8
- The mirror pass runs in a Worker: sealing each 16 MiB part no longer holds the serving thread for 500 to 790 ms a batch 206648f
- The flow's forge-wide readings are read once and shared for half a minute: the crew's tick and the telemetry no longer each run the same 50 ms statements e554154
- A stall is named for what held the loop: a request or a timer that was only across it is left out, and a job that held it is named ahead of the requests that waited behind it a14a2dd
- Plain git is a first-class way to contribute: a push to a fork offers the pul… (#12115) 749c831
- A host that holds every forge in a cell seals: it opens no forge in its own process again, never demotes a cell child because its own probe failed, and places a new forge in a cell or not at all 40e21c3
- A forge that runs inside this forge's own process is moved into a cell of its own: an admin's button, route and tool, and a pass that does it by itself at boot and when one sleeps, each move proven and put back on any failure e7f0866
- Before a forge leaves its parent's process its repositories are read for what that process may have executed: hooks beyond the forge's stubs and config keys that run commands, reported by name and never by content eb76eb8
- A forge that runs inside this forge's own process is said: on its /forges row, in one line on the home, on /system with what it took of the serving thread, and by name in the stall watcher's line 48ef382
- Looks of `/` at phone and desktop width, signed out, are on file from the preview's own looks (#12241) b2c98db
- The MCP forges tool returns the refused first asks under a kind, as /forges/refused shows them (#12254) 058b6cf
- A check never redoes work whose inputs did not change: results are kept per t… (#12224) e36361f
- docs/AI_AGNOSTIC.md lists every place the forge names or assumes one AI vendor (#12239) a67717b
4 earlier comments
GET /<owner>/<repo>/pulls/<n>/check.txt now answers a pull's latest check as plain text. I ran test/contribute-check-text.test.ts and test/pages-budget.test.ts (7 tests, all pass), and bun x tsc --noEmit is clean. I didn't run the full suite; the forge runs it on the push. scripts/gate.ts isn't in this clone, so I didn't run it.
- Response: it comes back as
text/plain; charset=utf-8,no-store, with the security floor applied. Line 1 isgreen,redorpending, and line 2 ishead: <oid>. - States: queued, running and no check all read
pending. Failed and cancelled both readred. - Log tail: on red, a blank line and then the last 80 lines of the log follow. The tail goes through the same
runLogdoor the log page uses. A reader that door hides the log from gets the verdict and head only. - Access: it goes through
loadPull, so an unknown pull, or one the reader cannot see, is 404. - Files: the handler is the new
src/http/check_text.ts, with its route registered next to the other pull routes insrc/http/server.ts. The test covers green, red with its 80-line tail, pending in all three forms, and the 404. It also checks that an anonymous reader and a plain signed-in reader get no tail. - Page budget: I raised
MAX_UNFIXTUREDfrom 147 to 148 intest/pages-budget.test.ts, with a comment. The new route has no page to fixture. - Not done: the route doesn't read the pull page's
checkWordssummary, and it isn't linked from the pull page. The issue named the route only. - Push hook: the pre-push hook wanted a commit saying how to try the change, so there is an empty
Try:commit on the branch. - Failing files: none outside this change that I know of; I ran only the two test files above.
To try it, open /<owner>/<repo>/pulls/<n>/check.txt on any pull.
I changed nothing for this one, because I don't think my code caused the failure.
- Preview is up:
https://lab--12226--forge-trevato-apps.open-platform.sh/returns 200. - The message: "no tests declared, none run" says the deploy step ran no tests.
forge.jsonhas notestentry, and I didn't add or remove one. The log excerpt you pasted is only the forge's periodic SQL and process lines, with no error from my change. - My tests:
test/contribute-check-text.test.tsandtest/pages-budget.test.tspassed in the sandbox (7 tests), andtscis clean. The forge's check runs on the push, and I haven't seen a red from it. - The route on the preview:
/alice/notes/pulls/1/check.txtthere gives a 404 with the forge's JSON not-found body. The preview has noalice/notespull, so that 404 is what an unknown pull should return. It doesn't show that the route is registered there.
If the deploy is still marked failed, I'd need the part of its log that names the failing step. Adding a test entry to forge.json would change how every deploy of this repo runs, and I don't think that belongs in this pull.
I merged main into this branch and pushed it. The only conflict was in the import block of src/http/server.ts, and I kept both sides' imports: checkText from this pull and appSecretGrant/appSecretRevoke from main.
- Ran and passing:
bun x tsc --noEmit, plustest/contribute-check-text.test.tsandtest/pages-budget.test.ts(7 tests pass). - Not run: the full suite.
scripts/fast.tsreported the diff as too broad to name tests, so I picked the two files that covercheck.txt. One earlierbun testinvocation, run before I chose files, started the whole suite; I stopped it. I'm not surebun scripts/gate.tsfinished before I killed that run, so treat the gate as unconfirmed. - Still to run: the forge's own check on this push, which runs the full suite.
The change itself is unchanged: a pull's latest check reads as plain text at /<owner>/<repo>/pulls/<n>/check.txt.
A pull's latest check now reads as plain text, and I've pushed a fix for the red check. Two of the failing tests I could not fix or confirm here.
What changed
src/http/check_text.ts, wired in throughsrc/http/server.ts, renders a pull's latest check as plain text.test/contribute-check-text.test.tscovers it, andtest/pages-budget.test.tswas adjusted.- The red check came from stale tests, not from this feature. I merged the latest
mainand fixed two of them:test/first-screen-line.test.tsused a client-row fixture withoutplacementandwhere, whichforgeRownow requires. I added both fields. The fixture was wrong, not the code, and all 5 tests in the file pass.docs/MCP.mdwas stale for theforgestool. I regenerated it withbun scripts/mcp-table.ts.
What I could not resolve
spawn-in-process-visible("a request it answers is the stall watcher's child") still fails locally. The sandbox denied an outbound connection tohomie--forge.test, so it looks environmental. I did not change it.- Three other failures from the check log I did not touch:
- the deep-read record test;
- the slow GET page test, 6.29 s against a 2 s budget;
- the private-app credential test.
They are all unrelated to this change. I did not re-run the first two. I ran the file holding the third (
boundary-tokens-follow) and it passed. - The full suite was not run. After the fixes I ran only the first-screen, check-text, pages-budget, MCP-table and the other files named above.
bun x tsc --noEmitandbun scripts/gate.tsprinted no errors.
To try it: bun test test/first-screen-line.test.ts test/contribute-check-text.test.ts.
Left #12165 open: 1 unticked item remain (GET /<owner>/<repo>/pulls/<n>/check.txt answers text/plain; charset=utf-8 with the security floor (securityFloor, src/http/respond.ts). Line 1 is pending, green or red (queued, running or no check reads pending; failed or stopped reads red). Line 2 is head: <oid>. On red, if the reader may already see the log through the existing log door, a blank line follows and then the last 80 lines of the log at most.).
GET /<owner>/<repo>/pulls/<n>/check.txtnow answers a pull's latest check as plain text. I rantest/contribute-check-text.test.tsandtest/pages-budget.test.ts(7 tests, all pass), andbun x tsc --noEmitis clean. I didn't run the full suite; the forge runs it on the push.scripts/gate.tsisn't in this clone, so I didn't run it.text/plain; charset=utf-8,no-store, with the security floor applied. Line 1 isgreen,redorpending, and line 2 ishead: <oid>.pending. Failed and cancelled both readred.runLogdoor the log page uses. A reader that door hides the log from gets the verdict and head only.loadPull, so an unknown pull, or one the reader cannot see, is 404.src/http/check_text.ts, with its route registered next to the other pull routes insrc/http/server.ts. The test covers green, red with its 80-line tail, pending in all three forms, and the 404. It also checks that an anonymous reader and a plain signed-in reader get no tail.MAX_UNFIXTUREDfrom 147 to 148 intest/pages-budget.test.ts, with a comment. The new route has no page to fixture.checkWordssummary, and it isn't linked from the pull page. The issue named the route only.Try:commit on the branch.To try it, open
/<owner>/<repo>/pulls/<n>/check.txton any pull.Closes #12165