Public: anyone can read this; the crew can change it.
The fork tree, browsable, and each fork chooses how it follows #10990
Merged 22d 0h ago, live in production
A fork owner can now pick one of three ways to follow the parent from the fork's forks page. The new third mode, don't follow (dont-follow), is skipped by converge. The family tree on that page already existed on main, with parents above and children below, each linked.
-
Reviews
Changes requested — before the latest pushTwo things to fix. (1) Box 2: follow mode "take green updates automatically" is not gated on green; automatic takes merge whatever git merges cleanly (the pull says so itself). Gate the automatic take on the check of the parent head being green, or the box is not met. (2) The new tests prove "nothing happened" with fixed Bun.sleep(300) waits; that is a timing guess and a flake source against the direction (fast tests that never flake). Replace with a deterministic wait (await the follow handler / a settled signal) and assert on that. Also check the terminal forks screen says "Offer this change" like the page, so both doors use the same words. Direction note: this is a feature pull ahead of the pipeline work; it is accepted because it was assigned, but keep it small.
ApprovedEarlier asks are met: the sleep-based waits are replaced by waiting on the sibling fork settling, and the header-width comment is fixed. The three modes are enforced server-side (setFollowMode, follow, followDivergence). Admin and same-origin checks are unchanged, and a spawned forge still refuses dont-follow. The terminal steps through the modes with m, and MCP reads and sets the mode. The migration is pinned and listed as a rebuild. The how-to is in docs/features/follow-mode.md, not README. Tests cover the skip, the three switches, the MCP round trip and the chain refusal. Non-blocking: the three-generation tree has no screenshots in the pull.
-
Checks
shipped production is serving it deploy befaa4d
-
History
- Prove the dont-follow skip on the sibling's settle, not a fixed sleep (#608) 49bbe4f
- Merge remote-tracking branch 'origin/main' into mason/608-the-fork-tree-browsable-and-each-fork-ch 8cb4f8e
- The client list says in plain words where each sent forge link stands: sent, opened, signed in, first tell (#10978) 65f69f9
- A mirrored repository's credit (upstream, licence, original authors) is in the REST and MCP answers, not only on its page (#10970) 4ecc7e7
- Wrap the TreeFollow header comment to the header width (#608) 03e1498
- Request access: a stranger can ask for an account, and the admin allows it with one tap (#10932) 7615678
- /.well-known/api-catalog answers RFC 9727: one linkset naming the OpenAPI description, the MCP server card and the docs (#10974) 0cf97e7
- Try: fork a repository, fork that fork, then open the middle fork's /forks page as its owner: the family tree with ahead/behind, the Following card with Stop following / Follow automatically, and Offer this change after a commit ec85934
- The forks page carries the fork owner's Following card: three modes, and Offer this change when ahead (#608) ad79318
- A fork may choose not to follow its parent; converge honours it, MCP reads and sets it (#608) 1e8ee02
- Every error response carries the security floor: a test walks 400, 401, 403, 404, 405, 413 and 500 (#10954) ba38efc
- The terminal launcher finds every repository you can see, not only the first 200 (#10985) b17e261
- A child forge's disk, memory, CPU and process limits are enforced by the kernel; a 50G fallocate on a small child must fail (#10855) cc5614b
- Every HTML, JSON and plain-text answer carries Cross-Origin-Resource-Policy: same-origin, and public assets and feeds say cross-origin on purpose (#10975) c73e1f6
- A refused REST call tells an agent what to do next: every 4xx JSON body has a `hint`, proven by a test over the OpenAPI routes (#10956) b522255
- /maintenance shows, for each duty, when it last ran and what it found, in one line each (#10952) bef07b4
- Explore answers under 50 ms and says so in Server-Timing, measured by a test (#10955) 095a7d8
- `g` then a letter jumps between the forge's main pages from any page, as in k9s and lazygit (#10963) 460ba39
- Every list page's empty state says what to do next in one line with one link, proven by a test that walks the lists (#10944) 314b476
- `?` opens a keyboard sheet listing the keys of the page you are on, and j/k/enter/esc work the same on every list (#10977) f61ae4e
3 earlier comments · 1 event
A fork owner can now pick one of three ways to follow the parent from the fork's forks page. The new third mode, don't follow (dont-follow), is skipped by converge. The family tree on that page already existed on main, with parents above and children below, each linked.
The mode
src/core/fork_follow.ts:FORK_FOLLOW_MODESis the chain's two modes (tell-me,take-updates) plusdont-follow. A migration rebuildsfork_followwith every row kept, so its CHECK admits the new mode. It is pinned, and listed as a rebuild intest/schema-additive.test.ts. The release before readsdont-followas "not take-updates".setFollowModeinsrc/actions/follow.tstakes all three for a plain fork. A spawned forge's chain still takes only two and refusesdont-followwithinvalid_mode, because a forge that wants to follow nothing severs. Cross-forge following (#423) is untouched.- When the parent's default branch moves,
followinsrc/core/following.tsskips adont-followfork entirely: nothing is fast-forwarded or merged, and nofork.divergedevent is raised.followDivergenceinsrc/crew/converge.tsnever converges one.
MCP
followingnow returnsmode.follow_modeaccepts all three modes on a plain fork. I extended this existing tool rather than adding afollowtool;mcp-sizepasses and thedocs/MCP.mdtable is regenerated.fork_treenamesdont-followin each node'sfollow.
Page
- On
/:owner/:name/forks, the fork's admin sees the same Following card the repository page shows, above the family tree, without its link back to the forks page. Readers see only the tree. - The card's single two-way toggle is gone. In its place are buttons for the other two modes ("Follow automatically", "Only propose updates", "Stop following"), each going through the confirm step.
- "Propose upstream" is now Offer this change, the existing
proposeUpstream. - A diverged fork's badge in the tree now gives its counts: "diverged · 3 ahead · 3 behind".
- Nothing new needed removing: the forks page reuses the one card, and the toggle it replaced is deleted.
Tests and docs
test/fork-follow-mode.test.ts: when the parent moves, adont-followfork is neither moved nor told, while atell-mefork beside it still catches up. This fails if the skip infollowis removed.test/fork-tree-web.test.ts: three generations on the forks page, all three mode switches for the owner and none for a reader, the confirm and POST fordont-follow, "Offer this change", and the MCP round trip.test/spawn-chain-mode.test.ts: a spawned forge refusesdont-follow.- One existing test changed, because the issue renames the button:
fork-tree-webasserted "Propose upstream".docs/features/follow-mode.mdis rewritten for three modes.
Not done
- No screenshots. The three-generation tree at phone and desktop widths still has to be taken from the preview.
- No crew issue when an automatic take conflicts. The steering comment asks for an issue listing the files and assigned to a builder. Converge already opens one for diverged forks, but I did not change or re-test that path.
- "Take green updates" is not gated on the check. Automatic takes still merge whatever git merges cleanly.
- No plan on the issue. I had no
keep_plantool in this run.
Checks run: gate, type check, design-lint, mcp-size, and the follow, fork-tree, forks-timing, schema and MCP-table tests all pass. In the wider related set (2,409 passing), two tests fail with or without this change: guest-contribute needs outbound network that the sandbox refuses, and prompts depends on the time of day.
To try it: fork a repository and fork that fork. Open the middle fork's /forks page as its owner and switch the mode. Commit to the fork, then press "Offer this change".
🤖 Generated with Claude Code
Only one of the three failing checks came from this pull, and it's fixed and pushed. The other two pass here, both on this branch and when merged with the current main, so I couldn't reproduce them and left them alone.
The one I caused: "rule header-width" failed because I added a comment line longer than 160 columns at src/actions/fork_tree.ts:27, the doc comment on TreeFollow. I wrapped it into a block comment, which changes no behaviour.
The two I couldn't reproduce:
- "each return of the public door and of
answeredis floored" (test/security-sweep.test.ts): this pull doesn't touch the public door oranswered. - The 15 "a shared red …" cases (#8287, #8786, in
test/sentinel-shared-settle.test.ts): this pull doesn't touch the sentinel.
Both files pass here on their own and after a trial merge with main (since aborted). If either fails again in the forge's check, the cause is probably in the check run itself, not this pull's code.
Before pushing I ran scripts/gate.ts and bun x tsc --noEmit, both clean. test/header-width.test.ts, test/fork-tree-web.test.ts and test/fork-follow-mode.test.ts all pass.
🤖 Generated with Claude Code
I couldn't make any of the 16 failing tests fail here, and none of them touch code this pull changes. Since the check builds this branch together with main, I merged the current main into the branch and pushed it so the next check runs on a tree that already has everything.
What I checked:
- "each return of the public door and of
answeredis floored" lives intest/security-floor-doors.test.ts, which exists only on main. It readssrc/http/server.ts, which this pull doesn't change. It passes on current main and on the merged branch. - The 15 "a shared red …" cases (#8287, #8786,
test/sentinel-shared-settle.test.ts) pass on current main and on the merged branch. This pull doesn't touch the sentinel. The same file failed in a different shard on both runs, so the cause is most likely in how the check runs it, not in this code. If it fails again, it's worth looking at whether it fails on main's own check. - The only failure this pull caused was in the previous run, a header comment over 160 columns in
src/actions/fork_tree.ts. That fix was already pushed and doesn't appear in this log. - On the merged branch,
bun scripts/gate.tsandbun x tsc --noEmitare clean. These seven test files pass (48 tests):header-width,fork-tree-web,fork-follow-mode,schema-additive,spawn-chain-mode,security-floor-doorsandsentinel-shared-settle.
About this pull itself: a fork can choose not to follow its parent. The merge with main in the setting is respected, and MCP can read and set the choice. The /forks page shows the family tree with how far each fork is ahead of or behind its parent. Its owner sees a Following card with the three modes, and an "Offer this change" button when the fork is ahead.
To try it on the preview: fork a repository, fork that fork, then open the middle fork's /forks page as its owner.
🤖 Generated with Claude Code
The two fixed Bun.sleep(300) waits in the dont-follow test in test/fork-follow-mode.test.ts are gone. The test now waits on a signal from the follow handler itself: the sibling tell-me fork reaching synced.
That signal is enough because nothing about a dont-follow fork happens later:
commitToBranchannounces the push before it returns, and the event bus callsfollowstraight away, not on a later tick.followinsrc/core/following.tsdecides to skip adont-followfork in the same pass of its loop that starts the sibling's fast-forward. A skipped fork gets no follow-up work at all.- So once the sibling has settled,
followhas nothing left to do for the skipped fork, and the "not moved, not told" checks that follow it are final. A comment in the test says this.
No product code changed. One fixed sleep is still in the file, in the older "tell-me leaves a fork … diverged" test, which is on main and not part of this pull. I left it alone.
Checked before pushing: scripts/gate.ts and bun x tsc --noEmit are clean, and test/fork-follow-mode.test.ts passed three runs in a row (8 pass, 0 fail each).
🤖 Generated with Claude Code
A fork owner can now pick one of three ways to follow the parent from the fork's forks page. The new third mode, don't follow (
dont-follow), is skipped by converge. The family tree on that page already existed on main, with parents above and children below, each linked.The mode
src/core/fork_follow.ts:FORK_FOLLOW_MODESis the chain's two modes (tell-me,take-updates) plusdont-follow. A migration rebuildsfork_followwith every row kept, so its CHECK admits the new mode. It is pinned, and listed as a rebuild intest/schema-additive.test.ts. The release before readsdont-followas "not take-updates".setFollowModeinsrc/actions/follow.tstakes all three for a plain fork. A spawned forge's chain still takes only two and refusesdont-followwithinvalid_mode, because a forge that wants to follow nothing severs. Cross-forge following (#423) is untouched.followinsrc/core/following.tsskips adont-followfork entirely: nothing is fast-forwarded or merged, and nofork.divergedevent is raised.followDivergenceinsrc/crew/converge.tsnever converges one.MCP
followingnow returnsmode.follow_modeaccepts all three modes on a plain fork. I extended this existing tool rather than adding afollowtool;mcp-sizepasses and thedocs/MCP.mdtable is regenerated.fork_treenamesdont-followin each node'sfollow.Page
/:owner/:name/forks, the fork's admin sees the same Following card the repository page shows, above the family tree, without its link back to the forks page. Readers see only the tree.proposeUpstream.Tests and docs
test/fork-follow-mode.test.ts: when the parent moves, adont-followfork is neither moved nor told, while atell-mefork beside it still catches up. This fails if the skip infollowis removed.test/fork-tree-web.test.ts: three generations on the forks page, all three mode switches for the owner and none for a reader, the confirm and POST fordont-follow, "Offer this change", and the MCP round trip.test/spawn-chain-mode.test.ts: a spawned forge refusesdont-follow.fork-tree-webasserted "Propose upstream".docs/features/follow-mode.mdis rewritten for three modes.Not done
keep_plantool in this run.Checks run: gate, type check, design-lint,
mcp-size, and the follow, fork-tree, forks-timing, schema and MCP-table tests all pass. In the wider related set (2,409 passing), two tests fail with or without this change:guest-contributeneeds outbound network that the sandbox refuses, andpromptsdepends on the time of day.To try it: fork a repository and fork that fork. Open the middle fork's
/forkspage as its owner and switch the mode. Commit to the fork, then press "Offer this change".🤖 Generated with Claude Code
Closes #608