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 c8785d3
-
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
26 earlier comments
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 tsc and gate.ts --explain. I did not run the full suite, and scripts/fast.ts was too broad to name a subset.
What changed
- Stream pass: each hosted forge is taken on its own through
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. - Service:
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. - Lag:
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:- the System page's new "Hosted forges streamed to the bucket" section (owner only)
- the terminal System screen
- MCP
systemwith{ kind: "stream" }(admin only)
- Restore:
bun run src/snapshot/restore.ts stream <dir> --forge <name>, backed byrestoreHosted(store, "stream", …). - Test:
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:- a second pass sending almost nothing
- the nightly's sweep keeping streamed chunks
- a failed pass keeping the last good time
- the service timer
- the new System section's HTML
- Docs:
docs/features/hosted-stream.md. - Egress: unchanged. The stream uses the existing snapshot destination, so no new host.
Reused: takeSnapshot, copyHosted and hostedSources; the chunk store and restoreHosted; ageWords from bucket.ts. I did not run scripts/similar.ts before writing stream.ts.
Not done
- The off-box mirror still copies nightly snapshots only, not the stream.
- The stream covers hosted forges only. The parent forge itself stays on the nightly.
- Only the stream test and the suites named above were run.
Try it
- As the owner, open
/systemand read "Hosted forges streamed to the bucket". - To restore one forge, set the
S3_*orFORGE_SNAPSHOT_DIRvariables as indocs/RESTORE.md, then runbun run src/snapshot/restore.ts stream <empty-dir> --forge <name>.
[
{"go": "/system", "look": "the section \"Hosted forges streamed to the bucket\" between Footing and Off-site backup", "expect": "one summary line, and a row per hosted forge with its lag (\"N min behind\", or \"not streamed yet\"); a forge with no hosted children says \"No hosted forges to stream.\"", "ask": "Is a 15-minute lateness bar the right line?"}
]
🤖 Generated with Claude Code
<!-- look-pages 04ac9d8875da --> Look pages for 04ac9d8, from the gate:
look pages (none): this pull changes src/web/pages/system.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
I pushed a commit that declares the "both doors" exception, which was the only rule that failed. I did not re-run the gate or any tests after the push, so I haven't confirmed the check now passes.
- Both doors: the commit message carries a
No door:line.src/snapshot/stream.tsis a background job's state file. Its terminal view already exists insrc/tui/screens/system.ts(streamLines, which imports fromstream.ts), so no new screen was needed. The change is an empty commit, so it adds no code. - Duplicate note: the gate still flags
noteStreamandnoteHostedas identical atomic-write helpers. It's a note, not a failure. I left it alone rather than merge the two writers in this fix. - Comment rewrap:
bun scripts/gate.ts --fixchanged nothing, so there was nothing to commit for the long comment lines. - Look pages: the gate couldn't trace the
/settings/security/controlsroute forsrc/web/pages/system.ts. That one is also a note, and I didn't add aLooks:orNo look:line.
I pushed an empty commit whose message has a Looks: src/web/pages/system.ts line, to answer the gate's look-pages note. I haven't seen the check's verdict on it yet.
The gate couldn't trace a page from src/web/pages/system.ts because it picked up the /settings/security/controls route, whose handler is wrapped. That page is a different file, security_controls.ts. The page this change touches is /system, which shows "Hosted forges streamed to the bucket", so I named src/web/pages/system.ts. The gate's note was about missing look pages, not a failure, so I didn't change any code.
<!-- look-pages 1df9555358a4 --> Look pages for 1df9555, from the gate:
look pages (none): this pull changes src/web/pages/system.ts but the forge could not trace the route of /settings/security/controls (an inline or wrapped handler), so it could not infer a page; the reviewer decides. A "Looks: <path>" line naming the nearest page, or a "No look: <why>" line (10+ characters), says it
Each hosted forge now streams its SQLite and git state to the bucket every five minutes, and src/snapshot/restore.ts stream restores one from it. The gate run (bun scripts/gate.ts --explain) shows 0 failing rules.
This push only answers the look-pages feedback. The check could not trace /settings/security/controls from src/web/pages/system.ts, so I added a commit carrying Looks: /system. The earlier commit named the source file src/web/pages/system.ts instead of a route, and the check did not accept that. The new commit also has a Direction: line with (#16858), which the check asks for.
The other rules the feedback listed did not need changes:
- Both doors: the System page's terminal view is already in
src/tui/screens/system.ts, and thedocs/features/how-to was handled in the earlier commits. - Tests:
test/snapshot-stream.test.tsbuilds real records rather thanas never. - Dead code: I did not run that test or
bun x tsc --noEmitthis time, because this push added no code. The forge's check runs both.
To try it, open /system as the owner and read "Hosted forges streamed to the bucket". To restore one: bun run src/snapshot/restore.ts stream <empty-dir> --forge <name>.
[{"go":"/system","look":"the 'Hosted forges streamed to the bucket' section","expect":"each hosted forge listed with its last stream time; no layout shift"}]The gate's verdict on f98ec9d is "named": it found the commit that names /system, so the look-pages item is settled. I'm not pushing anything this turn.
I made no code changes for the four rules the feedback repeats:
- Both doors: the terminal side of the System page is
src/tui/screens/system.ts, and the commit82076eb21says so withNo door:. as never:test/snapshot-stream.test.tsbuilds real records.- Issue number: the commit
f6c4758ffandf98ec9dcfboth carry#16858. - Dead code: I did not re-run the dead-code test or
bun x tsc --noEmit. This pull has had no code change since they last ran, and the forge's check runs them on each push.
If the check reports a specific failure, send me its log and I'll fix that.
[{"go":"/system","look":"the 'Hosted forges streamed to the bucket' section","expect":"each hosted forge listed with its last stream time; no layout shift"}]This pull streams each hosted forge's SQLite and git to the bucket every five minutes and restores from it. This push fixes the check that failed three times: the quiet-page design rule.
Cause: the new stream section on /system used a bare <ul>. That put src/web/pages/system.ts at 21 bare lists against the 20 recorded as debt in docs/design/quiet-debt.json.
Changes in this push:
src/web/pages/system.ts: the per-forge lag list is now adlof fact rows (fact(name, streamWords(r))). The page is back to its 20 debt lists, andbun scripts/design-lint.tsis clean.test/system-parts.test.ts: I added the new "Hosted forges streamed to the bucket" heading to the expected list of/systemheadings. That test was out of date, not wrong.
Behaviour change: the per-forge rows no longer carry the data-forge, data-late and data-lagMs attributes. I found no test or client code that reads them.
Checks run:
bun x tsc --noEmitis clean.bun scripts/gate.tsexits 0.- The stream, system and system-parts tests pass.
- The unused-exports test (the "dead code: every export under src/ has a caller" rule) passes.
Left alone:
- The gate notes that
noteStreamandnoteHostedlook like one implementation. It does not block, and folding them together is a separate change. - The gate's
--fixfound two long comment lines, insrc/snapshot/restore.tsandsrc/tui/screens/system.ts. It said the nightly rewrap handles them on main. - The earlier commits already cover the terminal side (
src/tui/screens/system.ts) anddocs/features/hosted-stream.md. Both are unchanged here.
To try it: open /system as the owner and read "Hosted forges streamed to the bucket". bun run src/snapshot/restore.ts stream <empty-dir> --forge <name> restores one forge from the bucket.
[{"go":"/system","look":"Hosted forges streamed to the bucket section, signed in as owner","expect":"one fact row per hosted forge with its lag in words, and a summary sentence above"}]
🤖 Generated with Claude Code
Each hosted forge's SQLite and git state now streams to the bucket every five minutes. bun run src/snapshot/restore.ts stream <empty-dir> --forge <name> restores one from it. This turn changes no code and pushes nothing. The gate's verdict on 7bde8ae is "named": a commit names /system, so the look-pages item is settled.
The four rules the check lists again (both doors, as never, the issue number, dead code) need no new change:
- Both doors: the System page's terminal side is
src/tui/screens/system.ts, and commit82076eb21recordsNo door:. as never:test/snapshot-stream.test.tsbuilds real records.- Issue number: the work is tied to
#16858. - Dead code: I did not re-run
bun x tsc --noEmitor the dead-code test this turn, because nothing changed. The forge's check runs both on each push.
I'm not adding more commits just to restate these. If the check fails on something specific, send me the log and I'll fix that.
To try it, open /system as the owner and read "Hosted forges streamed to the bucket".
[{"go":"/system","look":"the 'Hosted forges streamed to the bucket' section","expect":"each hosted forge listed with its last stream time; no layout shift"}]The check failed because the new snapshot-stream job was in neither the timed list nor UNTIMED in test/job-slices.test.ts. I added it to UNTIMED with a reason. The reason is that the pass runs every few minutes, does network and file reads off the event loop, and the stream tests drive streamNow directly.
test/job-slices.test.ts now passes (3 tests, 0 failures). I pushed d8082785e. I did not re-run the full suite locally; the forge's check runs it on this push.
This change touches only a test, so there is no behaviour change and no page change.
Pushed to the branch: this addresses the feedback, plus one unrelated stale test.
What changed
- Look pages. The gate already reads that line as satisfied, because a commit names
/system. I changed nothing for it. - Duplicate-function note.
noteStreamandnoteHostedwrote the same temp-file-and-rename JSON. Both now call one helper,keepJsoninsrc/snapshot/kept_file.ts. The files they write are unchanged:snapshot/stream.jsonandsnapshot/hosted.json. - Stale test.
test/snapshot-stream.test.tslooked for adata-forgeattribute that the System stream section dropped when it became a fact list. The test was wrong, so I changed the test, not the code. It now checks for<dt>b</dt><dd>not streamed yet</dd>.
Checks
bun x tsc --noEmitis clean.- The stream, hosted and forges-kept tests I ran pass, including all 7 in
test/snapshot-stream.test.ts. - The gate reports 0 failing rules and 3 notes. Two notes remain from the final run:
keepJsonis 0.56 similar towriteServinginsrc/release/serving.ts, and the duplicate scan timed out. The comment-width and before/after-looks notes also still show. - The final
bun scripts/gate.ts --fixrun timed out, so I can't confirm it found nothing to rewrap.
What I chose not to do
- I did not merge
writeServingintokeepJson. At 0.56 similarity it is a different file in a different place, so I left it.
How to try it
- Open
/system. The "Hosted forges streamed to the bucket" section shows each forge's lag.
This push adds no code. The feedback needed a commit that names the look page, and I added that as an empty commit, Looks: /system (#16858). The look-page note should clear on the next check.
The other three refusals the feedback listed were already met on this branch:
- Both doors: the gate reports it satisfied, with the terminal side in
src/tui/screens/system.tsand the how-to indocs/features/hosted-stream.md. - Real test input:
test/snapshot-stream.test.tshas noas never. - Issue numbers: every commit names #16858, and the gate's name-the-issue rule is satisfied.
Checks I ran:
bun x tsc --noEmitcame back clean.- The dead-code test (
test/unused-exports.test.ts) passes. bun scripts/gate.ts --fixrewrapped nothing, so there was nothing new to commit.
Left as is:
- Comment width: two comment lines in
src/snapshot/restore.tsandsrc/tui/screens/system.tsrun over 100 columns. The gate says the nightly rewrap handles them on main, and--fixleft them alone. - Duplicate note: the gate suggests
keepJsoninsrc/snapshot/kept_file.tsmay duplicatewriteServinginsrc/release/serving.ts. It scores them 0.56, and the scan stopped early at its 8-second limit.keepJsonalready replaced the two writers I had added in this pull, and I didn't fold it into the release code.
Try it: open /system as the owner and read "Hosted forges streamed to the bucket". To restore one forge, run bun run src/snapshot/restore.ts stream <empty-dir> --forge <name>.
[{"go":"/system","look":"the Hosted forges streamed to the bucket section","expect":"a fact list of streamed forges, matching what the terminal System screen shows"}]
🤖 Generated with Claude Code
No code changed in this round: every rule you listed already passes on the branch head (ef669d027), so there is nothing new to push.
- Look pages: the gate's note is informational. Commit
ef669d027isLooks: /system (#16858), and the gate reports "look pages (named): … a commit names /system". - Both doors: the
both doorsgate rule passes. The terminal side of the stream section is insrc/tui/screens/system.ts. - Name the issue: the
name the issuegate rule passes, and every commit on the branch cites(#16858). as neverin tests:test/snapshot-stream.test.tsandtest/system-parts.test.tscontain none.- Dead code:
test/unused-exports.test.tspasses, 3 of 3. - Verification:
bun x tsc --noEmitreported no errors. The stream, system-parts and hollow tests pass, 88 in all. - Gate notes left alone:
- Two comment lines over 100 columns (
src/snapshot/restore.ts,src/tui/screens/system.ts) are noted, and the gate says the nightly rewrap wraps them on main. - The gate also notes that
keepJsonresembleswriteServinginsrc/release/serving.ts(0.56 similarity). I did not merge them, since they serve different files. The duplicate scan also stopped after 8000 ms, so it compared against only part of the tree.
- Two comment lines over 100 columns (
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