Repository navigation
improve: reduce repeated Skill Workshop history reads - #158757
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 26, 2026, 5:40 AM ET / 09:40 UTC (Revision 2). ClawSweeper reviewWhat this changesThe branch filters Skill Workshop reconciliation reads to pending SQLite proposals, retains a final full-history read, and extends a service test that counts worker-returned records. Merge readiness✅ Ready for maintainer review Current main still materializes completed proposals during reconciliation reads. This PR makes a distinct, well-supported optimization, and the reviewed head has no identified blocking defect. Priority: P2 Review scores
Verification
How this fits togetherSkill Workshop stores proposal records in SQLite and serves proposal listings to the Gateway, CLI, and agent tools. Listing reconciles pending work before returning the selected agent’s proposal history. flowchart LR
A[Gateway, CLI, and tools] --> B[Proposal listing]
B --> C[Agent-scoped pending query]
C --> D[Pending recovery]
D --> E[Full-history query]
E --> F[Proposal history]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +1, Tests +16. Total +17 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep status filtering in the Workshop store while preserving pending recovery and the complete agent-scoped history returned to callers. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main performs unfiltered proposal reads during both manifest calls, and each manifest call lists records twice. This read-only review did not run a benchmark. Is this the best way to solve the issue? Yes. Filtering at the existing SQLite query avoids decoding and transferring completed rows during reconciliation while retaining the final full-history response. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 2919fa6bdc4f. LabelsLabel changes: No label 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)
|
|
Merged via squash.
|
What Problem This Solves
Skill Workshop repeatedly decodes and transfers the entire retained proposal history while listing proposals, even when most proposals no longer need reconciliation.
User Impact
Listing a large proposal history does less work while returning the same complete history. Pending recovery, agent scoping, ordering, and the final fresh read are preserved. No schema migration, new index, configuration change, or operator action is required.
Why This Change Was Made
Apply the existing proposal status in SQLite so the three reconciliation enumerations return only pending proposals; the final enumeration still returns all proposals. For valid stable records this reduces materialized records from
4NtoN + 3P, whereNis all proposals andPis pending proposals. This saves JSON decoding and worker transfer; without a status index, it does not claim fewer SQLite rows scanned.Evidence
checks-node-changed-compact-small-9. ClawSweeper also completed a clean review in run 36229931514. Native merge and all required gates completed successfully.Focused proof command: