Add a --strict mode to the healthcheck #13

Open
opened 2026-08-28 13:44:06 +02:00 by kami · 0 comments
Owner

Three phases, in this order.

Phase 1 — --strict on the healthcheck

scripts/orchestra_e2e_healthcheck.sh --strict must reject an unrecognised flag: print unknown flag: <flag> on stderr and exit 2. Without --strict the current silent-ignore behaviour is unchanged, and --help still wins from any position.

Phase 2 — cover --strict in the existing self-test

Extend scripts/orchestra_e2e_selftest.sh, which already asserts the plain and --json runs. Add assertions that --strict --nonsense exits 2 and that --strict alone exits 0. Keep its existing fail() helper and its existing assertions.

Phase 3 — keep the pinned usage text honest

scripts/test_healthcheck.sh pins the healthcheck's exact --help output in a hardcoded USAGE variable. Phase 1 changes nothing about --help, so this phase only confirms the pin still holds.

Verify this phase by running the pinned test itself:

- run: ["bash", "scripts/test_healthcheck.sh"]

Constraints

The project's verification policy allows exactly two command shapes:

["bash", "-n", "<one file>"]
["bash", "scripts/orchestra_e2e_healthcheck.sh"]

Research first

Establish at least three findings with distinct confidence: at least one fact, one inference, one assumption. Cite at least two in References.

Three phases, in this order. ## Phase 1 — `--strict` on the healthcheck `scripts/orchestra_e2e_healthcheck.sh --strict` must reject an unrecognised flag: print `unknown flag: <flag>` on stderr and exit 2. Without `--strict` the current silent-ignore behaviour is unchanged, and `--help` still wins from any position. ## Phase 2 — cover `--strict` in the existing self-test Extend `scripts/orchestra_e2e_selftest.sh`, which already asserts the plain and `--json` runs. Add assertions that `--strict --nonsense` exits 2 and that `--strict` alone exits 0. Keep its existing `fail()` helper and its existing assertions. ## Phase 3 — keep the pinned usage text honest `scripts/test_healthcheck.sh` pins the healthcheck's exact `--help` output in a hardcoded `USAGE` variable. Phase 1 changes nothing about `--help`, so this phase only confirms the pin still holds. Verify this phase by running the pinned test itself: - run: ["bash", "scripts/test_healthcheck.sh"] ## Constraints The project's verification policy allows exactly two command shapes: ["bash", "-n", "<one file>"] ["bash", "scripts/orchestra_e2e_healthcheck.sh"] ## Research first Establish at least three findings with distinct confidence: at least one `fact`, one `inference`, one `assumption`. Cite at least two in References.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kami/test-e2e#13