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

The chain page offers "Take the N new commits" in tell-me, opening the same take pull take-updates opens #2651

shipped production is serving it opened this has it
opened this

Replaces #2642, which was parked twice. Both tries failed test/spawn-chain.test.ts "the chain reads to the root from the grandchild, and from the child". The page's mode words (MODE_WORDS in src/web/pages/chain.ts) still say "take updates (recorded; nothing applies them yet)", which is no longer true since #2649 (8bb81243). Line 139 of that test asserts the stale text, so any honest rewording fails it. That assertion is the thing that was wrong; update it in the same commit. Since #2649, a take is one pull (takeFromParent in src/spawn/take.ts returns { kind: "pull", number, commits }) and never moves main.

Done looks like:

  • [ ] MODE_WORDS says what is true: tell-me → "tell me" and take-updates → "take updates (as a pull you merge)". test/spawn-chain.test.ts:139 asserts the new words; no other assertion in that file changes, and the whole file passes.
  • [ ] One action beside severForge in src/actions/follow.ts, admins only, calls takeFromParent once whatever the mode. It answers "N commits from your parent are in pull #P", the conflict issue, or "already up to date". It changes nothing else.
  • [ ] /:owner/forge/following shows "Take the N new commits" (same-origin POST form) when upstream.json says behind > 0. The same action is POST /api/v1/repos/:owner/:name/following/take, next to the existing /following/sever.
  • [ ] Tests reuse the fixtures already in test/spawn-chain.test.ts: the admin's take opens one pull and the default branch is unchanged, a reader gets 401/403, and nothing behind gives "already up to date".
  • [ ] Before pushing, run bun x tsc --noEmit, bun test test/spawn-chain.test.ts, and the take and upstream tests. Name every new test file in GATE in scripts/gate.ts. MCP is out of scope here.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs