Skip to content

Read admin Posit Assistant installs only from posit-assistant-path - #18985

Merged
gtritchie merged 4 commits into
mainfrom
feature/posit-assistant-path-admin-install
Sep 29, 2026
Merged

gtritchie merged 4 commits into
mainfrom
feature/posit-assistant-path-admin-install

Conversation

@gtritchie

@gtritchie gtritchie commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Fixes #18973.

An administrator-provided Posit Assistant now exists only when posit-assistant-path names one. The session no longer reads <systemConfigDir>/pai.

Resolution

  • posit-assistant-path unset: the user's slot and the bundled copy compete under the Posit Assistant discovery should pick the highest version, and prefer bundled/admin installs when user installs are disabled #18774 rules. Ties go to the user.

  • Set to P: P contributes up to two candidates.

    • The slot P/selected.json names. If that selection is missing or stale, the newest verifying slot for this protocol is used, and P/selected.json is never written.
    • P itself as a single unversioned installation, the 2026.09 layout. P/bin is not read.

    The two compete under the Posit Assistant discovery should pick the highest version, and prefer bundled/admin installs when user installs are disabled #18774 rules, and ties go to the slot. The winner always runs, ahead of the user's slot and the bundled copy whatever their versions. It also runs when it declares another protocol; the session reports that as a protocol mismatch.

  • P holds no valid installation: the bundled copy is not used. The user's slot is used when user installation is enabled. A warning naming P is logged once per session.

  • userInstallWouldBeSelected():

    • false whenever P has a valid installation;
    • true when P is invalid and user installation is enabled;
    • otherwise ranked against the bundled copy.
  • "Installation not found" messages: they name P when it is set. Otherwise they say installation is managed and nothing has been configured, or tell the user to install from the Posit Assistant pane.

Code changes

  • InstallSearchPaths::systemStorageDir and pinnedPath are replaced by one adminDir field.
  • kLegacyInstallDirName is removed.
  • The posit-assistant-path option description is rewritten, and SessionOptions.gen.hpp is regenerated.
  • The doc comments on InstallSearchPaths, locatePositAssistantInstallation(), userInstallWouldBeSelected() and isPositAssistantInstallationEnabledByAdmin() are rewritten.

Tests

The ChatInstallationTests.cpp resolution tests are rewritten against P. Tests of a default-location copy competing by version are deleted. NeverReadsTheSystemConfigDirectory redirects RSTUDIO_CONFIG_DIR and RSTUDIO_DATA_HOME to a temp directory and stages a slot and a bin/ in the old default location. It then checks that the session's own sources find neither. ChatStaticFilesTests.cpp serves through P as an unversioned directory.

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

All 268 tests pass.

NEWS

The session no longer searches <systemConfigDir>/pai. An
administrator-provided installation exists only when posit-assistant-path
names one, and that directory may now hold version slots under versions/
(selected by its own selected.json, never rewritten) as well as a single
unversioned installation. When it contributes a candidate, the best one
always runs, ahead of the user's slot and the bundled copy regardless of
version or protocol. When it holds nothing, the bundled copy is skipped and
only the user's slot remains.

InstallSearchPaths' systemStorageDir and pinnedPath are replaced by
adminDir, kLegacyInstallDirName is removed, and the "installation not
found" messages no longer name <systemConfigDir>/pai/bin.

Addresses #18973
@gtritchie gtritchie added this to the 2026.10 (Blue Mistflower) milestone Sep 28, 2026
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

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

Passed Failed Skipped Flaky
3332 0 191 3
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 2 0 10 0
✅ desktop-linux 837 0 39 0
✅ desktop-macos 842 0 34 1
✅ desktop-windows 838 0 44 0
✅ server-linux 785 0 44 2
✅ 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 d604ebe5690ca1cb193a20522d17f5b5a0b97767 - Run #1270

@gtritchie
gtritchie merged commit e201a48 into main Sep 29, 2026
34 checks passed
@gtritchie
gtritchie deleted the feature/posit-assistant-path-admin-install branch September 29, 2026 03:25
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.

Read administrator Posit Assistant installs only from posit-assistant-path, and let it win

1 participant