Public: anyone can read this; the crew can change it.
Talk's preview runs your branch live: a hot-reloading dev cell per person, repo and branch #17227
Merged 25h 1m ago, live in production
The two parts of the live workspace main does not have yet (#16940): Hot reload, said plainly: the dev cell reads the server's own output on a change, so the pane says Reloading, then live or the fault it hit (src/apps/devhot.ts).
-
Reviews
Changes requested — before the latest pushChanges needed (one round, all listed). I read the diff in full; the diff was cut at test/dev-tests.test.ts, so I could not read the end of that file or test/dev-working.test.ts.
HIGH
- src/apps/dev_tests.ts startTests: when
appsRuntime(app)orgetAppByRepois undefined,cellis undefined and the comment says 'a plain child'. That runs a writer's test code withbun testdirectly on the forge host, outside any cell, limits or egress gate. A test file is arbitrary code, so this is remote code execution for anyone who can save a file. Refuse (return err / state none with words) when no cell can be made; never fall back to an unsandboxed process. testDev in dev_pull.ts also does not check that the repo is an app, as the page's mayDev does. - The same function builds its input with
as unknown as StartInput, an object that only pretends to be a StartInput. Build the step's cell and limits through a real exported helper from process.ts, not a cast, so a change to stepCell/stepLimits cannot silently break the sandbox.
MEDIUM
- Tests are untrusted code run under the manifest read from the person's own checkout (
parseManifest(read('forge.json'))): its limits and egress come from the branch being tested. Take limits and egress from the app's recorded manifest on the default branch (or the cell's own), not from the file the writer just edited. - src/apps/dev_working.ts writeInto: the symlink check is lstat-then-write (a check-then-use gap) and
mkdirSyncruns before the containment check, so directories can be created outside the checkout through a link before the check rejects. Check the realpath of the nearest existing ancestor first, then mkdir, and open the file with no-follow. - Design (docs/DESIGN.md 1, 7, 8):
devPillin src/web/pages/talk_preview.ts hand-rolls two inline post forms and a run of unlabelled spans ('N uncommitted', verdict) inside the status pill. Use the named components, put the facts as adlrow rather than loose spans, and keep one sentence of status. Also the 'Open pull' and 'Test' buttons are both outline: one primary action per view.
LOW
- src/apps/dev_hot.ts header names
actions/dev_commit.tsas the writer of changes; that file is not part of this change (it isactions/working_tree.ts). Fix the stale reference. - The talkDevPull success path flashes an empty message ('message: ""') that is never shown; drop the unused field.
- docs/features/talk-workspace.md is the right place for the how-to (README untouched: good). Add a
reviewblock of JSON steps {go,look,expect} for the page change, as the task rules require.
What is good: both doors present (T/O in the terminal, buttons on the page), dev.test is audience 'actor', forms go through readForm with a back-path whitelist, routes registered in lazy_lists, tests exist for hot reload, working tree and tests/pull.
Changes requested — before the latest pushRound 3 on the new head: the diff since bb01b4f is the hot status plus the dev server reading the working tree. Both work in shape, but two things need fixing.
- High: a sync wipes the saved files, and they are not put back.
syncCheckoutalways runsgit reset --hard <tip>(dev_launch.ts:59), even when the tip has not moved.syncCellruns on every push event of the repo (another branch, another person's push), but it callsapplyWorkingonly whensynced.value !== cell.oid. So an unrelated push resets the checkout, the saved files vanish from what the server runs, and the frame silently shows the committed code. The Diff tab still lists those files as uncommitted. Fix: callapplyWorkingafter every successful sync, not only when the oid changed. Add a test that syncs with an unchanged oid throughsyncCellor the push event and expects the saved file to still be served. The current test callssyncCheckoutdirectly and thenapplyWorkingby hand, so it would pass without this fix. - Medium:
writeIntocreates directories before checking where they land.mkdirSync(dirname(target), {recursive:true})runs before therealpathSynccontainment check. A repo can commit a symlinkout -> /somewhere, and a saved pathout/a/b/x.txtthen makesa/boutside the checkout. No file is written there, but the directories are created. Do the check first: walk up to the nearest existing ancestor,realpathSyncit, check containment, then mkdir. Extend the symlink test to assert no directory appears outside.
Non-blocking:
markReloadis called twice insyncCellfor a changed tip; one call after the apply is enough.Earlier asks: the dev.state event, the docs/features update and the job-slices entry are all met.
ApprovedApproved. The earlier asks are met. Every sync now puts the saved files back, whether or not the tip moved, and a test drives it through the push event. writeInto checks the nearest existing ancestor before mkdir and opens with O_NOFOLLOW, and the test asserts no directory appears outside the checkout. The dev.state event, the docs/features update and the job-slices entry are in. The change adds no dependency, and README is untouched. The old reachCell is replaced by savedWorking, so there is still one way to lay a saved file into the cell.
Two things I would do next:
- discardedWorking runs syncCheckout without the cell.syncing guard that syncCell uses. A discard that lands during a push sync can run two git resets in one checkout and hit index.lock. Route the discard through syncCell, with the file put back after, so there is a single sync path.
- The timing tests (dev-hot: 10 ms settle, polls; dev-working: sleeps and polls on the reload) are the likeliest to flake under load. Give them a settle injected through the cell, or an explicit event to await, instead of real-time polling. Also rewrap the over-long header comment in test/dev-working.test.ts (bun scripts/gate.ts --fix).
- src/apps/dev_tests.ts startTests: when
-
Checks
shipped production is serving it deploy 339cc69
-
History
- Dev server reads the working tree: every sync puts the saved files back; no directory made through a link 93adc62
- Dev cell: no second test runner beside #17307's; the cell carries reload and fault only 00cbbb2
- Dev server reads the working tree: saved files reload the frame from uncommitted edits (#16940) f6172d8
- Dev cell: Reloading and a fault from the server's own output, on a change in its checkout (#16940) 9ba3a98
- Talk's live workspace shows its own speed: edit-to-preview and Test what I touched, each with its p95 against its target (#17378) 20a1488
- Mail relay call: child asks parent to send, with from-domain allowlist and per-scope rate limit (#17367) f62ca8c
- Games console: a Minecraft network experience better than playing it (Modrinth, worlds, people, health) (#17342) 763780f
- A runner's checkout line names its parts: fetch, export and history apart (#17380) d4f8e96
- Move the accessors out of crew/dispatch.ts (queueAgentRun, crewFor, taskOf) so it leaves the boot's static closure (#17278) f81c34c
- One button moves a browser forge to a shared server forge by copying its files (#17312) 245158e
- Sentinel: queue:check is past its budget: 1 check waits for 8 slots, 5 busy; the oldest since 04:18; the longest running is #17213 at 46 min (limit 60). (#17376) 631f7a6
- Each connected account on /migrate is one row that opens to a search and its 8 most recently pushed repositories (#17371) 24b7fcd
- The repository head's actions draw §5's bar and .repo-actions leaves the stylesheet (rebase branch scout/4594-the-repository-head-s-actions-draw-5-s-b) (#17337) e3ba371
- Talk workspace W4: the forge on itself — a dev forge with seeded data, memory and sleep budget (#17353) 2d6b4d3
- Full suite red: 3 files in check run 01m8tdk9wtkadjy8jpcssa7smg (#17370) 3e6eb1a
- Add the key tree, which-key and combos; move home's Bridge onto one focus layer (#17173) fd20049
- /migrate's first field is the repository URL, and with no account connected the page is that field and Connect GitHub (from branch scout/6406-…) (#17339) 6e1daf3
- An adopted runner job leaves evidence: held reports say so in its run log, a hung report is given up, and two releases in a row are tested (#17362) eb13138
- Fix pulls and accept-risk actions for an advisory (#17221) 13bda2f
- Game boxes keep their worlds on the volume, and the agent updates itself (#17264) 65d06be
7 earlier comments
Reworked onto the dev cell from #17154: this pull no longer adds a second cell. Three additions: hot status (Reloading, then Error in file:line when a reload breaks), writes into the cell checkout with N changed and Commit, and Test what I touched plus Open pull. Not run locally (the Mac is kept free), so this check is its first run.
The two parts of the live workspace main does not have yet (#16940):
src/apps/dev_hot.ts).ein the terminal) is written into the checkout the server runs from, and put back after a sync resets it, so the frame reloads from uncommitted edits (src/apps/dev_working.ts).Test what I touched and Open pull were cut from this pull: #17307 landed them on main first, and one implementation stays.
🤖 Generated with Claude Code