Merge pull request 'Late handoff rig: add a --version line to the healthcheck usage text' (#17) from orchestra/06G4JX6MSQEP7N0D5JWW9EP5X4 into master
Reviewed-on: #17
This commit was merged in pull request #17.
This commit is contained in:
@@ -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
|
- Project: test-e2e
|
||||||
- Source: gitea:test-e2e/15
|
- Source: burnin/late-handoff-1
|
||||||
- Priority: 0
|
- Priority: 0
|
||||||
|
|
||||||
## Instructions
|
## 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.
|
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.
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
## Research first
|
## Research first
|
||||||
|
|
||||||
Establish at least three findings with distinct confidence: at least one `fact`, one `inference`, one `assumption`.
|
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
|
## 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.
|
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
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
readonly VERSION=1.0.0
|
||||||
|
|
||||||
# emit <format> <template> [args...]: the single output path.
|
# emit <format> <template> [args...]: the single output path.
|
||||||
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
# format: text or json print; none suppresses (--quiet). Explicit argument,
|
||||||
# never read from an enclosing variable.
|
# never read from an enclosing variable.
|
||||||
@@ -18,6 +20,7 @@ main() {
|
|||||||
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
emit text 'Healthcheck script for Orchestra E2E tests.\n'
|
||||||
emit text 'Exits 0 with a success message if all checks pass.\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 ' --quiet Suppress the success message; still exits 0.\n'
|
||||||
|
emit text 'Version: %s\n' "$VERSION"
|
||||||
exit 0
|
exit 0
|
||||||
elif [ "$arg" = --quiet ]; then
|
elif [ "$arg" = --quiet ]; then
|
||||||
quiet=1
|
quiet=1
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
HC="$(dirname "$0")/orchestra_e2e_healthcheck.sh"
|
||||||
OK='OK - all healthchecks passed'
|
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
|
fails=0
|
||||||
|
|
||||||
check() { # check <expected-stdout> <label> [args...]
|
check() { # check <expected-stdout> <label> [args...]
|
||||||
|
|||||||
Reference in New Issue
Block a user