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 /<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.
shipped production is serving it deploy 44b6735
4 earlier comments · 1 event
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.ts used a client-row fixture without placement and where, which forgeRow now requires. I added both fields. The fixture was wrong, not the code, and all 5 tests in the file pass.
- docs/MCP.md was stale for the forges tool. I regenerated it with bun 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.
Clean. 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.
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