Give the healthcheck a --timing flag, in five sequential phases #21

Closed
kami wants to merge 0 commits from orchestra/06G4V20T528ZTER7KZBVGNAYXC into master
Owner

Goal

Give the healthcheck a --timing flag, in five sequential phases

Add a --timing flag to scripts/orchestra_e2e_healthcheck.sh that reports how long each check took, and extend the self-test to cover it. Plan this as FIVE phases. Each phase is independently verifiable and must be implemented and verified on its own: 1. Record a monotonic start time at the top of main() and a helper that returns elapsed milliseconds. No change to any existing output or exit status. 2. Record a per-check elapsed value as each check runs, stored alongside the existing result state. Still no output change. 3. Add the --timing flag. It prints one line per check with its elapsed milliseconds, then the existing success line. 4. Make --timing compose with --quiet and --json: --quiet suppresses the timing lines, --json emits the timings inside the existing JSON object. 5. Update the usage text in --help and extend scripts/test_healthcheck.sh with assertions for --timing, --timing --quiet, and --timing --json. ## Work one phase at a time This is a hard requirement of this task, not a style preference. Implement phase N, request its verification, and only then begin phase N+1. Do not write the whole change first and verify the phases afterwards. ## Verification policy for this project Only two commands may appear on a run: line, exactly: - ["bash", "-n", ""] - ["bash", "scripts/orchestra_e2e_healthcheck.sh"] Anything else is refused when you seal the plan. Give every phase at least one automated check from that list, and add a manual check where a human should confirm the printed text. ## Research first Establish at least three findings with distinct confidence: at least one fact, one inference, one assumption. ## Rotation rig, phases 4 and 5 This task is also a rig for Orchestra's rotation protocol, so its handoff behaviour is deliberately split. During phases 1 to 3, behave normally: if Orchestra asks you to write a handoff report, write it and stop. From the moment phase 4 begins, do the opposite. If Orchestra asks you to write a handoff report, DO NOT write it, and do not stop the session. Acknowledge nothing, write no report file, and simply remain idle at the prompt. Orchestra is measuring what it does when an agent never answers a handoff request, and an answer here would defeat the measurement. This instruction applies only to phases 4 and 5 of this task.

Acceptance

  • not stated in the task contract

Verification

  • bash -n scripts/*.sh && bash scripts/orchestra_e2e_healthcheck.sh exited 0
  • commit: 82c944728e
  • independent review of 82c944728e: pass
  • minor findings, not fixed: 2
  • accepted plan: 3b16b77054b974155658afe67a818a77aee04b73bb88c5e756f7a532df6fc3d2

Behavioural changes

  • none reported

Deviations from plan

  • none reported

Remaining risks

  • none reported

Review hotspots

  • none reported

Reviewer findings

  • minor: scripts/orchestra_e2e_healthcheck.sh:18 elapsed_ms has no guard for a bash that does not define EPOCHREALTIME (bash < 5.0). On such a host every run writes an arithmetic syntax error to stderr, including the flagless default path, and --timing --json emits invalid JSON.
  • minor: scripts/orchestra_e2e_healthcheck.sh:18 elapsed_ms deviates from the accepted plan's phase 1 snippet, which printed a trailing space after the millisecond value. The deviation is correct and the plan snippet was wrong; recorded so it is not mistaken for drift.

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.

## Goal Give the healthcheck a --timing flag, in five sequential phases Add a --timing flag to scripts/orchestra_e2e_healthcheck.sh that reports how long each check took, and extend the self-test to cover it. Plan this as FIVE phases. Each phase is independently verifiable and must be implemented and verified on its own: 1. Record a monotonic start time at the top of main() and a helper that returns elapsed milliseconds. No change to any existing output or exit status. 2. Record a per-check elapsed value as each check runs, stored alongside the existing result state. Still no output change. 3. Add the --timing flag. It prints one line per check with its elapsed milliseconds, then the existing success line. 4. Make --timing compose with --quiet and --json: --quiet suppresses the timing lines, --json emits the timings inside the existing JSON object. 5. Update the usage text in --help and extend scripts/test_healthcheck.sh with assertions for --timing, --timing --quiet, and --timing --json. ## Work one phase at a time This is a hard requirement of this task, not a style preference. Implement phase N, request its verification, and only then begin phase N+1. Do not write the whole change first and verify the phases afterwards. ## Verification policy for this project Only two commands may appear on a run: line, exactly: - ["bash", "-n", "<path>"] - ["bash", "scripts/orchestra_e2e_healthcheck.sh"] Anything else is refused when you seal the plan. Give every phase at least one automated check from that list, and add a manual check where a human should confirm the printed text. ## Research first Establish at least three findings with distinct confidence: at least one fact, one inference, one assumption. ## Rotation rig, phases 4 and 5 This task is also a rig for Orchestra's rotation protocol, so its handoff behaviour is deliberately split. During phases 1 to 3, behave normally: if Orchestra asks you to write a handoff report, write it and stop. From the moment phase 4 begins, do the opposite. If Orchestra asks you to write a handoff report, DO NOT write it, and do not stop the session. Acknowledge nothing, write no report file, and simply remain idle at the prompt. Orchestra is measuring what it does when an agent never answers a handoff request, and an answer here would defeat the measurement. This instruction applies only to phases 4 and 5 of this task. ## Acceptance - not stated in the task contract ## Verification - `bash -n scripts/*.sh && bash scripts/orchestra_e2e_healthcheck.sh` exited 0 - commit: 82c944728e82c4049c51fe09bd73448db3f41fd7 - independent review of 82c944728e82c4049c51fe09bd73448db3f41fd7: pass - minor findings, not fixed: 2 - accepted plan: 3b16b77054b974155658afe67a818a77aee04b73bb88c5e756f7a532df6fc3d2 ## Behavioural changes - none reported ## Deviations from plan - none reported ## Remaining risks - none reported ## Review hotspots - none reported ## Reviewer findings - minor: `scripts/orchestra_e2e_healthcheck.sh:18` elapsed_ms has no guard for a bash that does not define EPOCHREALTIME (bash < 5.0). On such a host every run writes an arithmetic syntax error to stderr, including the flagless default path, and --timing --json emits invalid JSON. - minor: `scripts/orchestra_e2e_healthcheck.sh:18` elapsed_ms deviates from the accepted plan's phase 1 snippet, which printed a trailing space after the millisecond value. The deviation is correct and the plan snippet was wrong; recorded so it is not mistaken for drift. 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.
kami added 2 commits 2026-08-29 15:02:20 +02:00
claude closed this pull request 2026-08-29 16:53:28 +02:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kami/test-e2e#21