Uh oh!
There was an error while loading. Please reload this page.
feat(transcript): add semantic position snapshots and Runtime Host paging - #4295
feat(transcript): add semantic position snapshots and Runtime Host paging#4295Sun-GLiang wants to merge 13 commits into
Conversation
6044ea4 to
1d166a2CompareGenerated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
Generated-by: OpenAI Codex
1d166a2 to
7e1e96dCompareGenerated-by: OpenAI Codex
Astro-Han
commented
Aug 31, 2026
Thanks for putting so much work into this. Please pause here before spending more time on PR3 or PR4. I need to correct the direction first. #4123 describes a real problem: the durable transcript is complete, but Desktop only exposes the current resident range to the Renderer. When the user jumps from the live tail to an old Turn, the range is replaced and the intermediate Turns lose their logical positions. They are still in Storage, but the conversation can look discontinuous. I wrote #4123 before #4206 landed. At that time, the Renderer had its own Turn virtualizer, height index, spacers, scroll compensation, and observers. #4206 later removed those mechanisms because they created a second layout and scroll state machine. It moved the active transcript bound into Runtime Host, kept the Renderer projection small and stable, and left the existing chat scroll logic as the single scroll authority. I should have updated #4123 after that change, but I didn’t. The issue still described the old virtualizer architecture, so it encouraged you to build the backend for a design that no longer exists on The current PR builds a much stronger system than the remaining product problem requires. It adds materialized position snapshots, two retained generations, durable leases, resumable legacy scanning, a second body paging protocol, and several new recovery and cursor state machines. Those pieces are carefully implemented, but there is still no Desktop consumer in this PR, so the user-visible problem remains unchanged. Some of these guarantees also work against the performance goal. A new transcript watermark can require rebuilding the complete position snapshot, and every normal transcript append now synchronously maintains the new semantic index even though Desktop does not consume it yet. I don’t think it is responsible to ask you to keep polishing this design before the real Desktop composition proves that these mechanisms are necessary. I’m going to revise #4123 around the architecture that exists after #4206. The smaller direction I want to validate is:
Please keep this PR as Draft for now. I don’t want you to throw away the branch yet because the tests and implementation are useful evidence, and parts of the normalized position index may still carry over. I first need to rewrite the issue and narrow the contract against current If I have missed a constraint that makes this smaller design unworkable, please push back. You have spent more time inside these failure and recovery paths than I have, and I want that context before deciding what can be removed. I used Codex to compare this PR with current |
Summary
Lands the minimum coherent Storage + Runtime Host slice requested in the PR1 composition review: durable semantic transcript position snapshots together with their first production consumer.
This PR intentionally contains PR1 + PR2. It supersedes #4258 as the landing vehicle; #4258 should remain Draft and unmerged, then be closed as superseded only after this PR lands.
Refs #4123
apache/mainat29d02dc218078297215f6792de3afb55b76386da7e1e96d61458172daaba1b65d8fb03ad287406a4Coherent production slice
ClientSessionSubscriptionconsumes those operations without exposing Storage snapshot triples, leases, generations, sequences, recovery state, or hidden shared identities.Protocol and bounds
session.transcript.positions.query:acquire | page | continue | replace | release.session.transcript.turn_window.page:open | continue.{ ordinal, key }values (turn | note | empty).Out of scope
No Desktop/Preload/Renderer activation, continuous layout, navigation, export, compatibility-epoch switch, or legacy-path removal is included. Those remain PR3/PR4 work. The small Desktop/CLI edits here are compile/test fixture updates for the additive client interface, not production activation.
Verification
access.credential.finalizegrant and the two semantic transcript grants.npm run build:testpassed.npm run typecheck,npm run lint,npm run format:check, ASF headers, Desktop/UI knip, and diff-check passed.Benchmark evidence from both normal and full-semantic modes of
npm --workspace @maka/runtime-host run benchmark:transcript:position_too_largewith zero fragments.This PR should remain Draft until the rebased GitHub checks are green and a maintainer confirms the combined composition. Do not merge #4258 separately.
AI use
Select exactly one:
Tool(s) and scope: OpenAI Codex implemented and reviewed the Storage/Runtime Host changes, tests, benchmark coverage, rebase conflict resolution, and merge-preparation updates. Commits include the required
Generated-by: OpenAI Codextrailer.Checklist
Does this PR entail a change in behavior?