Repository navigation
refactor(copilot): keep session binding storage off the host thread - #149577
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 15, 2026, 10:06 PM ET / September 16, 2026, 02:06 UTC (Revision 2). ClawSweeper reviewWhat this changesMoves Copilot session-binding storage to the existing SQLite worker and makes attempts, reset, compaction cleanup, and shutdown await pending binding work. Merge readiness✅ Ready for maintainer review Keep open: current main and v2026.9.4 still use synchronous Copilot binding storage. No blocking introduced defect was found, and the follow-up preserves the prior review’s clean findings. Priority: P2 Review scores
Verification
How this fits togetherThe Copilot harness connects OpenClaw conversations to GitHub Copilot SDK sessions. Its stored bindings let later turns resume compatible sessions and let reset and compaction target the correct session. flowchart TD
A[Conversation attempt or reset] --> B[Copilot harness]
B --> C[Per-session binding queue]
C --> D[SQLite worker]
D --> E[Compatible session binding]
E --> F[Copilot SDK session]
B --> G[Cleanup and shutdown]
G --> C
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +56, Tests +124, Docs +6. Total +186 across 12 files. View PR surface stats
Review metrics
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 binding persistence with the existing SQLite worker while preserving session compatibility, best-effort memory fallback, and complete lifecycle settlement. Do we have a high-confidence way to reproduce the issue? Not applicable as a discrete bug reproduction: this is a storage-boundary refactor. Source confirms the existing synchronous caller; runtime latency was not measured during this read-only review. Is this the best way to solve the issue? Yes. Reusing the existing worker-backed keyed store and awaiting private callbacks is a focused solution that preserves the persisted format and public plugin contract. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6cf521932af0. LabelsLabel 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)
|
|
Merged via squash.
|
…penclaw#149577) * refactor(copilot): await session binding persistence * test(copilot): expect database-worker harness routing
Related: #144592, #146557
What Problem This Solves
Copilot session binding storage still performs synchronous SQLite work during agent attempts, reset, and compaction.
User Impact
Session binding persistence moves off the host event loop while preserving SDK session continuity and the existing best-effort memory fallback. Reset and shutdown wait for admitted binding work and cleanup. No configuration, storage format, expiry, capacity, or public SDK change is required.
Why This Change Was Made
Use the existing worker-backed keyed store, await the private attempt callbacks, and serialize binding checks, writes, and publication per session within each harness. Deferred compaction cleanup retains its binding work through disposal. Stale compaction compares SDK session IDs so metadata updates do not prevent invalidation and a different replacement session survives.
Evidence