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

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

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.

Notes

shipped production is serving it deploy 3fede26

opened this

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.detached event, 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 detach tool covers sever and undo in the same words. It severs only with confirm: true.
  • Tests: test/sever-fork.test.ts already 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.

Closes #15971

1 earlier comment · 1 event
commented

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.detached event, 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 detach tool covers sever and undo in the same words. It severs only with confirm: true.
  • Tests: test/sever-fork.test.ts already 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.

Approved

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:

  1. 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.
  2. Add a test that the mode also survives the MCP detach undo path, so both doors are pinned.
commented

Left #15971 open: 1 unticked item remain (Rejoin restores following in one tap within the same session and later, with the mode the fork had).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs