Skip to content

The repository-review pipeline gets no stage-health verdict — nothing reads review-log.jsonl's own exit codes, the same blind spot #662 closed for the implementation pipeline

Id: TD-PPagop-26082605 · Status: resolved · Filed: 2026-08-26 · Resolved: 2026-09-23 · Ref: #1786

Noticed while reviewing PR #774 (issue #662), which is where the implementation pipeline’s half of this gap was closed. Not a defect in that pull request: #662 and requirement 2.8 are both scoped to log.jsonl’s stage-end records, and that is exactly what shipped. This records the symmetric gap that scope leaves in the sibling pipeline.

lib/stage-health.sh’s stage_health_verdicts reads stage-end events out of a node’s log.jsonl and derives a per-stage last_success / consecutive_failures / verdict. review-cycle.sh writes to a different stream — state_dir/review-log.jsonl (review-cycle.sh:222) — and logs a different event name: review-stage-end (review-cycle.sh:984), with review-attempt-failed beside it (review-cycle.sh:403, :930, :1009) and review-end carrying the run’s own exit code (:362). None of those names is in stage_health_verdicts’s stage_names, and no reader anywhere else consults them for health:

  • lib/stage-budget.sh:124 reads review-stage-end, but only to attribute spend to the project-reviewer actor.
  • scripts/publish-dashboard.sh scans reviews/ for cost (:1113–:1185) and never reads review-log.jsonl at all.
  • agent-cycle.sh --status’s new stages: section is the implementation cycle’s own, and review-cycle.sh has no equivalent.

So the exact condition #662 was filed about — a stage failing every attempt while every operator-facing signal stays green — is still unreadable for the repository-review pipeline. A project-reviewer engagement that has failed on its last N runs looks, from --status, from check-nodes.sh and from the dashboard, identical to one that has simply had no repo due for review.

The review pipeline runs on its own cron cadence and produces the findings that seed a good share of this repository’s work items, so a silent stall there is not visible as an absence of pull requests for days. It is the same class of failure and the same cost as the 2026-08-21 incident, only slower to notice because the pipeline’s cadence is slower.

stage_health_verdicts is already a pure stdin reader parameterised by nothing but its thresholds, so the cheapest shape is probably to give it the event/stage names to match rather than hard-coding stage-end and stage_names — then have review-cycle.sh’s own cleanup write a state_dir/.review-stage-health.json on the identical stage_health_write_status path, fold it into the heartbeat beside stage_health, and render it in the same dashboard panel. Requirement 2.8 (docs/IMPLEMENTATION-PIPELINE-SPEC.md) and docs/REVIEW-PIPELINE-SPEC.md would both need the as-built edit, plus docs/DASHBOARD-SPEC.md’s DASHBOARD_DATA contract.

Worth settling first whether one failing verdict per pipeline is the right granularity for a pipeline whose only real stage is project-reviewer, or whether the run-level review-end exit code alone would answer the question at a fraction of the wiring.

  • lib/stage-health.sh, docs/IMPLEMENTATION-PIPELINE-SPEC.md requirement 2.8
  • review-cycle.sh:222, :362, :403, :984
  • Filed from PR #774 (issue #662); see also TD-PPagop-26082504, which records a different limit of the same verdict (an exit_code: 0 stage whose attempt nonetheless failed).

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/996.