Repository navigation
fix(diagnostics): stop labeling stale phases as recent - #119625
fuller-stack-dev merged 1 commit into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 12:04 PM ET / 16:04 UTC. ClawSweeper reviewWhat this changesThe PR limits completed diagnostic phases shown in Gateway liveness warnings to the warning’s sampled interval while preserving retained phase history and active-phase reporting. Merge readinessKeep open. The exact-head patch is a narrow, correct diagnostic-attribution repair that current main does not contain; it needs the failed exact-head check resolved and lint completed before normal maintainer handling. Priority: P2 Review scores
Verification
How this fits togetherGateway heartbeats sample liveness and emit warning logs plus structured events. Diagnostic phases provide timing context, so the warning should show completed work from the sampled interval rather than capacity-retained historical work. flowchart LR
A[Gateway heartbeat] --> B[Liveness sample]
B --> C[Measured interval]
D[Completed phase history] --> E[Interval attribution]
C --> E
F[Active phase] --> G[Liveness warning]
E --> G
G --> H[Log and structured event]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +15, Tests +85. Total +100 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land this owner-boundary filter after the exact-head check failure is resolved or shown unrelated and all required checks complete green. Do we have a high-confidence way to reproduce the issue? Yes—source shows retained completed snapshots were passed to liveness warnings without an interval filter, and the PR body records a focused before/after Testbox scenario; no local execution was needed for this read-only review. Is this the best way to solve the issue? Yes—the filter belongs at the liveness attribution projection, leaving the reusable retained-history API and legitimate active-phase reporting unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 113af2fcbd02. 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)
|
294a2eb to
1aa0f6d
Compare
|
Merged via squash.
|
Related: #119607
Prior active-phase eviction attempt: #83669
What Problem This Solves
Fixes an issue where operators investigating a Gateway liveness warning could
see an old completed phase labeled as
recentPhasesmerely because fewer than40 newer phases had completed. During the August 5, 2026 Gateway stall
investigation, that made a historical
post-ready.context-window-cachetiminglook causally related even though the retained ring had no age filter.
Why This Change Was Made
Liveness warnings now attribute only phases completed during that liveness
sample's actual interval. The bounded phase ring remains available as retained
history, and long-running active phases remain visible; this deliberately avoids
the arbitrary global active-phase timeout proposed in #83669.
User Impact
Gateway liveness diagnostics no longer imply that capacity-retained historical
work was recent. Operators still receive complete timing, CPU, and detail fields
for phases that completed during the measured interval.
AI-assisted change; I reviewed the owner boundary, tests, and runtime evidence.
Evidence
bf7840f5391a: ten minutes after completion,post-ready.context-window-cachewas still returned as recent; a separateone-hour active phase remained active.
31010388554:the rendered warning and structured liveness event contained only
recent.phase, omittedstale.phase, preserved timestamps, duration, CPU,ratio, and details, and kept the one-hour active phase visible.
pnpm check:changed: passed.history, structured/log attribution, field preservation, and active-phase
visibility passed; implementation-only cost and unrelated Gateway surfaces
remained outside black-box observability.