Repository navigation
improve: reduce repeated sender reads in shared transcripts - #148672
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 14, 2026, 9:50 PM ET / September 15, 2026, 01:50 UTC (Revision 3). ClawSweeper reviewWhat this changesReuse sender profile and verified GitHub identity facts within each shared-transcript page while preserving per-message labels and refreshing facts on subsequent pages. Merge readiness✅ Ready for maintainer review The optimization remains useful: current main still repeats sender lookups. No actionable correctness or security defect was found in the introduced patch, and no verified replacement supersedes it. Priority: P2 Review scores
Verification
How this fits togetherSession Share lets a paired Gateway display selected native OpenClaw transcripts. The catalog reader converts stored messages and sender profiles into bounded, portable transcript pages; the sharing plugin separately controls publication permission. flowchart LR
A[Shared transcript request] --> B[Check session publication]
B --> C[Read stored conversation page]
C --> D[Reuse sender facts within page]
E[Profile and verified identity store] --> D
D --> F[Build portable messages and labels]
F --> G[Recheck publication permission]
G --> H[Return page and cursor]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +33, Tests +115. Total +148 across 3 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep sender-fact reuse inside the existing attribution owner, limited to one synchronous page, with fresh reads on subsequent pages and publication checks owned by Session Share. Do we have a high-confidence way to reproduce the issue? Yes: current-main source repeats profile and identity reads for each message from the same sender, and the submitted page-reader fixture measures that path. This review did not execute the fixture. Is this the best way to solve the issue? Yes: lazy page-scoped reuse removes repeated reads without eager sender loading, persistent cache invalidation, or a new public API. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 25155c466de2. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
…#148672) * improve: reduce repeated sender reads in shared transcripts * refactor: keep catalog source participant projection internal --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Exporting a shared transcript repeatedly reads the same sender's profile and verified identity for every message on a page.
User Impact
Repeated senders require fewer database reads. Portable identities, per-message fallback labels, ordering, and cursors remain covered by the page-reader tests. A page reuses the first successful display facts for each sender; the next page reads fresh facts, including intervening profile and identity changes.
Why This Change Was Made
The existing attribution owner supplies a page-scoped projector that lazily reuses successful profile facts, including absent profiles or identities. It preserves first-encounter lookup and error order, computes labels separately for every message, and performs no eager lookup of later senders. One-shot callers retain their existing operation.
The cache lasts only for one synchronous page computation. An external commit or repeated read-admission failure for an already-read sender is no longer observed within that computation. Attribution remains display information; the source plugin's current sharing and session checks after awaited work are unchanged.
Evidence
git diff --checkpassed.7d18fc748dremoves only that export modifier; its internal actor caller and runtime behavior remain unchanged. Normal formatting hooks passed.7d18fc748d, including all three unused-export scans, SDK exports/surface and plugin boundaries, both historical ratchets, and the selected temporary-file report. Source and private dependency guards passed, with all observed descendants settled. This completes the selected checks alongside the 19 earlier hosted obligations; their recorded source/dependency scopes remain distinct.98b321fce638620713efafb39f85fbec3bde5fce, with main ancestry and cleanup verified.No SDK export, schema, transaction, retention, or permission change is included. No latency, memory, or disk-I/O improvement is claimed.
Related: #146197