Repository navigation
fix(cli): avoid duplicating sealed Roost message bodies - #1737
Merged
Merged
Conversation
Contributor
|
Desktop PR smoke regression failed on commit
Recordings not attached
The Actions artifact retains the complete trace, screenshots, logs, and runtime evidence. |
Contributor
|
Desktop PR smoke regression failed on commit
Recordings not attached
The Actions artifact retains the complete trace, screenshots, logs, and runtime evidence. |
Lampese
marked this pull request as ready for review
October 19, 2026 21:02
Model: gpt-6.1-sol
Model: gpt-6.1-sol
Model: gpt-6
Model: gpt-6.1-sol
Model: gpt-6.1-sol
Lampese
force-pushed
the
codex/compact-roost-state
branch
from
October 20, 2026 10:39
31e88a0 to
60c0e4e
Compare
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.
Related issue
Storage companion to Roost #16. Depends on #1735, which adopts the coordinated published Roost 0.2.0 packages and v4 storage diagnostics. Merge #1735 first.
Problem / pressure
Correcting a sealed assistant message copied its entire content into a mutable state Turn. SDK fallback batches also retained full commands and unused baselines in receipt updates. A small correction could therefore replicate a large unchanged tool result repeatedly.
Summary
Store versioned field/text/array operations relative to the exact immutable primary Turn. Reconstruct complete entries for existing readers, reuse the decoded primary, and convert existing whole-message state on its next normal mutation. Preserve sealed records and retained updates.
Use the SDK's owner-local recovery option for CLI fallback batches, permission responses and staged generation commands. SDK preparation and final publication remain atomic; Lody adds no write retry or recovery loop. Moving unfinished work requires the complete owner database and matching host identity.
This branch is rebased on #1735 and uses published SDK and Native 0.2.0, with no local package override. The previous SDK 0.1.3 API release gate is resolved. Native 0.2.0 requires SQLite container v4; no migration, reset or existing-history cleanup is added.
Visual explanation
State is bound to one primary ID. Invalid bases, offsets and paths fail the existing history read. Legacy whole-message state remains readable inside a supported SQLite container. Reopening delta state requires the updated adapter; RPC readers still receive complete entries.
Before / after
That comparison excludes the initial primary, outbox copy, indexes, WAL and stream transport framing. It is not a claim of the same percentage reduction in total database size or network traffic. The current regression enforces bounded growth rather than exact wire sizes.
Test plan
pnpm checkpasses: package typechecks, ordinary typed lint, Effect lint, all repository tests, i18n and boundary checks. Full CLI suite: 4,435 passed, four existing skips.Context handoff
Same-repository maintainer branch. The bilingual implementation note records the state format, owner-local recovery boundary, earlier measurements and current published-package acceptance. Merge #1735, then #1737. This update does not publish packages, deploy, merge PRs or modify an application database.