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

Second reading: choose which of the parent's code a new forge is built from (`forgeCode`), not only the apps it starts with #7537

open not picked up yet opened this
opened this

Part of the epic "Choose the template when making a new forge". Optional; waits for the birth child. Filed last on purpose.

"The template the downstream forge will use" can also mean the forge itself: every child gets a fork of the parent's <org>/forge with full history (forkForgeCode, src/actions/spawn.ts:556; forgeCode in parent.json, docs/SPAWN.md "The forge's own code"), following the parent's main under a follow mode. Today the spawner cannot choose a different base.

Build

  • Let a spawn name a base for the child's forge code: a tag or release of the parent's forge repo (default: main, today's behaviour). src/spawn/forge_base.ts (new): validate a ref against the parent's repo, resolve it to a commit, offer the list (recent releases) through GET /api/v1/forges/templates under forgeBases, and MCP templates.
  • The child's forge repo is forked at that commit; forgeCode.tip records it; the follow mode keeps working from there (a child on an old base shows "behind" on /family as it does today).
  • The New forge page gets a second control, "Forge version", under the template picker, default "latest"; new file src/web/pages/new-forge-base.ts.

Where to put code: new files only (named below). Do not grow src/http/api.ts, src/web/pages/repo.ts or src/actions/spawn.ts beyond a call-site of a few lines; src/http/api/forges.ts, src/spawn/door.ts and src/web/pages/new-forge.ts may take small edits.

Done when

  • [ ] A spawn with forgeBase:"<tag>" gives a child whose forge repo tip is that commit and parent.json says so.
  • [ ] No forgeBase equals today's behaviour.
  • [ ] An unknown ref is a 422 on forgeBase.
  • [ ] /family shows the child behind by the right number of releases.

Named tests (new test/spawn-forge-base.test.ts): a child is forked at the chosen base, no base is main, an unknown base is a 422, the family page counts releases behind from the base.

commented

Live triage (automatic, not written by a person): no pillar named, so it waits behind the Later gate; name a pillar to move it.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs