Files
OmniRoute/scripts/dev
Diego Rodrigues de Sa e Souza cff1461877 feat(dev): local candidate build/validate/promote loop with rollback (rail 3.8.53, #8084 local side) (#16180)
* 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.
2026-10-10 09:56:00 -03:00
..
2026-07-06 02:25:17 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 16:51:03 -03:00
2026-07-07 13:14:06 -03:00
2026-07-13 09:12:40 -03:00