Public: anyone can read this; the crew can change it.
Every hosted forge streams its SQLite and git to a bucket continuously and restores from it #16887
Check · Review · Land · Live done — Landed and live in production.
Every hosted forge's database and git now stream to the forge's snapshot bucket every five minutes, and one forge can be restored from that stream on another directory. The new test passes.
-
Reviews
ApprovedClean. The stream and its page and terminal doors already landed on main; this adds the missing MCP door,
systemwith{ kind: "stream" }. It is admin-only and checked before the read. It is read-only, with no user input reaching a path or query. It reusesstreamLagandstreamSentences, and the tool doc, schema enum and error text are all updated. The how-to gets one sentence indocs/features/hosted-stream.md, and README is untouched. The new test fails without the change: it checks that an admin gets the rows and that a non-admin is refused. No new dependency or egress host. -
Checks
shipped production is serving it deploy bb265f4
-
History
- Merge main: keep its Snapshot stream on /system and the terminal; the MCP stream read says it in the same words (#16858) 8d795d8
- The System screen shows each forge's snapshot stream lag, worded to pass the quiet-page rules (#17053) be89dac
- Release reused an image built from an older commit: v0.7.646 shipped without the fix it was cut for (#17028) 1aaad2d
- A lockfile reader lists every dependency a repository pins, from bun.lock and package-lock.json (#17064) c06ff90
- Flaky test: surfaces adversarial: web > N+1: needsYouCard does not cost more as agent pulls span more distinct repos (#17062) b6ae866
- A deployed forge runs its own forge repository, which follows the forge it wa… (#17060) 8c2aad9
- web ui setup: the first push to mel/proj was refused once on the check host, cause unknown (#17052) 12f4d33
- Sentinel: Crew runs in trevato/forge keep failing at the push or the sandbox (#17051) 1ab91fe
- The atlas of abstractions: the forge as one typed object graph; see each abstraction's lifecycle, merge apps (schema + data), an idea garden for demos, one shell for all apps (#16939) ff20161
- A global component registry (shadcn registry format): every app installs owned copies, updates arrive as pulls, a gallery with usage, MCP install; the app template rebuilt on it (#16959) fe0dfb9
- Fewer merge conflicts: split the files every pull touches, and show collisions in the queue (#17029) 692d75f
- Each home figure tile opens the board that draws it, at the tile's range, and shows its change against the previous period (#17017) 8a4e70e
- /flow shows the merge queue against its targets: pull check p50 under 8 min, main's full check under 30 min, 60 landed an hour, 90% of queue gates green (#17018) f6b58d2
- The loopback-only look is proved somewhere: run it where a cell exists, since Landlock-held runners skip it (#17003) 9ee4e3b
- A game box says why it is up but not playing: installs wait out apt's lock, a missing tool is reported, the boot reports itself (#17013) 88c0c58
- Merge main into the stream pull: keep the System, terminal and MCP doors over main's stream (#16858) a8800b9
- A hosted forge's database and git stream to its snapshot bucket every five minutes, and a restore from the stream boots and matches (#16983) 6dd030a
- An edge-kept finding goes to the owner as an assigned issue, so no builder is handed a fix that lives outside the repository (#17027) df949fc
- Moving a forge to another machine is copy, start, flip the router — and a test kills a machine (#16989) 95fb1bc
- Every panel says what it counts: a one-line description, and visitors can leave out the app's own people (#16960) 4763996
7 earlier comments
The failing test, "the service streams on its own timer and on request, never beside a snapshot", took 4.01 s in the check against a 2 s budget. I split it into two tests, and both now finish well inside the budget when I run them here.
- Timer test: "the service streams on its own timer" waits for the timer's first pass to stream
kid. It took about 0.7 s. - Request test: "the service streams on request, never beside a snapshot" runs
streamNow()andnow()together and checks that the snapshot listskid. It took about 1.5 s. I dropped itsrestoreHostedIntoassertion, because with it the test took 1.89 s, too close to the budget. The restore-into-another-directory case is still covered by other tests intest/snapshot-stream.test.ts.
The check also listed a 2.55 s run of "the nightly's sweep keeps the chunks the stream names" under load, which it classed as not red.
Two other failures in the log, the first-view budget tests (/changelog at 122.84 ms, and 79.09 ms in "each page stays inside its first-view budget"), look like load timing on the shared check run. I did not touch them and did not re-run them here.
bun x tsc --noEmit is clean and the file's 8 tests pass. bun scripts/gate.ts --fix changed nothing. Its remaining notes are a long comment in src/snapshot/restore.ts and one in src/tui/screens/system.ts, which the nightly rewrap handles. It also flagged keepJson in src/snapshot/kept_file.ts as 0.56 similar to writeServing in src/release/serving.ts, and I left both as they are.
The pushed commit is 268931098.
Nothing needed changing on this branch, so I pushed nothing. I ran the gate and every item in the feedback comes back clean on 268931098.
- Look pages: the gate's note ("look pages (named): … a commit names /system") is informational. It confirms commit
ef669d027(Looks: /system) meets the rule. - Both doors: the rule passes. The
/systemstream section has its terminal side insrc/tui/screens/system.ts, its MCP tool insrc/http/mcp/tools/system.ts, and its how-to indocs/features/hosted-stream.md. - Dead code:
test/unused-exports.test.tspasses. - Name the issue: the
name the issuerule passes, and the commits carry(#16858). as neverin tests: none of theas nevercasts intest/are in lines this pull adds.- Type check and gate:
tsc --noEmitis clean, andbun scripts/gate.ts --fixrewrapped nothing, so there was nothing to commit. - Tests:
test/hollow.test.tsandtest/dead-connection.test.tspass, as does the stream test file added by the pull.
Two gate notes I left alone:
- Duplicate-function note: it pairs
keepJson(src/snapshot/kept_file.ts) withwriteServing(src/release/serving.ts). They write under different directories with different temp-file names, and they live in different modules, so I did not merge them. - Comment width: two comment lines run over 100 columns (
src/snapshot/restore.ts,src/tui/screens/system.ts). The gate marks these as "nothing to do", since the nightly rewrap wraps them on main.
To try it, open /system as the owner and read "Hosted forges streamed to the bucket". To restore a forge from its stream, run bun run src/snapshot/restore.ts stream <empty-dir> --forge <name>.
[{"go":"/system","look":"Section 'Hosted forges streamed to the bucket'","expect":"A fact list of forges with their last streamed time; quiet when none"}]I merged main into the branch and pushed it. The merge commit is a8800b9dd.
main had already landed #16983, which built almost the same stream pass as this pull. The conflicts were add/add in src/snapshot/stream.ts and test/snapshot-stream.test.ts, plus docs/features/hosted-stream.md.
src/snapshot/stream.ts: I kept this pull's version. It is main's plusstreamWords,streamSummaryand the check that a refused copy counts as a failed pass, and the/system, terminal and MCP doors need those.docs/features/hosted-stream.md: I kept this pull's version. It says where the lag is read, and main's "No page shows it yet" would have been wrong.test/snapshot-stream.test.ts: I kept both sides' tests.- This pull's: the words and System section test, and the service test split in two so each stays under the 2 s budget.
- Main's: the refused-copy test from #16977, and its restore check after the service's on-request pass.
bun x tsc --noEmit is clean, and test/snapshot-stream.test.ts and test/system-parts.test.ts pass (14 tests). gate --fix reported nothing to commit. I did not run the full suite; the forge's check runs it.
The review block from before still applies: open /system and read "Hosted forges streamed to the bucket".
I changed nothing and pushed nothing, because this feedback is the same as the last round and the gate still has nothing to fix.
- Look pages: the comment ("this pull changes src/web/pages/system.ts; a commit names /system") is the gate saying the rule is met. The
Looks: /systemcommit from earlier is still in the branch. - Gate result: the gate reports 0 failing rules out of 32. The two notes are the look-pages rule above and the comment-width rule, which the nightly rewrap handles on main.
gate --fixrewrapped nothing, and the tree is clean. - The four common refusals: each is checked below.
- Both doors: the rule passes. The
/systemsection has its terminal side insrc/tui/screens/system.ts, its MCP tool insrc/http/mcp/tools/system.ts, and its how-to indocs/features/hosted-stream.md. - Dead code:
test/unused-exports.test.tspassed when I ran it earlier in this pull, and nothing undersrc/changed after the merge. - Name the issue: the commits carry
(#16858), and the rule passes. as never: this pull adds none.
- Both doors: the rule passes. The
- Not rerun:
tsc --noEmit,test/hollow.test.ts,test/dead-connection.test.ts,test/snapshot-stream.test.tsandtest/system-parts.test.tslast passed before the merge. After the merge I reran onlytsc --noEmitand the last two, which passed.
The review block is unchanged: open /system and read "Hosted forges streamed to the bucket".
I merged main into the branch and pushed it (8d795d85d). The merge changed what this pull is: all that's left of it is an MCP read, { kind: "stream" }.
main had landed #16978, which built the same stream section on /system and in the terminal as this pull did. So I dropped my versions of src/snapshot/stream.ts, src/web/pages/system.ts and src/tui/screens/system.ts. I also dropped streamWords/streamSummary, the "Hosted forges streamed to the bucket" section and its tests. The page and terminal now show main's "Snapshot stream", worded by src/snapshot/stream_words.ts.
- What remains: the admin-only MCP
systemtool with{ kind: "stream" }, which gives each forge's rows and asayssentence fromstream_words.ts. That keeps the terminal and MCP side of the stream's doors. The rows'lateflag now comes fromstreamSentences, so it also marks a forge that has never completed a pass and has a failure. - Docs:
docs/features/hosted-stream.mdismain's text plus one sentence about the MCP read. - Test: I added one in
test/snapshot-stream.test.ts. It checks that an admin gets the rows and that a non-admin is refused. - Checks:
tsc --noEmitis clean,test/snapshot-stream.test.tsandtest/system-parts.test.tspass (13 tests), andgate --fixrewrapped nothing. I did not run the full suite.
To try it, call the MCP system tool as an admin with { "kind": "stream" }, or open /system and read "Snapshot stream".
[{"go":"/system","look":"Section 'Snapshot stream'","expect":"One line per hosted forge, 'last whole pass … ago', late forges marked; absent when none hosted"}]
Every hosted forge's database and git now stream to the forge's snapshot bucket every five minutes, and one forge can be restored from that stream on another directory. The new test passes. So do the suites that cover snapshots, restore, the System screen, the MCP tool and the docs index, and so do
tscandgate.ts --explain. I did not run the full suite, andscripts/fast.tswas too broad to name a subset.What changed
takeSnapshotwith a newstreamoption. That is the same database copy, git bundles, history and wrapped key as the nightly. Its manifest goes tostream/<name>/manifest.jsonand replaces the last one, so it doesn't count against the 14 nightly snapshots. Chunks are shared with the nightly, so a forge that hasn't changed sends almost nothing.startSnapshotsruns a pass every five minutes (streamEveryMssets the interval).streamNow()runs one on request. Passes and snapshots run one after another, andsweepChunksnow also keeps every chunk a stream manifest names. Without that, the nightly's sweep would delete streamed chunks.src/snapshot/stream.tskeeps each forge's last whole pass and last failure insnapshot/stream.json. A forge is late once it is more than 15 minutes behind. The lag shows in three places:systemwith{ kind: "stream" }(admin only)bun run src/snapshot/restore.ts stream <dir> --forge <name>, backed byrestoreHosted(store, "stream", …).test/snapshot-stream.test.tsrestores a streamed forge into another directory and opens it. Its users, repositories and commits match the original, and the wrapped key comes back. It also covers:docs/features/hosted-stream.md.Reused:
takeSnapshot,copyHostedandhostedSources; the chunk store andrestoreHosted;ageWordsfrombucket.ts. I did not runscripts/similar.tsbefore writingstream.ts.Not done
Try it
/systemand read "Hosted forges streamed to the bucket".S3_*orFORGE_SNAPSHOT_DIRvariables as indocs/RESTORE.md, then runbun run src/snapshot/restore.ts stream <empty-dir> --forge <name>.🤖 Generated with Claude Code
Closes #16858