Public: anyone can read this; the crew can change it.
Full suite red: test/unreached.test.ts #9309
Parked 29d 14h ago
test/unreached.test.ts was red because src/actions/pindemos.ts came in with #9284 and only its own test imported it. I added API routes that call it, so the app now reaches it. The new file is src/http/api/pindemos.ts, registered in src/http/api.ts next to the cart routes.
-
Reviews
No review yet.
-
Checks
stopped parked by the crew deploy ed3a392
-
History
- Describe the pin demo routes in OpenAPI and spell their paths where the coverage tests read them ed3a392
- Say why now and how to try the pin demo routes b84ee60
- src/actions/pin_demos.ts is reached: PUT/DELETE a pin's demo, POST showcase and capture over the API 511ac14
- A pin's screenshots get a gallery page on the builds page (#9302) 485d6e5
- src/core/repos.ts has the reads a display lists from: listAdminOwnedRepos, readableRepoIds, repoDatesFor and listAllReposByOwner (#9303) 5dc23ad
- Sentinel: shared:01m23vygyffx5hg2f5vm8r74sr:1p9qyksd9g is past its budget: trevato/forge: "the page with 150 repositories costs a handful of statements, not one per repository" failed on 3 pulls… (#9300) 00c9813
- GET /api/v1/conversation/turns carries an ETag and answers a repeat with 304 until a turn, a queued message or the running state changes (#9287) a727eac
- Full suite red: test/work-branch.test.ts (#9295) c8658a9
- Jay Moran's pin demos are on main: src/actions/pin_demos.ts, with launchOf in src/git/builds.ts (#9284) d6a65d8
- GET /api/v1/repos/:owner/:name/app/notes carries an ETag and answers a repeat with 304 until a note arrives or is moderated (#9293) e75705e
- GET /api/v1/conversations carries an ETag and answers a repeat with 304 until one of the viewer's conversations changes (#9298) 8dcad6e
- GET /api/v1/repos/:owner/:name/following/proposals carries an ETag and answers a repeat with 304 until a proposal to the parent changes (#9297) a95e5c5
- Forks copy a pin's refs/shots with its refs/builds (#9271) 53d4300
- GET /api/v1/repos/:owner/:name/builds/:label/shots/looks carries an ETag and answers a repeat with 304 until a new look of the pin's commit is taken (#9289) e1e9d62
- The owner's bets page fits a 390 px phone: no sideways scroll and no proposed bet card taller than the screen (#9286) 8c5bef4
- GET /api/v1/repos/:owner/:name/builds/:label/shots carries an ETag and answers a repeat with 304 until a shot is added, removed or reordered (#9288) bbb82b4
- GET /api/v1/agents and /api/v1/agents/:username carry an ETag and answer a repeat with 304 until an agent is added, changed or removed (#9285) 54b49cc
- GET /api/v1/version carries an ETag and answers a repeat with 304; a harness probing it on every connect pays a header (#9257) 425aaf9
- Activity wording for build.shots events (#9280) c465bea
- A cart nobody gave a cover still has one: Jay Moran's src/arcade/cover.ts and cover-template.png are on main and tested (#9283) f8b6d4e
3 earlier comments
test/unreached.test.ts was red because src/actions/pin_demos.ts came in with #9284 and only its own test imported it. I added API routes that call it, so the app now reaches it.
The new file is src/http/api/pin_demos.ts, registered in src/http/api.ts next to the cart routes. All four routes need the rw scope and a person who can write the repository:
PUT /api/v1/repos/:owner/:name/builds/:label/demosaves the demo (saveDemo).DELETE …/democlears it (deleteDemo).POST …/showcasewith{on}puts it in or takes it out of the showcase (setShowcase).POST …/capturebuilds the pin's page (captureBuild) and answers 202 while the capture runs.
test/pin-demos-api.test.ts covers the refusals (no token gets 401, a non-writer is refused), saving, showcase on and off, an invalid demo (422), capture on a pin that doesn't open as a file (409), and clearing (404 the second time). test/unreached.test.ts, test/pin-demos.test.ts and the new test pass, and tsc --noEmit and scripts/gate.ts are clean. I did not run the full suite; the forge runs it on the push.
I did not add a page or button on the Iterations page for any of this. The doc comments in pin_demos.ts mention a Showcased chip and a "Build and play" action, and those are a separate UI issue. I also left scripts/unreached-allow.json alone, since that list should only shrink.
To try it, create a pin, then curl -X PUT -H "authorization: Bearer $TOKEN" -d '{"name":"Karts","version":"1","page":"/","showcase":true}' $FORGE_URL/api/v1/repos/alice/karts/builds/v1/demo.
🤖 Generated with Claude Code
test/unreached.test.ts was red because nothing under src/ imported src/actions/pin_demos.ts. This pull adds API routes in src/http/api/pin_demos.ts that call it, so the app now reaches it.
The check had failed on the gate's commit-message rules, not on code. The gate now passes locally, and I added an empty commit with the missing "Why now:" and "Try:" lines. I did not re-run the tests this round, and the forge's check on this push is what will confirm it.
The routes need an rw token and a person who can write the repository:
PUT /api/v1/repos/:owner/:name/builds/:label/demosaves the demo.DELETE …/democlears it.POST …/showcasewith{on}puts it in or takes it out of the showcase.POST …/capturebuilds the pin's page and answers 202 while the capture runs.
test/pin-demos-api.test.ts covers the refusals, saving, showcase on and off, an invalid demo, capture on a pin that doesn't open as a file, and clearing.
I did not add any page or button for demos; that would be a separate UI issue. I also left scripts/unreached-allow.json alone, since that list should only shrink.
Try: on the preview, send PUT /api/v1/repos/<owner>/<repo>/builds/<label>/demo with an rw token and the body {"name":"Karts","version":"1","page":"/","showcase":true}.
🤖 Generated with Claude Code
The two OpenAPI coverage failures are fixed and pushed. I couldn't reproduce the three shard-27 failures, so I made no change for them.
What was wrong. The new pin demo routes in src/http/api/pin_demos.ts built their paths from a lowercase base template constant. The two OpenAPI coverage tests (test/openapi-coverage.test.ts and test/openapi.test.ts) read paths with a regex and couldn't resolve that. The four routes also had no OpenAPI description.
What I changed.
src/http/api/pin_demos.tsnow spells each path out as a literal string. Behaviour is the same.- I added four route descriptions under
src/contract/openapi/routes/and regeneratedindex.ts:PUT /repos/{owner}/{name}/builds/{label}/demoDELETE /repos/{owner}/{name}/builds/{label}/demoPOST /repos/{owner}/{name}/builds/{label}/showcasePOST /repos/{owner}/{name}/builds/{label}/capture
What I ran. bun test test/openapi test/pin-demos-api passes (435 tests), and bun x tsc --noEmit is clean. I did not run bun scripts/gate.ts.
The three shard-27 failures. They were "home waiting line > three asks show one line linking to /review", the MCP feed card test, and the agent-spend row test. They sit in test/home-kpi-row.test.ts, test/mcp.test.ts and test/tui-scorecard-spend.test.ts, which pass together here (88 tests). This change only touches API route registration and OpenAPI rows, so I think they are order-dependent or flaky in the shard. If they fail again on this push, the log should show what they depend on.
What I chose not to do. I left the other routes and tests alone.
To try it. bun test test/openapi test/pin-demos-api.
🤖 Generated with Claude Code
test/unreached.test.tswas red becausesrc/actions/pin_demos.tscame in with #9284 and only its own test imported it. I added API routes that call it, so the app now reaches it.The new file is
src/http/api/pin_demos.ts, registered insrc/http/api.tsnext to the cart routes. All four routes need therwscope and a person who can write the repository:PUT /api/v1/repos/:owner/:name/builds/:label/demosaves the demo (saveDemo).DELETE …/democlears it (deleteDemo).POST …/showcasewith{on}puts it in or takes it out of the showcase (setShowcase).POST …/capturebuilds the pin's page (captureBuild) and answers 202 while the capture runs.test/pin-demos-api.test.tscovers the refusals (no token gets 401, a non-writer is refused), saving, showcase on and off, an invalid demo (422), capture on a pin that doesn't open as a file (409), and clearing (404 the second time).test/unreached.test.ts,test/pin-demos.test.tsand the new test pass, andtsc --noEmitandscripts/gate.tsare clean. I did not run the full suite; the forge runs it on the push.I did not add a page or button on the Iterations page for any of this. The doc comments in
pin_demos.tsmention a Showcased chip and a "Build and play" action, and those are a separate UI issue. I also leftscripts/unreached-allow.jsonalone, since that list should only shrink.To try it, create a pin, then
curl -X PUT -H "authorization: Bearer $TOKEN" -d '{"name":"Karts","version":"1","page":"/","showcase":true}' $FORGE_URL/api/v1/repos/alice/karts/builds/v1/demo.🤖 Generated with Claude Code
Closes #9306