Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
7 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.
Primary change type
Problem and motivation
An Assistant history selection can become stale before an action request. The server previously checked its current workspace, then the browser rejected a returned workspace that differed from the selected record. Inspection, Resume or Continue could already have started before that rejection.
Summary and scope
Send the selected launch/canonical workspace pair with all three actions and validate it against current history and the live Studio row before invoking native work. A distinct
workspace_changedresponse tells the user to reopen Past sessions and select the refreshed entry. It preserves uncertain operations and does not offer a new Continue operation from stale metadata.After explicit re-selection, Resume can refresh only its transport workspace proof when the Studio ID, canonical workspace and verified retry scope match. Its cached UUID and original revision remain fixed. Continue receives only its original UUID/revision triple; workspace metadata never enters its receipt fingerprint or persisted browser tuple.
Related work
Related issue: https://linear.app/sapiom/issue/SAP-3292
Depends on #1043. Native stack target: main.
Addresses #1043 (comment).
Validation
50 focused tests passed (28 route, 19 client, 3 shared-error tests). An HTTP probe using the prior route/client invoked each native callback once before browser rejection; the corrected code returns
workspace_changedwith zero callbacks for Inspect, Resume and Continue. This reproduces stale selected metadata at the transport boundary; ordinary Studio UI has no hot-cwd setter.History/Continue browser coverage passed all 76 cases across the full run and targeted rerun: the initial run passed 75, and one old exact request-body assertion needed the new workspace field. The corrected case and both new workspace conflict/reselection cases passed on rerun. The new cases verify retained Continue storage with no replacement control and same-UUID/original-revision Resume after a lost acknowledgement and explicit re-selection.
Non-mock workspace build, final Harness server rebuild and root typecheck passed. Scoped core and explicit browser lint passed without errors or warnings. Independent review found no additional actionable issue.
Final integrated checks passed:
pnpm --filter @sapiom/harness testran 4,862 unit tests (two skips) and 10 performance tests. Rootpnpm typecheckandpnpm lintpassed; the latter reports two existing test warnings. The unrelated unchanged agent-core unreadable-directory fixture prevents claiming an all-repository test pass in this VM.Final source-built browser → Studio server → corrected native → real PTY verification passed through a real filesystem symlink in 16.41 seconds. All 20 captured source hashes match
1b758499, and the actual Inspect/Resume/Continue POSTs carry the verified workspace pair. Continue creates one paused child and one seed; only explicit Send calls the loopback model. Resume retains the same Studio/native IDs. Explicit Terminal Start returns HTTP200 with one PTY and zero extra Assistant reads. End stops both selected engines while the sibling survives, and all five processes are absent after cleanup.The final source was repackaged into the unsigned Linux desktop bundle; its smoke test passed 17 checks with one Windows-only agent-shim skip. This uses the default activation path separately from the corrected-candidate browser flow with loopback account/model fixtures. Production owner publication/activation, Windows accepted-source-store durability and signed installed E3 remain external gates. Exact-head Devin review reported no issues.
Browser evidence
Continue preserves its saved request without a fresh-operation control. These are inspected disposable browser-fixture action states at
1b758499, with served bytes verified against the local SHA-256 manifest.Tests and documentation
Added route/client/browser regressions and documented the workspace precondition and retry boundary in assistant-history.md. Increment: 441 changed lines including tests, docs and changeset.
pnpm pr:sizeis absent in the SDK; measured the incremental Git diff.Compatibility and release impact
Security
AI assistance
Checklist