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

A deployed forge runs its own forge repository, which follows the forge it was deployed from #16371

Merged opened this

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

Merged

What changed Boot env (src/cloud/machine.ts): FORGEREPO=forge/forge, FORGEUPSTREAM (the deployer's forge repo URL), FORGECOMMIT, FORGERELEASEKEEPER=swap, FORGESELFSWAP=1; all reserved in BOOTNAMES. Node, npm and Claude Code are installed before the forge starts (it starts anyway if that fails).

Notes

shipped production is serving it deploy 3fede26

opened this

#16361, first slice. The owner: a deployed forge should run its own forge repository, in its owner's account, following the forge it was deployed from (recursive), with merges to its main updating that forge, following on by default, and the crew resolving upstream conflicts only when the owner allows it.

What changed

  • Boot env (src/cloud/machine.ts): FORGE_REPO=forge/forge, FORGE_UPSTREAM (the deployer's forge repo URL), FORGE_COMMIT, FORGE_RELEASE_KEEPER=swap, FORGE_SELF_SWAP=1; all reserved in BOOT_NAMES. Node, npm and Claude Code are installed before the forge starts (it starts anyway if that fails). The clone is retried up to five times.
  • First boot (src/spawn/own_forge.ts, beside seedFirstAdmin): the reserved org forge and the public repo forge/forge from the checkout it booted (main at the checkout's HEAD, tags included), adopted as forgeRepo, following FORGE_UPSTREAM with take-updates. Idempotent. The copy is shared with forkForgeCode (copyForgeCode).
  • Claim (redeemFirstAdmin): the repo moves to <admin>/forge; the setting, in-memory config and the follow's acting user follow. The keeper reads the repo's current path each step.
  • Per-follow setting "crew resolves upstream conflicts" (crew_resolves, default off), read by convergeConflict instead of autonomy; a checkbox on the Follow upstream card with the owner's words, r on the forks screen.
  • Deploy defaults: no source and version means <FORGE_URL>/<forgeRepo>.git at the running commit, which is what makes it recursive. The canary's --source is optional.

Tested on Bun 1.4.2: typecheck clean, gate 0; 725 pass and 0 fail across own-forge, upstream_follow, upstream-conflict-issue, tui-forks-followed, every pinned file, first-admin, MCP size, llms budget, guide, schema, reserved-names, studio, forge-code and keeper tests, including socket ones; canary 9 pass. A replay of the boot in a systemd Ubuntu 24.04 container found the clone breaking mid-transfer, hence the retry.

Not proven yet: the keeper's swap under systemd on a real machine (the unit runs bun run src/main.ts; when the old process exits, systemd may stop the new one). Then the real journey on DigitalOcean.

Left for later: launcher fallback on the VM; releases waiting on a green check; private upstreams; fetching the bulk of the clone from a bundle rather than the home uplink.

🤖 Generated with Claude Code

commented

The build run on this issue has failed twice in 0s at $0.00 (runs 01m882n548sbanwgzvjqd25kfe and 01m883rx7w4x0wzhzd7abx0759), and its check failed after 12m. A run that dies before it starts won't fix itself on retry. Please find what stops the run from starting (same 0s failure hit #16354 earlier), fix that cause, and don't requeue this issue until one run gets past start.

commented

Parked by the crew: the last three runs here failed or were declined within an hour, so nothing more starts until a person says what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs