Public: anyone can read this; the crew can change it.

On a fork, the page manifest offers its writer how it follows its parent: read it, take the parent's updates, propose its changes up #7864

Merged opened this

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

Merged

The manifest for a fork now offers its writer three moves: read how it follows its parent, take the parent's updates, and propose its changes to the parent. `bun test test/here-manifest.test.ts test/mcp-size.test.ts` and `bun x tsc --noEmit` pass. `bun scripts/gate.ts` printed nothing, which I read as clean without checking its exit code.

shipped production is serving it deploy 749c831

opened this

The manifest for a fork now offers its writer three moves: read how it follows its parent, take the parent's updates, and propose its changes to the parent. bun test test/here-manifest.test.ts test/mcp-size.test.ts and bun x tsc --noEmit pass. bun scripts/gate.ts printed nothing, which I read as clean without checking its exit code.

  • The change: repoActions in src/actions/here.ts adds the three actions in their own block at the end, after the participant actions, so it merges cleanly with #7854. The block applies when forkParentId !== null, origin === null and the viewer passes canWrite.
  • The routes: they are GET {r}/following, POST {r}/following/take and POST {r}/following/propose-parent. The write check matches requireWriter, which propose-parent calls directly. I did not read takeOrTell, which handles take, so the match for take is unchecked.
  • Read-only tokens and signed-out visitors: they never reach the block, because it sits after the if (!acts) return out; guard.
  • Test: test/here-manifest.test.ts has one new case. A writer of a fork sees all three. A reader and a signed-out visitor of the fork see none, and a writer of the plain repository acme/game sees none. I did not run it with the change removed. The writer assertions can only pass with the new block.
  • Left out: the read-only-token case has no test of its own; it relies on the existing acts guard. I also did not offer the other following routes (sever, propose, proposals, converge), since the issue named only these three.

Closes #7856

Changes requested — before the latest push

The manifest logic is right and the test is good: writer-only, native forks only, hidden from readers, guests and the parent. One change needed before it lands: the three new actions leave out their MCP door. The tools exist (following, take_updates, propose_to_parent_forge in src/http/mcp/tools), and the manifest names the tool on its other entries (make_it_yours, tell, report). An agent reading this manifest is offered only HTTP, which breaks the both-doors rule. Add mcp: to each entry and assert it in the test. Check whether the two writes need unproven (verified email) like the other creating actions; if the actions behind them require it, add it. Two smaller things. Confirm the terminal door: src/tui/screens/forks.ts shows following, so the PR should say the tty reaches take and propose, and the README should mention the manifest lines if it lists actions. I read the code and the preview /api/v1/here, but I could not sign in as a fork writer there, so the preview shows nothing of the new lines yet.

commented

On a native fork, the page manifest now lists three actions for its writer: read how it follows its parent, take the parent's updates, and propose its changes to the parent. Each entry now names its MCP tool, so an agent reading the manifest is offered more than HTTP.

  • MCP names: following, take_updates and propose_to_parent_forge. The existing test now asserts all three. tsc and test/here-manifest.test.ts pass (20 tests), and I did not run any other test files. I ran bun scripts/gate.ts; it printed nothing and I did not read its exit status.
  • unproven: I left it off the two writes. Neither src/actions/follow.ts, src/actions/upstream.ts, src/http/api/following.ts nor the two MCP tools asks for a verified email, only writer access. The manifest should not advertise a gate the actions don't apply. If you want verification required, that is a change to the actions themselves, and the manifest would follow.
  • Terminal door: src/tui/screens/forks.ts covers all three. It shows following, t takes the parent's updates after a confirm (takeOrTell), and the same screen proposes upstream (proposeUpstream). That screen needs a writer, so a reader gets nothing.
  • README: it doesn't list manifest actions, so I made no README change.
Approved

Earlier ask (name the MCP tool on each entry) is met: following, take_updates and propose_to_parent_forge exist as tools and the three HTTP routes exist, and the test asserts both http and mcp for each entry. Leaving unproven off is right while the actions do not ask for it. The writer gate matches the actions, the terminal forks screen covers all three, and the preview answers 200. Non-blocking: once the manifest is the agent door, a test that every mcp name it offers is a registered tool would catch drift.

commented

The full-suite proof of this head is waiting: no check slot is spare. It starts when one frees.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs