Repository navigation
fix(channels): keep status reads available during state maintenance - #153445
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 8:24 AM ET / 12:24 UTC (Revision 3). ClawSweeper reviewWhat this changesMakes channel-status diagnostics reuse existing device authentication without creating identities or saving returned tokens, with documentation and regression coverage. Merge readiness✅ Ready for maintainer review The fix remains necessary on inspected main and the latest release. No actionable correctness or security defect was found; the PR remains a useful landing candidate. Priority: P2 Review scores
Verification
How this fits togetherThe channel-status CLI queries the Gateway for live channel health and falls back to local configuration when the request fails. Its Gateway client also reads device credentials, so unnecessary credential writes can prevent otherwise healthy diagnostics. flowchart TD
A[Channel status command] --> B[Gateway startup readiness]
B --> C[Read-only client authentication]
D[Existing device credentials] --> C
C --> E[Gateway channel status request]
E --> F[Live diagnostic output]
E --> G[Config fallback on failure]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +179, Docs +2. Total +182 across 5 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep diagnostics on the existing read-only client lifecycle while preserving Gateway authorization, startup readiness, and live probe output. Do we have a high-confidence way to reproduce the issue? Yes, source identifies a precise trigger: coordinator custody blocks hello-token persistence before the channel-status RPC. The process regression exercises that sequence; this review did not execute a current-main reproduction. Is this the best way to solve the issue? Yes. Selecting the established read-only client policy is the narrowest repair and avoids duplicating authentication or state-ownership logic. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 7ed70e7fc400. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
What Problem This Solves
Fixes
channels status --probereturning config-only output for a reachable Gateway when another process owns the shared-state lifecycle coordinator.User Impact
Channel status can return live channel and event-loop evidence while local shared state is busy, without creating a device identity or persisting a returned device token.
Why This Change Was Made
The command selects the existing read-only Gateway-client policy. Authentication, server-side probing, token comparisons, and coordinator ownership keep their current behavior. The integration preserves the shared startup-readiness owner, the 60-second default, and the remaining timeout passed to the channel probe.
Evidence
The original registered-command regression uses a real WebSocket and holds the native coordinator before delivering a hello token. Original code reproduced the persistence error, config-only output without event-loop evidence, zero application RPC calls, and unchanged local state. The corrected command returns the full channel/event-loop payload; read-only
gateway call system.infoandgateway call channels.statuscontrols also pass.Fresh integration proof against
2418cf6beccb60ab6b7d8cd62e7728d9b471e778passed 73 tests across seven files, changed-file type/lint/formatting checks and repository guards, and independent P0–P2 review. The real-process cases keep the explicit 2,000 ms budget and unchanged authentication, coordinator, output, and state-hash assertions. Channel status uses its positive remaining allowance; the direct RPC control keeps exactly 2,000 ms. The existing fractional-clock case verifies that the outer and RPC budgets both equal 3,750 ms while using read-only state.The fresh negative attempt timed out before authentication and coordinator acquisition, so it does not reproduce the persistence defect. That failed run and the original qualifying regression evidence are retained. No deadlines were increased or retries added. This is isolated local proof; new exact-head hosted CI remains required after publication, and no installed-server performance improvement is claimed.
Release-note context: keep channel-status diagnostics read-only so local state maintenance does not hide reachable Gateway results.