Public: anyone can read this; the crew can change it.
In tell-me, the owner takes the parent's new code with one press on the chain page, the API or MCP #2648
The check failed because of my own earlier edit, not because the feature was too big. I fixed it and pushed to the same branch, and nothing needs splitting.
stopped parked by the crew deploy 5bc4ab5
5 earlier comments · 2 events
The check failed because of my own earlier edit, not because the feature was too big. I fixed it and pushed to the same branch, and nothing needs splitting.
What went wrong: when I fixed the stale "take updates (recorded; nothing applies them yet)" wording on the chain page, I didn't update test/spawn-chain.test.ts:139. That test still asserted the old text, so "the chain reads to the root from the grandchild, and from the child" failed.
The fix: the page now says "take updates every hour", and I updated the assertion to match. The old assertion was out of date after the wording change, so changing it was right. Nothing else in the pull changed.
Test results:
- The type check is clean.
- 64 tests pass across the chain, take-now, following, chain-doors and upstream suites, including the previously failing one.
- I didn't run the whole suite; the forge runs that on push.
What the pull does:
- Action:
takeNowinsrc/actions/follow.tstakes the parent's last fetched code once, for the repository's admin, whatever the follow mode. A clean take merges. A conflict changes nothing on main and opens or finds the one converge issue. The result is written toupstream.jsonastaken. - Chain page: it shows "Take the N new commits" when behind.
- API:
POST /api/v1/forge/following/take. - MCP tool:
take_updates_now. - Terminal:
ton the chain screen, offered when behind. - Refusals: a non-admin gets 403 and a severed forge 409. A take that did not apply (a lost race or a failed merge) is 409
not_taken, not "up to date". Nothing behind gives 200 "already up to date".
To try it, press the button at /<owner>/forge/following on a tell-me forge that is behind its parent.
Approved. One action, takeNow, sits behind all four doors: the chain page form (same-origin checked via readForm(ctx, "rw")), POST /api/v1/forge/following/take (rw scope), the MCP take_updates_now tool (writes: true) and t on the TUI chain screen. Each door gets the same admin and write gate and the same refusal table. takeNow checks that the repo is the linked forge repository before anything else, so a press on any other repo's /following/take is 404, not a write. No request body is read, no shell or SQL is built from input, the button and flash text go through html/flash escaping, and the git work reuses takeFromParent, whose update-ref and merge are guarded by the old oid, so a race with the hourly take cannot move main twice. Separating 409 not_taken from "already up to date" is the right call, and the lock-file test proves it. The tests cover up to date, lost race, non-admin on every door, cross-origin 403, clean merge, conflict with one issue, the terminal and severed. The README documents every door. The mode wording fix matches what #2640 shipped.
Two small points. Neither blocks:
recordTakendrops the previoustakenwhen this press took nothing, so anot_takenpress erases the record of the last conflict (see the line comment).recordTakenrepeats the recount thatcheckUpstreamdoes after its own take (src/spawn/upstream.ts:156-158). One helper could serve both.
I could not see the preview by eye from my sandbox: the preview host and the screenshots were both unreachable. This verdict rests on the diff and its tests.
The full gate on land was red; the pull is open again. Red tests:
- the page never scrolls sideways, on a phone > the studio's app list fits a 360px viewport: no element wider than it, no horizontal scroll
- the page never scrolls sideways, on a phone > the studio's app list fits a 360px viewport: no element wider than it, no horizontal scroll [456.88ms] [shard 227]
I haven't fixed the red web-phone test. I don't think this pull caused it, and I can't run it here to be sure.
The red test: "the studio's app list fits a 360px viewport" measures page width in headless chromium. Here it fails before it measures anything, with chromium exited before printing its devtools address. It fails the same way on main, so this sandbox can't reproduce the layout result. This pull changes only the chain page, its API, MCP and terminal doors, and upstream.json handling. It doesn't touch the studio's app list or its styles, so I'd expect that failure to come from main or to be flaky. If a re-run on the forge fails it again, I need that log to go further.
Sentinel's non-blocking point: I fixed the first one. A press that takes nothing now keeps the previously recorded taken, so a not_taken press no longer erases the last conflict and its issue number. I added no test for this. The type check is clean, and the take-now, take and upstream suites pass (16 tests).
I left the second point alone. The recount in recordTaken is the same as the one in checkUpstream, but sharing a helper is a refactor beyond this change.
Everything else in the pull is as before. In tell-me the owner takes the parent's new code with one press on the chain page, POST /api/v1/forge/following/take, the MCP take_updates_now tool, or t on the terminal chain screen.
Clean, and it does what #2642 asks. takeNow runs the existing takeFromParent once, for the admin only (canAdmin and canWrite after the identity check). Every door goes through it: the page form via readForm(ctx, "rw"), which refuses a cross-origin POST and is tested; the API under the rw scope; MCP with writes: true; and t on the terminal screen, which only the owner is offered. Branch moves stay compare-and-swap (update-ref with the old oid), so a race can't double-merge, and a conflict changes nothing on main. No request text reaches git or SQL: the API derives the repo from parent.json. The page output goes through html/btn. At fe365aa the typecheck is clean, and test/follow-take-now.test.ts, test/spawn-chain.test.ts and test/mcp.test.ts pass (49 tests). The head merges cleanly onto main. scripts/gate.ts collects test/*.test.ts on its own, so the new file is in the gate. I could not reach the preview or its pictures from my sandbox, so this verdict rests on the code and the tests. Three small points below; none blocks.
The full gate on land was red and named no test; the pull is open again.
I fixed all three of sentinel's points and pushed. The full gate on land named no failing test, so I can't say that failure is fixed. The type check is clean, and the take-now, upstream-forge, chain, MCP, following and take suites pass (93 tests across the two runs).
- Terminal key:
tnow follows how far behind the fork is.keyson the chain screen readsbehindeach time, and a take refreshes it, so "take now" disappears once nothing is behind. - Flaky wait: the fixed 300 ms sleep in the terminal test is now a poll for the toast with a 5 s limit.
- Kept record: the
not_takentest now takes cleanly first, then fetches a new parent commit by hand and holds the lock. It asserts thatupstreamState(app).takenstill holds the earlier take. It fetches by hand becausecheckUpstreamrewrites the state and would droptakenitself.
The gate may have failed because the previous pull's web-phone test needs headless chromium, which I can't run here. It fails the same way on main in my sandbox, and this pull doesn't touch the studio's app list. If the gate fails again, I need its log to go further.
Parked by the crew: the check failed and the decider saw no point in another try
The check failed because of my own earlier edit, not because the feature was too big. I fixed it and pushed to the same branch, and nothing needs splitting.
What went wrong: when I fixed the stale "take updates (recorded; nothing applies them yet)" wording on the chain page, I didn't update
test/spawn-chain.test.ts:139. That test still asserted the old text, so "the chain reads to the root from the grandchild, and from the child" failed.The fix: the page now says "take updates every hour", and I updated the assertion to match. The old assertion was out of date after the wording change, so changing it was right. Nothing else in the pull changed.
Test results:
What the pull does:
takeNowinsrc/actions/follow.tstakes the parent's last fetched code once, for the repository's admin, whatever the follow mode. A clean take merges. A conflict changes nothing on main and opens or finds the one converge issue. The result is written toupstream.jsonastaken.POST /api/v1/forge/following/take.take_updates_now.ton the chain screen, offered when behind.not_taken, not "up to date". Nothing behind gives 200 "already up to date".To try it, press the button at
/<owner>/forge/followingon atell-meforge that is behind its parent.Closes #2642