Conversation
Resuming a large session held the transcript three times: the loaded SavedSession, a cloned journal, and a cloned restore projection of its messages. apply_loaded_session_with_goal and apply_loaded_session_config_snapshot now take the SavedSession by value; App::restore_api_messages_from_owned moves the journal and the history out of it and runs the owned restore projection, so a resume holds one copy (memory note M3). Callers keep only the ids and counts they report afterwards. The borrowing project_messages_for_restore lost its last production caller, so its test callers move to project_owned_messages_for_restore and it is removed rather than suppressed. Mined from the unreviewed 0.10.1 WIP branch (app/apply/event_loop/ handlers and test call sites); the dead-helper migration is new. No read of the moved fields remains after the move point. The memory saving is structural; no RSS measurement was taken. Evidence: 1296 passed, 0 failed (11,961 skipped) across runtime_handoff, client::chat, session_peek, session_manager, runtime_store_binding, resume, restore, apply_loaded and tui::ui::tests. TUI all-target/all- feature Clippy with CI flags and fmt passed; dead-code budget 279. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Pins memory note M3: after App::restore_api_messages_from_owned the journal's entry buffer is the same allocation the loaded session held, and the restored state matches the borrowing path exactly (current and legacy journal-less sessions). Mined from the 0.10.1 WIP branch; the comparison now uses the owned projection, since the borrowing one was removed. Evidence: owned_restore_moves_the_journal_and_matches_the_borrowing_restore 1 passed, 0 failed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
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.
No-Issue: resume memory for large sessions from the 0.10.1 memory notes; no public issue.
Resuming a large session held the transcript three times: the loaded
SavedSession, a cloned journal, and a cloned restore projection of its
messages. apply_loaded_session_with_goal and
apply_loaded_session_config_snapshot now take the SavedSession by
value; App::restore_api_messages_from_owned moves the journal and the
history out of it and runs the owned restore projection, so a resume
holds one copy (memory note M3). Callers keep only the ids and counts
they report afterwards.
The borrowing project_messages_for_restore lost its last production
caller, so its test callers move to project_owned_messages_for_restore
and it is removed rather than suppressed.
Mined from the unreviewed 0.10.1 WIP branch (app/apply/event_loop/
handlers and test call sites); the dead-helper migration is new. No
read of the moved fields remains after the move point. The memory
saving is structural; no RSS measurement was taken.
Evidence: 1296 passed, 0 failed (11,961 skipped) across runtime_handoff,
client::chat, session_peek, session_manager, runtime_store_binding,
resume, restore, apply_loaded and tui::ui::tests. TUI all-target/all-
feature Clippy with CI flags and fmt passed; dead-code budget 279.
🤖 Generated with Claude Code