fix: keep the shell-exit delta baseline across host rebuilds - #1212
Draft
gominimal-aw-bot[bot] wants to merge 1 commit into
Draft
fix: keep the shell-exit delta baseline across host rebuilds#1212gominimal-aw-bot[bot] wants to merge 1 commit into
gominimal-aw-bot[bot] wants to merge 1 commit into
Conversation
The shell-exit prompt's "changed since activation" baseline was armed in Host::build, which runs once per host launch rather than once per session. Exiting a session with "keep filesystem" tears the host down but leaves the session and its files in place; a later reattach builds a new host, which re-snapshotted the already-modified workspace as its baseline. A second exit then diffed against that dirty baseline, found nothing new, and dropped the save-changes option even though uncommitted changes remained. Move the baseline onto the Session actor, which outlives the host: it is armed once before the first host launches and reused across every teardown and rebuild, so a reattach keeps the activation-time reference point. Host construction now receives the baseline instead of arming its own.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
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.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABMgbl4Q
The shell-exit prompt's "changed since activation" baseline was armed in
Host::build, which runs once per host launch rather than once per session. Exiting a session with the "keep filesystem" option tears the host down but leaves the session and its files in place; a later reattach builds a fresh host that re-snapshots the already-modified workspace as its baseline. A second exit then diffs against that dirty baseline, sees no new changes, and drops the save-changes option even though uncommitted changes are still present.This moves the baseline onto the
Sessionactor, which outlives the host: it is armed once before the first host launches and reused across every teardown and rebuild, so a reattach keeps the activation-time reference point.Hostconstruction now receives the baseline instead of arming its own. A regression test drives a keep-exit followed by a reattach and asserts the pre-exit change is still reported.Verification
cargo fmt --all --check --manifest-path target/Cargo.toml— cleancargo clippy --workspace --locked --manifest-path target/Cargo.toml -- -D warnings— clean, no warningscargo build --workspace --locked --manifest-path target/Cargo.toml— okcargo test --workspace --locked --manifest-path target/Cargo.toml— all tests passed (exit 0), including the newsession::tests::workspace_baseline_survives_keep_exit_and_reattachNote
Keep the shell-exit workspace change-detection baseline across host rebuilds within a session
WorkspaceBaselineenum in session.rs withUnarmedandArmedvariants to track a session-scoped change-detection baseline.SessionDeltaRPC.Host::buildin session_host.rs; callers now pass an externally-armedOption<Arc<DeltaSource>>instead.workspace_baseline_survives_keep_exit_and_reattachthat verifies pre-exit changes remain visible after reattach.Macroscope summarized b1d4c82.