diff --git a/TASK.md b/TASK.md new file mode 100644 index 0000000..87184e3 --- /dev/null +++ b/TASK.md @@ -0,0 +1,18 @@ +# Task 06G4E6F69AKP2PA00S28D7ASBC + +Add a --quiet flag to the healthcheck script + +- Project: test-e2e +- Source: gitea:test-e2e/7 +- Priority: 0 + +## Instructions + +scripts/orchestra_e2e_healthcheck.sh already handles --help. Add a --quiet flag alongside it that suppresses the success line and still exits 0. Leave the default behaviour and the --help output unchanged. + +## 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. + +This file is immutable for the lifetime of the task (§6.2) — its hash is +carried in every handoff and re-verified on every pickup. Do not edit it. diff --git a/scripts/orchestra_e2e_healthcheck.sh b/scripts/orchestra_e2e_healthcheck.sh index 3113bc2..5ebab4c 100755 --- a/scripts/orchestra_e2e_healthcheck.sh +++ b/scripts/orchestra_e2e_healthcheck.sh @@ -1,16 +1,20 @@ #!/usr/bin/env bash main() { + local quiet= for arg in "$@"; do if [ "$arg" = --help ]; then - printf 'Usage: %s\n\n' "${0##*/}" + printf 'Usage: %s [--quiet]\n\n' "${0##*/}" printf 'Healthcheck script for Orchestra E2E tests.\n' printf 'Exits 0 with a success message if all checks pass.\n' + printf ' --quiet Suppress the success message; still exits 0.\n' exit 0 + elif [ "$arg" = --quiet ]; then + quiet=1 fi done - printf 'OK - all healthchecks passed\n' + [ -n "$quiet" ] || printf 'OK - all healthchecks passed\n' exit 0 } diff --git a/scripts/test_healthcheck.sh b/scripts/test_healthcheck.sh new file mode 100755 index 0000000..d14a80e --- /dev/null +++ b/scripts/test_healthcheck.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# Self-check for orchestra_e2e_healthcheck.sh. + +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.')" +fails=0 + +check() { # check