Public: anyone can read this; the crew can change it.
The forge deploys itself from its own main: gate, release dir, preflight, socket handoff, drain, health, rollback; no platform MCP or Forgejo CI in the path #1434
This pull covers the first slice of #1432: a landing on the forge's own default branch now rolls out a new release, and rollback and a releases page are in. Nothing in the retirement list is done, and part of the visibility item is missing. The typecheck is clean.
stopped closed without shipping deploy 711938b
commented
Parked by the crew: the check failed ("the gate's list > every test/*.test.ts is in exactly one list, and every entry exists") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
This pull covers the first slice of #1432: a landing on the forge's own default branch now rolls out a new release, and rollback and a releases page are in. Nothing in the retirement list is done, and part of the visibility item is missing.
The typecheck is clean. The new swap and preflight tests pass, as do the reserved-names, shards and hollow tests. The sandbox refuses unix-socket listeners, so the suites that boot the forge ran with
FORGE_TEST_SOCKET=port. I did not runtest/studio.test.tsto completion.test/check-list.test.tsfails only becausetest/review-from-check.test.tsis already on main and is in neitherGATEnorEXCLUDED; I left it alone.What changed
FORGE_SELF_REPO=owner/nameset, a merge or push to that repo's default branch checks the tree out into$FORGE_DATA/releases/<sha>/and runsbun src/main.ts --preflighton it. The preflight runs against aVACUUM INTOcopy of the live database. This is insrc/release/service.ts,deploy.tsandpreflight.ts. The merge has already passed the full gate by then.release/swap.tsstarts the new process from the release dir on the same port (reusePort,FORGE_HANDOFF=1). It waits for the ready file and an answer on the new process's internal listener, then sends SIGTERM to the old one. On SIGTERM the old one closes its listener and drains as before.RELEASE FAILEDline and the landed pull gets a comment.bun src/main.ts --rollback <sha>and a button on/releasesfor a writer of the forge repo swap back to a release dir already on disk, the same way.releases.jsonrecords sha, time, landing, state, healthy-since and roll duration./releaseslists it, and the home showslive: <sha> since <time>. I addedreleasesto the reserved names.test/release-swap.test.tsuses a stand-in forge. It shows the new sha serving on the same port with no failed request during the swap, a failing preflight keeping the old one, a never-healthy process keeping the old one, and a rollback serving the old sha.test/release-preflight.test.tsruns the real tree's preflight.docs/RELEASES.mdsays how to use it.Reset race in the swap test. A new connection that lands on the old listener at the instant it closes is reset by the kernel; this is how
SO_REUSEPORTbehaves. The test hammer retries a GET once, as a browser or proxy does, and counts a request only if both attempts fail. Without the retry the test failed once in about five runs.Not done
promoteNN.sh, watchdog scripts) and the mitosis-side image change.To try it Run the forge with
FORGE_SELF_REPO=<owner>/<name>andFORGE_HANDOFF=1, then land a change to that repo. Watch/releases, or runbun src/main.ts --rollback <sha>against the same data dir. Both the first process and its replacements needFORGE_HANDOFF=1for the port sharing to work.🤖 Generated with Claude Code
Closes #1432