Repository navigation
fix(gateway): keep accepted runs alive across config reloads - #163174
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 October 1, 2026, 10:46 PM ET / October 2, 2026, 02:46 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch backports Gateway changes that preserve accepted runs across transport-policy reloads while retaining grant revocation, and corrects proxy credential handling under a fixed startup authentication mode. Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored backport remains necessary for release/2026.9.8 despite the original fix being on main. No actionable introduced defect or unresolved authority-proof blocker was found. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway authenticates client requests and applies configuration changes to running connections. Its retained-authority owners determine whether accepted session turns and delegated work may continue after those connections close. flowchart LR
A[Authenticated request] --> B[Captured access grant]
C[Committed configuration change] --> D[Transport policy check]
C --> E[Current grant check]
D --> F[Reconnect client]
B --> E
E --> G[Continue or revoke accepted work]
G --> H[Guard final side effects]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +274, Tests +931, Docs +9. Total +1214 across 29 files. View PR surface stats
Review metricsNone. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep transport reconnect decisions separate from retained grant revocation on the release branch, with live authority checked before initial-turn persistence and delegated effects. Do we have a high-confidence way to reproduce the issue? Yes, for the targeted release base: its policy reconciliation revokes accepted sources on transport changes, matching the reported validation failures. Current main already separates those decisions; this read-only review did not execute either revision. Is this the best way to solve the issue? Yes. The backport reuses the existing admission, reload, and retained-authority owners, and the startup-mode correction preserves the effective authentication contract without adding configuration or storage. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 949f3f52121b. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Related: #160909
What Problem This Solves
Fixes: accepted Matrix and Telegram work is cancelled when a release-validation scenario hot-reloads Gateway configuration.
User Impact
User impact: runs accepted before an unrelated config reload can finish, while revoked identities, origins, methods, and shared credentials still lose authority immediately.
Why This Change Was Made
This backports the existing
mainauthority split between transport fencing and admitted-principal grants torelease/2026.9.8. It also carries the fixed startup auth mode through proxy-policy classification and local fallback-password revocation, covering an override edge case found during backport review.Evidence
Async work scope is closedimmediately after config reload; the Telegram policy hot-reload scenario timed out on the same boundary.pnpm test src/gateway/server-shared-auth-generation.test.ts --maxWorkers=1).pnpm tsgo:coreandpnpm tsgo:core:testpassed.git diff --checkpassed.check-changed --staged --base origin/release/2026.9.8passed its changed-scope checks until the repository's pre-existing 11 expired plugin-boundary compatibility records; the patch does not touch those records.Live Matrix/Telegram validation was not redispatched; this PR relies on the original diagnostics artifact plus focused local owner-boundary proof.