Repository navigation
perf(snapshot): restore large legacy caches within live memory bounds - #1716
Merged
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
10 tasks done
5 of 16 tasks
3 tasks done
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.
An 83,049,642-byte snapshot from a real Ghidra analysis still fails
open_binary(snapshot_path)on main with the existing 768 MiB Node old-space limit. Legacy files duplicate complete execution payloads in cache entries and authenticated Evidence. The reader currently assembles those copies together before validation can start.Read large legacy snapshots in two scans on one admitted descriptor. Parse cache rows independently, retain private metadata/content-digest handles, then authenticate the complete Evidence bundle and restore cache payloads from exact matching records. Check that both scans saw identical bytes. Keep the existing JSON format, all content and caller metadata, strict JSON/UTF-8 semantics, live resource admission, and canonical query/profile/target checks. Small files retain the bounded native parser path.
The cache now owns immutable authenticated snapshots and reuses their payloads. Exported snapshots remain detached and mutable. CLI and MCP snapshot reads receive cancellation; queued cancellation is checked before publishing the restored session.
Validation:
Fixes #1680. Refs #1065.