Give the healthcheck a self-test and a machine-readable mode #11
Reference in New Issue
Block a user
Delete Branch "orchestra/06G4FT0MB733H2ZCZ237WFHFD8"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Give the healthcheck a self-test and a machine-readable mode
Three pieces of work, in order. Plan them as exactly three phases in that order. ## Phase 1 — a self-test for the healthcheck New file
scripts/orchestra_e2e_selftest.sh, executable,#!/usr/bin/env bash. It runsscripts/orchestra_e2e_healthcheck.sh, then asserts: - exit status is 0 - stdout containsOKOn failure it prints which assertion failed and exits 1. On success it printsselftest: okand exits 0. Verification for this phase is automated only. The one check is: - run: ["bash", "-n", "scripts/orchestra_e2e_selftest.sh"] Do not add a manual step to this phase. ## Phase 2 —--jsonon the healthcheckscripts/orchestra_e2e_healthcheck.sh --jsonprints exactly one line: {"status":"ok","checks":1} and exits 0. Without--jsonthe existing human output is unchanged, and--helpkeeps working.--jsonand--helptogether behave as--help. Verification for this phase must include both an automated check and a manual step. The JSON shape is a judgement a human confirms by reading it, so state the manual step as the exact command a human runs and the exact line they should see. ## Phase 3 — teach the self-test about--jsonExtendscripts/orchestra_e2e_selftest.shto run the healthcheck twice: once plain and once with--json. Assert the plain run still containsOK, and assert the--jsonrun prints one line beginning with{"status":. Verification for this phase is automated only: - run: ["bash", "-n", "scripts/orchestra_e2e_selftest.sh"] - run: ["bash", "scripts/orchestra_e2e_healthcheck.sh"] ## Constraints The project's verification policy allows exactly two command shapes: ["bash", "-n", ""] ["bash", "scripts/orchestra_e2e_healthcheck.sh"] Arun:line outside those is refused when the plan seals, not later. ## Research first Before planning, establish at least three findings and label their confidence honestly: at least onefact, oneinference, and oneassumption. The plan must cite at least two of them in References.Acceptance
Human decisions
Verification
bash -n scripts/*.sh && bash scripts/orchestra_e2e_healthcheck.shexited 0ba0e891348ba0e891348: passBehavioural changes
Deviations from plan
Remaining risks
Review hotspots
The sections above are derived from Orchestra state. The reported
changes, deviations, risks, and hotspots are the implementing agent's
own account and are not verified.
Please change one thing before this merges: the self-test should print the healthcheck output it saw when an assertion fails, so a red run is diagnosable without rerunning by hand. Everything else is fine.