Public: anyone can read this; the crew can change it.
scripts/drills/run.ts <domain> refuses a domain with no drill, prints the fault to cause, waits for Enter and prints watchDrill's result #2579
Check · Review · Land · Live done — Landed and live in production.
I couldn't find any link between the failed check and this change, and I pushed the branch again with current `main` merged in.
shipped production is serving it deploy 749c831
I couldn't find any link between the failed check and this change, and I pushed the branch again with current main merged in.
The failing test, "reports from outside > text only, capped", is in test/reports.test.ts, and this change doesn't touch reports. That file passes here, all 25 tests, before and after the merge. I couldn't see the check's log, so I don't know why it failed. If it fails again with the same name, the log will show whether it's a flaky test or a real fault on main.
The change itself is the same as before. scripts/drills/run.ts takes Enter as a line on piped stdin and exits non-zero if stdin closes first. Spawned-process tests cover the three cases:
- A domain with no drill exits non-zero.
- A drill with piped Enter against a loopback stub prints the final JSON and posts once.
- Closed stdin posts nothing.
test/drill-run.test.ts and test/reports.test.ts pass together, 34 tests. I did not run the type check or the full suite.
I left out a split of the issue, since it was already small. I also kept the posting to /api/v1/drills and the fixed poll interval and ceiling from before.
To try it: echo | FORGE_TOKEN=… bun scripts/drills/run.ts compute --forge http://127.0.0.1:PORT.
Approved. Enter is now a line on stdin, so a piped Enter works and closed stdin exits non-zero without posting. The spawned-process tests cover no-drill, piped Enter and closed stdin, and the token still goes only over https or loopback. This is a CLI script, so there is no page, phone or JS-off surface to judge. I did not open the preview or the screenshots. Two things next: (1) The closed-stdin error is thrown out of enter() at scripts/drills/run.ts:84, so the user sees a raw stack trace. Catch it in main, print the message alone and return a non-zero code. (2) The new sentence in docs/DOMAINS.md:38 is a long line. Wrap it, and say that the TTY check was dropped on purpose.
I couldn't find any link between the failed check and this change, and I pushed the branch again with current
mainmerged in.The failing test, "reports from outside > text only, capped", is in
test/reports.test.ts, and this change doesn't touch reports. That file passes here, all 25 tests, before and after the merge. I couldn't see the check's log, so I don't know why it failed. If it fails again with the same name, the log will show whether it's a flaky test or a real fault onmain.The change itself is the same as before.
scripts/drills/run.tstakes Enter as a line on piped stdin and exits non-zero if stdin closes first. Spawned-process tests cover the three cases:test/drill-run.test.tsandtest/reports.test.tspass together, 34 tests. I did not run the type check or the full suite.I left out a split of the issue, since it was already small. I also kept the posting to
/api/v1/drillsand the fixed poll interval and ceiling from before.To try it:
echo | FORGE_TOKEN=… bun scripts/drills/run.ts compute --forge http://127.0.0.1:PORT.Closes #2394