Repository navigation
fix(status): show delivery queue warnings in detailed reports - #134889
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 2:24 AM ET / 06:24 UTC. ClawSweeper reviewWhat this changesThis PR moves existing delivery-queue formatting into a shared CLI formatter and displays dead-letter and inbound-pressure warnings in Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer handling. Current main still omits these already-produced warnings, while the branch adds them to both detailed report paths with focused coverage; no blocking correctness or security finding was identified. Exact-head CI is still incomplete. Priority: P2 Review scores
Verification
How this fits togetherGateway health produces bounded delivery-queue counters alongside channel health. Detailed status commands consume that snapshot and render operator-facing tables or diagnostic text. flowchart LR
A[Gateway health snapshot] --> B[Delivery queue counters]
B --> C[Shared CLI formatter]
C --> D[Deep status health table]
C --> E[Complete status diagnosis]
D --> F[Operator warning]
E --> F
Before merge
Agent review detailsSecurityNone. PR surfaceSource -4, Tests +100, Docs +5, Other -1. Total +100 across 11 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Complete exact-head CI and retain this focused shared-rendering fix, which exposes the health data without changing queue behavior. Do we have a high-confidence way to reproduce the issue? Yes—source inspection shows Gateway health already produces delivery-queue counters while fetched main renders only channel health in detailed status output. The PR adds the missing render consumers and focused regression coverage. Is this the best way to solve the issue? Yes—the shared formatter keeps existing health semantics canonical and feeds the two omitted detailed renderers rather than duplicating queue inspection or modifying delivery policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1d54f21d0368. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
e55f374 to
f6b824f
Compare
|
Merged via squash.
|
…aw#134889) * fix(status): show delivery queue warnings in detailed reports * test(doctor): use the real gateway transport error fixture
Related: #133984
What Problem This Solves
Fixes an issue where
status --deepandstatus --allcould show a reachable Gateway and healthy channel while omitting an inbound delivery backlog already present in Gateway health.Why This Change Was Made
Move the existing delivery-queue formatter into the shared health-format module and use it on all three detailed diagnostic surfaces. Keep the formatter's transport-error dependency light and type the actual health response instead of serializing unknown error shapes.
User Impact
Detailed status reports show pressured ingress lanes and dead-lettered deliveries alongside channel connectivity. Ordinary status gains no extra probe. Queue ordering, retries, retention, and repair behavior remain unchanged.
Evidence
A real isolated baseline Gateway exposed one pressured lane, two pending messages, and one blocked message through health and deep JSON. All five CLI commands exited successfully, but deep/all text omitted the warning. The identical renderer diagnostic failed three assertions before the fix and passed all four afterward. Candidate replay of the same five commands passes: deep/all text now contains the warning and counts, health/deep JSON retain the same pressure, and Gateway shutdown exits 0. The replay uses the combined candidate build; the isolated renderer diagnostic attributes the output correction to this patch.
All 112 focused health/status tests pass. Gateway cleanup completed without remaining task processes. The pressure fixture uses synthetic local state; no Telegram or other channel message was sent.
Production LOC: net -4 after discounting the formatter move. Tests: net +100, including five existing formatter cases moved with their owner; docs: +5. The existing eight-attempt and 24-hour ingress policy is intentional and unchanged; this fixes visibility rather than the unconfirmed producer of the reported stalled turn.
Independent Codex autoreview found no actionable findings. The refactor also removes the obsolete one-assertion allowance from the assertion-safety baseline. The actual changed gate passed all 30 selected checks, including core and core-test types, core and tooling lint, import cycles, and remaining guards.
The first hosted CI run exposed an old Doctor test that forced the transport-error guard to accept an ordinary error. The fixture now constructs the real
GatewayTransportError, removes the obsolete facade mock, and keeps the sanitized diagnostic assertion. This correction changes tests only. Formatting, typed lint, core-test types, all 35 formatter tests, and a direct real-error/formatter diagnostic pass; independent Codex review is clean. The full local Doctor run reached the runner's existing no-output limit before assertions and is recorded as incomplete. Hosted CI one55f374subsequently passed the corrected Doctor case, its restart sibling, and the entire Doctor group (5 files, 171 tests).The latest ClawSweeper review has no code findings and asks for completed exact-head CI and ordinary maintainer handling. Its automated stored-data-model warning does not apply:
diagnosis.tsonly projects an existingHealthSummaryinto report text. This PR has no schema, stored-state, migration, retention, or recovery change.The prior remaining hosted failure was the shared release-inventory
git ls-treeoutput overflow. This branch is rebased onto the canonical repair in #134824 (eaaa6da); both PR commits remain patch-identical. Full CI on rebased headf6b824f8b4dpassed: 222 successful checks, one neutral result, 45 skips, and none pending or failing. This satisfies the latest ClawSweeper rank-up request for green exact-head CI. No status or health assertion failed on the corrected pre-rebase head.