Repository navigation
fix(secrets): avoid unrelated reads during GitHub maintenance - #144940
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, 11:11 AM ET / 15:11 UTC (Revision 2). ClawSweeper reviewWhat this changesThe PR restricts GitHub maintenance reads to the requested secret-name range and adds regression coverage for reduced reads and unchanged record selection. Merge readiness✅ Ready for maintainer review This remains a useful, focused fix: current main and v2026.9.4 still load unrelated secret values during GitHub maintenance. No actionable correctness or security regression was found. Priority: P2 Review scores
Verification
How this fits togetherGitHub authorization maintenance reads device and OAuth records from OpenClaw’s shared SQLite secret store. The returned names feed fresh record reads used for cleanup and credential maintenance. flowchart TD
A[GitHub maintenance] --> B[Requested record type]
B --> C[Indexed secret-name range]
D[Shared SQLite secret store] --> C
C --> E[Exact name and liveness checks]
E --> F[Register matching values for redaction]
F --> G[Fresh record reads and maintenance]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +3, Tests +116. Total +119 across 2 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep name filtering in the existing SQLite query owner while preserving exact classification, matched-value redaction, and fresh record reads. Do we have a high-confidence way to reproduce the issue? Yes, from source: listing either GitHub record type on current main materializes unrelated eligible team-secret values before filtering names; the added SQLite regression targets that boundary. This review did not execute it. Is this the best way to solve the issue? Yes. Restricting the existing indexed query is a narrow repair that preserves the accepted records and avoids a second cache, migration, or authorization policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against af73c58582b5. 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)
|
1f244ee to
df58d27
Compare
|
Merged via squash.
|
What Problem This Solves
Resolves a problem where GitHub authorization maintenance repeatedly loads unrelated shared-secret values into memory as the secret store grows. Both device and OAuth reconciliation performed this work even without a configured GitHub identity.
Why This Change Was Made
Narrow the existing indexed query to the requested GitHub name range before projecting values. Keep the exact JavaScript classifier, expiration and scope checks, matched-value redaction, name ordering, and fresh per-record reads. No schema or index change is needed.
User Impact
GitHub maintenance allocates less memory and spends less synchronous time reading unrelated secrets. Authorization behavior stays the same.
Evidence
check:changedpassed.