Repository navigation
refactor(auth): await Copilot cache persistence - #144810
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 11, 2026, 5:31 AM ET / 09:31 UTC. ClawSweeper reviewWhat this changesThe retained Copilot authentication SDK helper now awaits cache reads and persistence, with tests covering delayed completion and failures. Merge readiness✅ Ready for maintainer review Keep this useful, maintainer-protected PR open. Current main still uses synchronous cache operations, and the proposed conversion has no identified blocking defect. Priority: P2 Review scores
Verification
How this fits togetherThe retained SDK helper exchanges a GitHub credential for a Copilot token and caches it for reuse. This is separate from the bundled Copilot plugin’s current account-validation flow. flowchart TD
A[GitHub credential and domain] --> B[Await cache lookup]
B --> C{Matching usable token?}
C -->|Yes| F[Return token and endpoint]
C -->|No| D[Exchange GitHub credential]
D --> E[Await cache persistence]
E --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource -1, Tests +106. Total +105 across 3 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 one cache persistence owner with awaited completion while preserving the retained SDK contract and existing stored entries. Do we have a high-confidence way to reproduce the issue? Not applicable: this is asynchronous-contract groundwork, not a demonstrated current-main failure; source confirms the remaining synchronous cache boundary. Is this the best way to solve the issue? Yes: using the existing async store and awaiting its results is the narrowest conversion, without introducing another persistence owner or changing the public resolver signature. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against efb4ecf74370. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Preserve the reviewed harness while incorporating the landed benchmark prerequisite. Punchcard-Session: coral-orchard-orchard-d4 * commit '4407ed19ac63b1c1c84a0cfe6eb4bbeca9c2322c': (1196 commits) fix(perf): isolate benchmark subprocess transport (#144159) refactor(auth): await Copilot cache persistence (#144810) refactor(web-fetch): exercise URL normalization through the public tool (#144887) fix(ollama): preserve hosted subdomain model context (#144891) fix(doctor): explain Codex plugin health failures (#144813) fix(channels): honor pinned accounts in Mattermost model menus (#144880) fix(update): failed-update records hide the triggering error behind the excerpt tail (#144729) fix(logging): preserve OpenClaw package references in diagnostics (#144808) fix: retain plugin detail tab selections while inspection loads (#144647) fix: keep discovered models when sign-in tokens renew (#144861) fix(update): preserve local package overrides (#89985) fix(update): resolve compatibility bridges within the runtime graph (#144831) chore(i18n): refresh native locales (#144856) fix: preserve child signal termination during CLI respawn (#144838) fix(text): hide encoded MiniMax tool envelopes (#126307) fix(subagents): deliver child replies that match the empty placeholder (#130647) fix(cli): reject blank message channel selectors (#144802) fix(telegram): preserve mixed text order and pending stop (#144839) fix(memory): restore FTS fallback for same-name view collisions (#144783) chore(release): close out 2026.9.4 on main (#144708) ...
Related: #144592
What Problem This Solves
Copilot token resolution still reads and writes its SQLite cache through synchronous persistence contracts. It needs to retain the cache operation before returning a token when persistence becomes asynchronous.
Why This Change Was Made
Use the existing asynchronous core keyed store and await both cache lookup and save. Preserve the shipped explicit cache-file and injected JSON callback options, credential scoping, expiry checks, and token exchange behavior.
User Impact
Authentication behavior and stored data stay compatible. A cache save finishes before token resolution returns. This is API groundwork; moving native SQLite execution into workers remains tracked by the umbrella issue.
Evidence