Repository navigation
perf(browser): replay only appended session metadata - #308
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #303.
Change
Reuse a successful native journal structural scan for an unchanged SessionManager generation and parse only complete appended JSONL suffix lines. Read every selected browser result from the current file; validate entry/tool-call/session/snapshot identity before exposing refs. No result body/ref-map cache and no native-producer changes.
Detect native header-generation reseeding. Fall back to the existing safe scanner/host path for rotation, truncation, metadata changes, incomplete records, invalid headers and real file/publication errors. Keep the actual native append-only contract rather than introducing a revision framework or making adversarial forged-metadata outside edits a permanent gate.
The implementation retains structural metadata per live manager, bounded by journal record count. This is explicit in session-storage docs; cold scanning already has the same peak structure.
Also fix the required verification facade silently skipping three script entrypoints through macOS
/varsymlinks/encoded paths: use Node's nativeimport.meta.main. The existing 19-case CLI-path suite was RED before the supporting fix and GREEN after it; no assertions changed.Verification
npm run quality: PASS. 1,577 passing tests, 58 existing opt-in/platform skips, zero failures; corrected-checker lint/policy/origin, format, compiler, build and live generated-doc/command-reference checks pass. No new suppression or weakened fixture, timeout or check.node ./scripts/verify-package.mjs: PASS, 53 package paths.ed4e110b431149a3d037c3b8d418f4fe7878d3ab(1.4.0), Native lifecycle Linux, macOS package and official Windows best-effort smoke all PASS. Exact SDK/bundled-CLI hashes retained. Latest fork producer source directly inspected; stable native header identity and append/rewrite promises remain.4eebef8; Pi Durable reports no new findings. No review threads remain.Unrealistic and not patched: stealth out-of-contract old-prefix mutations with forged unchanged metadata or rewriting behind a live native manager without native reseeding. Ordinary native invalidation/file failures remain covered.