Repository navigation
fix: keep manually stopped idle channel accounts stopped - #128237
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 10:48 AM ET / 14:48 UTC. ClawSweeper reviewWhat this changesThe PR makes an explicitly stopped idle channel account retain its manual-stop state so automatic health recovery leaves it stopped. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessThis maintainer PR fixes a current Gateway lifecycle defect: an exact idle-account stop returned before recording manual intent. No blocking code or security finding was identified; validate the exact merge head before landing. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (partial) — step 2 Assertions:
How this fits togetherGateway channel management receives operator and lifecycle stop requests, records account runtime state, and feeds that state to automatic recovery. The health monitor uses the recorded manual-stop state to decide whether a stopped account may restart. flowchart LR
A[Operator stop request] --> B[Gateway channel manager]
B --> C[Manual stop intent]
C --> D[Channel runtime snapshot]
D --> E[Health monitor]
E --> F[Remain stopped or restart]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -5, Tests +13. Total +8 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep manual-stop intent owned by the channel manager for explicitly targeted accounts, preserve the no-enumeration channel-wide path, and land after exact-head validation. Do we have a high-confidence way to reproduce the issue? Yes. Current main’s idle exact-account fast path returns before the manual-stop write, and the added focused test directly exercises that path. Is this the best way to solve the issue? Yes. Recording intent in the channel manager is the narrow owner-boundary repair and lets the existing health-monitor suppression apply without new policy or enumeration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 000db97c8252. LabelsLabel changes:
Label 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)
|
|
Land-ready proof for exact head
Live-proof gap: no external provider/channel flow was run. No provider contract changed; deterministic channel-manager producer coverage plus existing health-monitor consumer coverage proves the affected lifecycle boundary. Repository-native |
|
Merged via squash.
|
Co-authored-by: Amp <[email protected]>
What Problem This Solves
Fixes an issue where explicitly stopping an already-idle channel account could appear successful without recording the operator's stop intent. The channel health monitor could then restart that account on its next recovery pass.
Why This Change Was Made
The channel manager now preserves its channel-wide no-enumeration fast path but lets exact-account stops reach the existing manual-intent owner even when no provider task or stop hook is active. Explicit account targeting no longer enumerates unrelated configured accounts, and nonmanual reload/health stops retain their existing behavior.
User Impact
Operators can reliably keep a previously failed or idle channel account stopped. A later health check will honor the explicit stop instead of unexpectedly restarting the account.
Evidence
isManuallyStopped(...) === false.node scripts/run-vitest.mjs src/gateway/server-channels.test.ts src/gateway/channel-health-monitor.test.ts— 312/312 tests passed on the rebased head.node scripts/check-changed.mjs -- src/gateway/server-channels.ts src/gateway/server-channels.test.ts— full changed-file gate passed, including formatting, lint, core/test typechecks, import cycles, and repository guards.32645440460completed successfully with no pending or failed checks.This is a deterministic Gateway-manager lifecycle fix; no external provider or live channel operation is required for the owner-boundary proof.
ClawSweeper Review
ClawSweeper's latest review of exact head
d50ca81b3db8b0eb9832ae0b932ba97304dd4669found no code or security issue and agreed this is the best owner-boundary repair. Its live-proof wrapper marked the combined focused command partial because an expected terminal headline was not observed within 30 seconds; the captured output showed the executed suites passing, while the same exact combined command independently completed 312/312 and exact-head CI run32645440460is green. The requested P1/P2 mitigation is exact merge-head validation plus ordinary maintainer review: repository-native review artifacts validateREADY FOR /prepare-prwith zero findings, andprepare-runwill validate the current-main merge candidate before landing. No external-provider proof is required because no provider contract changed.