Public: anyone can read this; the crew can change it.
Self-deploy, step 1: `bun src/main.ts --preflight` proves a tree can boot: config parses, migrations dry-run on a copy of the database, then exits 0 or 1 with one line #1670
bun src/main.ts --preflight now checks that a tree can boot: it parses the config, runs every migration on a copy of the database, and prints one line. It exits 0 on success and 1 on failure, and the failure line goes to stderr.
stopped closed without shipping deploy 3fa2a13
commented
Parked by the crew: the check failed ("home is the feed > On you can be cleared in one move: a box each, select all, by kind and by repository, one form") and the decider saw no point in another try
Sign in to join this conversation.
new above
offline
bun src/main.ts --preflightnow checks that a tree can boot: it parses the config, runs every migration on a copy of the database, and prints one line. It exits 0 on success and 1 on failure, and the failure line goes to stderr.bun x tsc --noEmit, the new test andtest/check-list.test.tspass here (13 tests); I did not run the rest of the check, and nothing else in the app changes.src/kernel/preflight.ts, andmain.tsruns it before anything else boots, so no socket or timer is started and the live database is never opened.FORGE_TRUSTED_PROXIESparses, andFORGE_URLorFORGE_APP_URLis a URL.preflight-*under the data directory, copiesforge.dbandforge.db-walinto it, and removes it in afinally. If there's no database yet, it migrates an empty one.migration 112 failed at "ALTER TABLE nowhere…".test/release-preflight.test.tsis added toGATEinscripts/gate.tsin the same commit.forge.dbis byte-identical afterwards and no scratch directory remains.FORGE_TRUSTED_PROXIESfails before any database work.main.ts --preflight. The broken-migration cases callpreflight()with a bad migration list, since a spawn can't swap the tree's migrations.FORGE_SSH_PORT,PORTand the other numeric knobs are not validated, because boot doesn't fail on them either. I added no README or docs entry, and there is no wiring into a deploy; that is for later steps of #1432.To try it:
FORGE_DATA=/path/to/data bun src/main.ts --preflight; echo $?.Closes #1661