Repository navigation
fix(server): stop superseded provider startups - #15784
Adamulek123 wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — The change is limited to two ownership checks that prevent superseded server startups from opening sessions or loading native threads, with focused regression coverage for the affected phases. Existing current-attempt behavior, schemas, defaults, and deployment configuration remain unchanged. Notes:
You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 WalkthroughWalkthroughProvider startup now checks whether the active attempt remains in ChangesProvider startup
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The startup guards stop superseded attempts from continuing to thread loading. No actionable merge-blocking risk remains after normal checks. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change restricts superseded startup work without adding access or authority. Existing session reuse and cleanup remain responsible for sessions already opened, avoiding unconditional closure of a session needed by a replacement attempt. No material security risk was found introduced or worsened. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dismissing prior approval to re-evaluate f8fe927
Problem
A provider start can lose ownership while resolving policy or opening a session. The run may still be
startingunder a replacement attempt, but the old startup continues opening or loading native state. This was found in the orchestration-v2 audit that produced #15311.Change
Check the current attempt and
startingstatus after policy resolution and after session opening, before fresh-thread creation, native resume or fork. The production change is two existing ownership checks. Upstream's native-thread turn accounting remains intact.Scope and approval
This replaces only the startup-ownership part of #15311. It is a server reliability fix for superseded work, shared by all clients and providers. No prior maintainer approval is claimed. Missing-project diagnostics and recovery type cleanup are deferred separately.
Verification
ProviderTurnStartService.test.tstests passed.starting. The old attempt performs no native ensure, resume or fork and writes no events. Removing both guards makes all four cases fail; restoring them passes.Implemented with GPT-6.1 Sol through Codex. Verification uses Effect/Vitest and PowerShell.