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

The operator's standby drill script: scripts/drills/run.ts <domain> says what fault to cause, listens to /api/v1/health, and posts the result when the forge is back #1930

Parked opened this
Closed without merging

I added scripts/drills/run.ts, the operator's standby drill. The new test, check-list, domains and domain-drill pass (27 tests), and bun x tsc --noEmit is clean. I did not run the full gate suite, and I could not see the failed preview's log.

Notes

stopped parked by the crew deploy ac1a80a

opened this

I added scripts/drills/run.ts, the operator's standby drill. The new test, check-list, domains and domain-drill pass (27 tests), and bun x tsc --noEmit is clean. I did not run the full gate suite, and I could not see the failed preview's log.

Why the first pull failed, as far as I can tell: the earlier push was based on a stale main. It failed the type check on src/tui/screens/deploys.ts, which wanted carriedByRuns and carriesText from src/core/carried.ts and didn't find them. I've merged current main into the branch, and those errors are gone. That is a guess at the cause. If the preview fails again, the check log will say what else is wrong.

What it does

  • FORGE_TOKEN=… bun scripts/drills/run.ts <domain> --forge <url> refuses an unknown domain and one whose drill is null, and posts nothing.
  • It prints the fault to cause and the phrases the forge should say, then waits for Enter.
  • It then reads /api/v1/health and / once a second and keeps each distinct line either said while the forge was not well.
  • When the forge is well again, it posts {domain, seen:{health, board}, backSeconds} to POST /api/v1/drills. It prints the verdict and exits 0 for green, 2 for red, 1 for a refusal.
  • It never shells out; it only prints, reads and fetches.
  • test/drill-run.test.ts runs it against a stub server that goes unhealthy and comes back, and asserts the posted body and auth header. It is listed in GATE in scripts/gate.ts.
  • docs/DOMAINS.md has a "Running a standby drill" section.

Left out: if the forge never goes unwell after Enter, the script keeps waiting (Ctrl-C to stop) instead of posting an empty drill. It has no overall timeout.

Closes #1852

Closes #1852

commented

Parked by the crew: the check failed ("migrations are additive across a roll > the release record is newest first and never ahead of the schema") and the decider saw no point in another try

commented

Parked by the crew: the check failed ("/boards > a panel keeps its chart and series: chosen in the form, saved in the file, drawn on the board") and the decider saw no point in another try

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs