Add a --strict mode to the healthcheck and keep the pinned usage text honest #12

Open
opened 2026-08-28 12:49:10 +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 over everything.

Automated verification only:

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

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

Extend scripts/orchestra_e2e_selftest.sh so it asserts that --strict --nonsense exits 2 and that --strict alone still exits 0.

Automated verification only:

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

Phase 3 — keep the pinned usage text honest

scripts/test_healthcheck.sh pins the healthcheck's exact --help output in a hardcoded USAGE variable and compares with string equality. Phase 1 adds --strict, so that pinned text must be updated in place to match, and the pinned comparison must keep passing.

Work from the USAGE variable that is already in scripts/test_healthcheck.sh. Do not rewrite the file's structure.

Automated verification for this phase must run 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"]

A run: line outside those is refused when the plan seals, not later.

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 over everything. Automated verification only: - run: ["bash", "-n", "scripts/orchestra_e2e_healthcheck.sh"] - run: ["bash", "scripts/orchestra_e2e_healthcheck.sh"] ## Phase 2 — cover `--strict` in the self-test Extend `scripts/orchestra_e2e_selftest.sh` so it asserts that `--strict --nonsense` exits 2 and that `--strict` alone still exits 0. Automated verification only: - run: ["bash", "-n", "scripts/orchestra_e2e_selftest.sh"] ## Phase 3 — keep the pinned usage text honest `scripts/test_healthcheck.sh` pins the healthcheck's exact `--help` output in a hardcoded `USAGE` variable and compares with string equality. Phase 1 adds `--strict`, so that pinned text must be updated in place to match, and the pinned comparison must keep passing. Work from the `USAGE` variable that is already in `scripts/test_healthcheck.sh`. Do not rewrite the file's structure. Automated verification for this phase must run 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"] A `run:` line outside those is refused when the plan seals, not later. ## 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#12