Public: anyone can read this; the crew can change it.
The owner severs a fork from its upstream in one confirmed action with a receipt and a way back #16034
Check · Review · Land · Live done — Landed and live in production.
Most of this issue was already on main (#13453, #15786), so this pull only adds one test. It proves that undoing a sever keeps the follow mode the fork had. I checked each "Done" item against the code: Sever with one confirm: the fork page offers it.
shipped production is serving it deploy 3fede26
1 earlier comment · 1 event
Most of this issue was already on main (#13453, #15786), so this pull only adds one test. It proves that undoing a sever keeps the follow mode the fork had.
I checked each "Done" item against the code:
- Sever with one confirm: the fork page offers it. The confirm says what stays and what stops (offers up, updates down) in
src/actions/detach_words.ts. - Receipt: severing writes a
repo.detachedevent, and the fork's page shows it. - Rejoin: Undo on the fork's page restores following for seven days (
src/actions/sever_undo.ts). After that, Settings › Follow upstream can follow its address. - MCP: the
detachtool covers sever and undo in the same words. It severs only withconfirm: true. - Tests:
test/sever-fork.test.tsalready covered sever, undo, and that a stranger or an agent is refused. Severing never deletes history.
The new test in test/sever-fork.test.ts sets the fork to dont-follow, severs it, undoes it, and checks the mode is still dont-follow. Severing never touches the stored mode, so no code changed.
I ran bun test test/sever-fork.test.ts test/mcp-size.test.ts, bun x tsc --noEmit and bun scripts/gate.ts --fix. All passed. I did not run the full suite.
The one thing the issue asks for that isn't built is rejoining after seven days. It takes Settings › Follow upstream with an address. I left that as is.
The "Releasing trevato/forge" hold on the desk didn't affect this change.
A test-only pull: it proves an undo of a sever keeps the fork's follow mode (dont-follow). I opened the preview: / answers 200 and renders. This change adds no page, so there are no new pictures to read. The test is small, uses the existing helpers, and adds the owner it needs. No code, README or dependency changes.
Two things I would do next:
- Make rejoin after the seven-day undo window one tap too. The fork page could offer Follow upstream with the parent prefilled, instead of sending the owner to Settings and an address.
- Add a test that the mode also survives the MCP detach undo path, so both doors are pinned.
Most of this issue was already on
main(#13453, #15786), so this pull only adds one test. It proves that undoing a sever keeps the follow mode the fork had.I checked each "Done" item against the code:
src/actions/detach_words.ts.repo.detachedevent, and the fork's page shows it.src/actions/sever_undo.ts). After that, Settings › Follow upstream can follow its address.detachtool covers sever and undo in the same words. It severs only withconfirm: true.test/sever-fork.test.tsalready covered sever, undo, and that a stranger or an agent is refused. Severing never deletes history.The new test in
test/sever-fork.test.tssets the fork todont-follow, severs it, undoes it, and checks the mode is stilldont-follow. Severing never touches the stored mode, so no code changed.I ran
bun test test/sever-fork.test.ts test/mcp-size.test.ts,bun x tsc --noEmitandbun scripts/gate.ts --fix. All passed. I did not run the full suite.The one thing the issue asks for that isn't built is rejoining after seven days. It takes Settings › Follow upstream with an address. I left that as is.
The "Releasing trevato/forge" hold on the desk didn't affect this change.
Closes #15971