Skip to content

Remove the Posit Assistant cross-session install lock - #18920

Merged
gtritchie merged 2 commits into
mainfrom
feature/pai-delete-install-lock
Sep 24, 2026
Merged

gtritchie merged 2 commits into
mainfrom
feature/pai-delete-install-lock

Conversation

@gtritchie

Copy link
Copy Markdown
Member

Addresses #18658.

Step 4 of the plan in #18658. Since #18892, an install publishes a new version slot and never modifies a directory another session could be running from, so the lock added in #18276 no longer protects anything.

What changes

  • ChatInstallLock.{hpp,cpp} and ChatInstallLockTests.cpp are deleted (1,713 lines), along with the installLock() accessor, its owner-id helper, and kPositAiLocksDirName.
  • performInstall() no longer takes a MutationScope, so an install or update is no longer refused while another session is running Posit Assistant.
  • The chat backend start and the NES agent start no longer acquire or release an in-use lock, and their exit handlers drop the lock token.
  • The e2e seed no longer skips a locks/ directory, and the harness test's lock assertions are gone.
  • The existing Install Posit Assistant side-by-side in versioned directories #18658 NEWS entry gains a clause: an update no longer requires closing other sessions that are running Posit Assistant.

Two #18276 fixes that are not about locking stay in SessionAssistant.cpp: onError does not clear agent tracking state on a stream error, and the helper launch environment is set with setenv rather than appended. #18276 made no changes under core/, so nothing else becomes unused.

Without the lock, concurrent selectSlot() writes from sessions on different protocols can drop one another's selected.json entry. #18658 accepts this ("Lost-selection downgrade is accepted, not made durable"), and ChatSelector.hpp documents it.

Testing

GTEST_FILTER='Chat*:SessionAssistant*:PositAssistant*' ./build/src/cpp/rstudio-tests --scope rsession

277 tests pass. npx playwright test tests/harness/pai-seed.test.ts passes.

Installs now publish a new version slot and never modify a directory
another session could be running from, so the lock from #18276 no longer
protects anything. Delete ChatInstallLock and its tests, the installLock()
accessor, the MutationScope around performInstall(), and the in-use
acquire/release around the chat backend and agent starts. The e2e seed no
longer skips a locks/ directory.

The two non-locking #18276 fixes in SessionAssistant.cpp stay: onError
does not clear agent tracking state, and the helper environment is set
with setenv rather than appended.

Addresses #18658.
@gtritchie gtritchie added this to the 2026.10 (Blue Mistflower) milestone Sep 24, 2026
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:22 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:22 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:23 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:23 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:26 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 16:26 — with GitHub Actions Active
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

#################### 100% pass rate

Passed Failed Skipped Flaky
3182 0 199 8
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 2 0 10 0
✅ desktop-linux 800 0 39 3
✅ desktop-macos 798 0 43 2
✅ desktop-windows 803 0 43 2
✅ server-linux 751 0 44 1
✅ setup 28 0 20 0
View / download the full report

View report online -- opens in the browser, no download needed. Available for 14 days.

Download playwright-report.zip -- extract and open index.html

Includes screenshots, traces, and step-by-step details for every test. Expires in 15 days.


All platforms - commit 5ea15f6f82e92ed21dfd0703632b3ac984ccbb8d - Run #1182

@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie deployed to e2e-playwright September 24, 2026 18:03 — with GitHub Actions Active
@gtritchie
gtritchie merged commit e68bcdb into main Sep 24, 2026
1 of 7 checks passed
@gtritchie
gtritchie deleted the feature/pai-delete-install-lock branch September 24, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant