Repository navigation
improve: avoid loading transcript revisions for exact retries - #146381
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 12, 2026, 3:58 PM ET / 19:58 UTC. ClawSweeper reviewWhat this changesMeeting transcript storage checks SQLite for one exact retry match instead of loading every retained revision, with expanded coverage for equality edge cases. Merge readiness✅ Ready for maintainer review Keep open: the optimization remains useful on current main, preserves the inspected retry contract, and has relevant on-disk performance evidence. No actionable patch defect was found. Priority: P2 Review scores
Verification
How this fits togetherMeeting transcript providers feed utterances into OpenClaw’s shared SQLite store. The store suppresses exact retries while retaining revisions for later reading, summaries, and exports. flowchart TD
A[Transcript provider] --> B[Append utterance]
B --> C[Session-scoped exact-match query]
C --> D{Exact retry exists?}
D -->|Yes| E[Keep stored history unchanged]
D -->|No| F[Append revision and advance sequence]
F --> G[Transcript reads and summaries]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +13, Tests +41. Total +54 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain the existing transcript store and exact equality semantics while returning only the existence result needed for retry suppression. Do we have a high-confidence way to reproduce the issue? Yes: current main clearly loads all same-ID revisions for each retry, and the PR supplies populated-store timings through the public append operation; this review did not execute benchmarks. Is this the best way to solve the issue? Yes: the bounded query uses the existing owner and preserves null, metadata-byte, Unicode, and session-scoping semantics without a migration or parallel implementation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 63bafe6492ec. 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.
|
Related: #146376
What Problem This Solves
Meeting transcript retries load every revision of the same utterance before deciding whether an exact copy already exists.
User Impact
Repeated transcript updates with many retained revisions use less CPU and memory. Existing retry and revision behavior stays the same; no database migration or configuration change is required. Minimal histories can incur a small latency cost from the extra SQL predicates.
Why This Change Was Made
Ask SQLite for one exact match instead of loading all revisions into JavaScript. Preserve session scope, NULL versus false, exact metadata bytes, and the existing handling of unpaired Unicode surrogates.
Evidence
appendUtteranceForSessioncalls against isolated on-disk SQLite, with 200 alternating before/after samples per case on the final implementation. At 1,000 revisions, median early retry 3.28 → 0.58 ms, latest retry 4.15 → 1.28 ms, and new revision 4.57 → 1.30 ms. Fixtures used approximately 492-byte text plus 191-byte metadata per revision.