Repository navigation
fix(chat): older history stops loading from legacy transcripts - #188488
Conversation
Refuse the retained post-open validation publication instead of the redundant schema-open checkpoint intentionally removed by #185760. Keep the during-open refusal, all four failure rows, real reader barrier, exact refusal count, physical-owner rejection, and cleanup assertions. Production code is unchanged. Reproduced scheduled main run 40496973076, attempt 1, job 122165204064 at 8d9d946: 11 passing tests and the same after-open failure. The final candidate and schema-admission keeper pass all 16 tests in 22.69 seconds wall time. Typed lint, formatting, line ratchets and independent P0-P2 review pass. The patch adds zero net test lines. At the tested a4a8f63 base, the full-tree unused-file scan reports eight untouched scripts; production scan passes and no changed path is reported. The subsequently incorporated main changes are disjoint from the reviewed reader, worker, state, transcript, test-runner and dependency inputs. Work session: https://team.openclaw.ai/chat/roboclaw/~key/dashboard/f2d13397-ed54-4d44-ade1-12b2edc3d0e3 Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: b4478a06-9f85-4034-aeec-975c3e197b4c
Reconcile the completed worktree with the verified failing main head and preserve its history. Explicitly restore the cold transcript before the lifecycle fixture reads it. Co-authored-by: vincentkoc <[email protected]>
Worked on by: - @vincentkoc Co-authored-by: vincentkoc <[email protected]> OpenClaw-Publication: f37bdf97-875f-4437-ac04-32a29baab130
Honor reader-owned hasOlder for explicit offset pages whose legacy records lack native message IDs. Keep cursor-only exhaustion unchanged and align the centered-page assertion with its existing cursor contract. Co-authored-by: vincentkoc <[email protected]>
Integrate the exact reviewed and tested b77f135 snapshot. Preserve canonical #186193 archive fixture bytes instead of the retired duplicate fix from closed #186152. Co-authored-by: vincentkoc <[email protected]>
|
🦞👀 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. What this changesThis PR preserves numeric continuation for initial and explicit-offset history pages whose legacy messages lack native IDs. Example: A CLI-backed conversation contains two earlier imported messages and three newer legacy messages; the client requests limit=1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep this PR open: it repairs a concrete legacy-history pagination regression still present on fetched main, and review found no introduced defect. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Gateway history reader converts stored and imported transcripts into bounded display pages; the response owner publishes messages, cursors, and numeric continuation metadata to clients. flowchart LR
A[Client history request] --> B[Gateway history handler]
B --> C[Canonical and CLI transcript readers]
C --> D[Display page and reader progress]
D --> E[Response budget and continuation owner]
E --> F[Messages and paging metadata]
Technical reviewBest possible solution: Retain the existing response owner's numeric continuation repair while preserving reader-owned exhaustion, source cursors, and byte budgets. Do we have a high-confidence way to reproduce the issue? The current-main cursor-only condition establishes the failure for ID-less numeric pages, and the supplied trace reports the corresponding legacy regressions failing before repair; this review ran no target code. Is this the best way to solve the issue? This is the smallest complete repair at the existing continuation owner: pagination metadata identifies numeric pages, and the reader's hasOlder fact preserves exhaustion semantics. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8f1ef6c97eff. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests +41, Other +2. Total +44 across 5 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 30, 2026, 1:17 PM ET / 17:17 UTC (Revision 2). |
Retain numeric continuation whenever the page owns numeric pagination and the reader reports older rows. Preserve native cursor/source fences and hidden-prefix exhaustion. Apply the exact independently reviewed and verified c36517b2 tree, with real legacy CLI-import regressions and 106 passing Bun cases. Co-authored-by: vincentkoc <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Merged via squash.
|
…law#188488) Keep older legacy chat history reachable from initial and explicit numeric pages when native message IDs are unavailable. Use the page’s existing numeric-pagination metadata and reader-owned hasOlder result, preserving hidden-prefix exhaustion, native cursor/source fences, and byte budgets. Preserve the centered-page cursor metadata contract. Add real legacy CLI-import regressions for limits one and two, with lossless numeric traversal, and retain default/explicit hidden-prefix and byte-limited cursor coverage. Verification: original Gateway assertions reproduced on the unmodified base; new legacy initial cases fail on the previous implementation. The coherent repair passes 106 actual Bun cases, core production and 29 dependent test type graphs, changed lint/format/ratchets, and fresh independent review. Current-head CI and protected landing are recorded separately in the native receipt. Work session: https://team.openclaw.ai/chat/roboclaw/~key/dashboard/f2d13397-ed54-4d44-ade1-12b2edc3d0e3 Co-authored-by: vincentkoc <[email protected]>
Related: #188372
What Problem This Solves
Fixes: clients stop loading older history when a legacy transcript page cannot supply native message IDs, including the initial CLI-import page.
User Impact
User impact: clients consuming numeric history continuation can reach older messages from both initial and explicit-offset pages. Exhausted hidden history still terminates. No configuration change, migration, or user action is required.
Why This Change Was Made
The existing response owner now uses the page’s numeric-pagination metadata and the reader’s
hasOlderresult, rather than requiring an explicit-offset echo or an encodable message-ID cursor. Cursor-only pages, source fences, and byte budgets are unchanged. The centered-page assertion matches the existing cursor metadata contract.The repair adds one net production line and 41 test lines against
4cc05039…. The unique 41-line allocation covers the two legacy initial-page regressions and extending existing hidden-prefix exhaustion checks to explicit offset zero; the shared baseline is unchanged. No new state, public fields, storage-writer behavior, schema, dependencies, timeouts, or UI code are introduced.Evidence
4cc05039…through the real WebSocket Gateway suite under Node 24.22.1.ci-run-node-test-shard.mts/bun-allexecution, Node 24.22.1 orchestration and repository-pinned Bun191755ec1: 106/106 pass—62 full WebSocket Gateway cases plus 44 CLI-import/cursor/budget cases. Default and explicit hidden-prefix/tool-only exhaustion, reversible byte-limited walks, and transcript-replacement fences pass.4cc05039…, P0–P3, GPT-6.1 Sol, scoped-clean, no actionable findings. Complete reader, CLI, cursor, byte-budget and UI-consumer context was supplied. The original hosted review found no defects on the prior revision; it is not represented as review of this update.control-ui-forbidden-catalog-measure.ts,github-publication-read-measure.ts,transcript-turn-gateway.mts). No ignores or baseline weakening.62be5a09…passed CI 41095455757, attempt 1. The earliere4925792…run was not reused as current-head proof; no CI rerun was requested.Red/green boundary trace
The fixed initial pages retain numeric continuation and the complete walk recovers the earlier imports and every legacy row. This is real Gateway RPC/worker-path proof, not browser visual proof or a full scheduled-main replay.
Requested by Vincent Koc.
Work sessions