mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-16 17:09:09 +00:00
* feat(dev): local candidate build/validate/promote loop with rollback Add scripts/dev/candidate.mjs (npm run dev:candidate), the local side of RFC #8084: build one candidate from the current tree (npm pack) or a prebuilt tarball into an isolated npm prefix under _artifacts/candidate/<id>, boot that packaged CLI on a free port with an isolated DATA_DIR and fake secrets, require /api/health and /v1/models to answer 200, promote the same validated artifact with compensated renames, and roll back automatically when the promoted slot fails its health check. Every command supports --dry-run and --json; child processes use argument arrays only (Hard Rule #13). stopChild is now exported from check-pack-boot.mjs so the loop reuses the same process-group shutdown instead of duplicating it. * docs(ops): document the local candidate loop in the golden path and release checklist * fix(dev): isolate the candidate boot from operator .env files The first real validate run against the published 3.8.51 tarball booted and answered /api/health, but /v1/models returned 401: the packaged CLI fills undefined keys from <packageRoot>/.env (postinstall copies .env.example with INITIAL_PASSWORD=CHANGEME), and any password is a credential surface for the model catalog. It also reads the default data dir's .env, derived from HOME/XDG_CONFIG_HOME/APPDATA, i.e. the operator's real ~/.omniroute/.env. The candidate now gets an isolated HOME (plus XDG/APPDATA) under its slot, INITIAL_PASSWORD pinned to an empty value, a fresh DATA_DIR on every validation, and --log so failures show server output. run --dry-run no longer claims the candidate is active.