Repository navigation
fix(gateway): keep transcript reads available during registry refresh - #159208
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 28, 2026, 1:56 AM ET / 05:56 UTC (Revision 16). ClawSweeper reviewWhat this changesThe branch limits cross-store registry discovery to displayed history and checks the primary SQLite file for exact transcript reads, with worker and broadcast regression coverage. Merge readiness✅ Ready for maintainer review Current main still makes exact transcript reads depend on auxiliary registry discovery. The PR remains a distinct, useful fix; the reviewed patch has no actionable blocking finding. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway reads stored session transcripts through a background worker and uses the results for history views and session events. Cross-store registry facts help display subagent lineage; direct message reads use their primary session database. flowchart LR
A[Transcript request] --> B{Request type}
B -->|Displayed history| C[Cross-store lineage]
B -->|Exact read| D[Primary session database]
C --> E[History worker]
D --> E
E --> F[Current-owner checks]
F --> G[History result or event]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +14, Tests +145. Total +159 across 4 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the scoped read path after normal native gates, preserving primary database lifetime checks and cross-store lineage checks where display needs them. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source always prepares the registry for exact reads, and the real-worker broadcast test defines a focused registry-failure and refresh scenario; I did not execute it in this read-only review. Is this the best way to solve the issue? Yes. The change removes the unrelated registry dependency from direct reads while retaining primary-file, shared-state, and display-lineage checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1fe560c198c2. 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 (15 earlier review cycles; latest 8 shown)
|
b347cf4 to
dacd0a8
Compare
dacd0a8 to
a6e3e1f
Compare
a6e3e1f to
34e9f1f
Compare
34e9f1f to
03ecf8a
Compare
03ecf8a to
9c58f15
Compare
9c58f15 to
83a6c82
Compare
83a6c82 to
b07e769
Compare
Prepare auxiliary store discovery only for history views that consume cross-store lineage. Preserve primary authority and cleanup checks for every request, and dispose Talk test resources even when publication rejects.
b07e769 to
f3197c2
Compare
…openclaw#159208) * fix(gateway): keep transcript reads available during registry refresh Prepare auxiliary store discovery only for history views that consume cross-store lineage. Preserve primary authority and cleanup checks for every request, and dispose Talk test resources even when publication rejects. * fix(gateway): retain primary file identity through history delivery * test(gateway): gate broadcasts on primary history replies
What Problem This Solves
Fixes transcript publications failing when an unrelated agent-registry refresh overlaps an exact read of the current session.
User Impact
Exact transcript reads remain available during auxiliary registry churn. Replaced primary files and retired state owners still prevent delivery. No configuration, schema, permission, migration, or update behavior changes.
Why This Change Was Made
Only RPC, HTTP, and delta display projections consume cross-store lineage. Prepare and revalidate auxiliary sources for those requests; bind exact reads to their primary database through the existing path matcher. Every request retains state admission, cancellation, captured-target, snapshot, physical-file identity, and cleanup checks. No retry or suppressed error is added.
Broadcast tests now hold a real primary-worker reply. Auxiliary registry refresh, churn, or failure must permit publication; retirement of the captured shared-state owner must still refuse it.
READY-TO-LAND. This PR precedes the commands cleanup (#158940). Both PRs remain open, unarmed, and unmerged.
Evidence
Head:
f3197c247369024226b9e3ce3c50e4e6e73a0d9c. Independent review has no accepted/actionable P0–P2 finding. Exact-head CI passed: 121 successful jobs, 21 skipped.4f8b8638d269891427f0b7e4bbacad92cac464b6passed all nine history files (84s), the candidate build (429s), and adjacent command/integration/Doctor cases. Full changed check: all type/guard/dead-export phases passed; the sole unrelated UI line-limit failure was repaired by merged fix(ci): keep chat attachment controls within lint limit #160159, followed by passing full core lint (341s), targeted UI changed checks (448s), 34 attachment tests, and the UI build. Providerblacksmith-testbox, completed leasetbx_01m3jzxt3evb7j4511jf2zrgmk, proof runner.Earlier exact-head CI measured physical-replacement cases at 0.963s and 0.960s; seven new runtime cases totaled 0.013s. These are case durations, not file wall time. The latest integration keeps the reviewed patch identical and includes existing upstream installer/packaging fixes; no retry, timeout increase, or weakened assertion conceals a failure.