Late handoff rig: add a --version line to the healthcheck usage text #17
@@ -1,22 +1,24 @@
|
||||
# Task 06G4GWWJ8SWFREF06HDYEBAG0C
|
||||
# Task 06G4JX6MSQEP7N0D5JWW9EP5X4
|
||||
|
||||
Route the healthcheck output through one helper
|
||||
Late handoff rig: add a --version line to the healthcheck usage text
|
||||
|
||||
- Project: test-e2e
|
||||
- Source: gitea:test-e2e/15
|
||||
- Source: burnin/late-handoff-1
|
||||
- Priority: 0
|
||||
|
||||
## Instructions
|
||||
|
||||
`scripts/orchestra_e2e_healthcheck.sh` prints its success line from more than one place. Centralise the output so every path goes through one helper, and give that helper an explicit format argument rather than reading a global.
|
||||
|
||||
Behaviour must not change. The plain run, `--quiet`, `--help` and `--json` all keep their current output and exit statuses, and `scripts/test_healthcheck.sh` keeps passing.
|
||||
Add the version string to the usage text printed by scripts/orchestra_e2e_healthcheck.sh --help. Keep every existing line and exit status unchanged, and keep scripts/test_healthcheck.sh passing.
|
||||
|
||||
## Research first
|
||||
|
||||
Establish at least three findings with distinct confidence: at least one `fact`, one `inference`, one `assumption`.
|
||||
|
||||
|
||||
## Quality gate
|
||||
|
||||
bash -n scripts/*.sh && bash scripts/orchestra_e2e_healthcheck.sh
|
||||
|
||||
## Completion
|
||||
|
||||
Run the configured quality gate. When the task is ready for the worker to verify and deliver, create `.orchestra/done`. Do not write a prose completion report.
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
readonly VERSION=1.0.0
|
||||
|
||||
# emit <format> <template> [args...]: the single output path.
|
||||
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
||||
# never read from an enclosing variable.
|
||||
@@ -18,6 +20,7 @@ main() {
|
||||
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
||||
emit text 'Exits 0 with a success message if all checks pass.\n'
|
||||
emit text ' --quiet Suppress the success message; still exits 0.\n'
|
||||
emit text 'Version: %s\n' "$VERSION"
|
||||
exit 0
|
||||
elif [ "$arg" = --quiet ]; then
|
||||
quiet=1
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
||||
OK='OK - all healthchecks passed'
|
||||
USAGE="$(printf 'Usage: orchestra_e2e_healthcheck.sh [--quiet]\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.\n --quiet Suppress the success message; still exits 0.')"
|
||||
USAGE="$(printf 'Usage: orchestra_e2e_healthcheck.sh [--quiet]\n\nHealthcheck script for Orchestra E2E tests.\nExits 0 with a success message if all checks pass.\n --quiet Suppress the success message; still exits 0.\nVersion: 1.0.0')"
|
||||
fails=0
|
||||
|
||||
check() { # check <expected-stdout> <label> [args...]
|
||||
|
||||
Reference in New Issue
Block a user