Skip to content

Add posit-assistant-path option for admin-managed installs - #18688

Merged
gtritchie merged 2 commits into
mainfrom
feature/posit-assistant-path
Aug 29, 2026
Merged

gtritchie merged 2 commits into
mainfrom
feature/posit-assistant-path

Conversation

@gtritchie

@gtritchie gtritchie commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Adds a posit-assistant-path session option naming the directory that holds an administrator-managed Posit Assistant installation, so a system-wide deployment no longer has to live under the XDG system configuration directory.

When the option is set it replaces the XDG config location in the search order rather than adding to it, so the search is:

  1. RSTUDIO_POSIT_AI_PATH, for development and testing (NOTE: since removed as redundant)
  2. The per-user installation under the XDG data directory
  3. posit-assistant-path when set, otherwise <XDG system config dir>/pai/bin

A path that is set but does not hold a valid installation logs a warning and leaves Posit Assistant reported as not installed. It does not fall back to /etc/rstudio/pai/bin, which would hide the misconfiguration.

The backend-start error message and the uninstall refusal both report the effective system path, so an administrator sees the location RStudio actually checked. The lock-skip check in startChatBackend still compares against the XDG location, which means an installation reached through the option over-locks the same way an RSTUDIO_POSIT_AI_PATH one already does -- deliberate, per the reasoning in the comment there.

Verification

Manual: set posit-assistant-path in rsession.conf and confirm the backend starts from that location.

./build/src/cpp/rstudio-tests --scope rsession passes (519 tests), including the ChatInstallation suite, which now reads session options.

Addresses #18687.

Administrators deploying Posit Assistant system-wide were limited to
pai/bin under the XDG system configuration directory. The new
posit-assistant-path session option names the directory holding the
installation instead.

The option replaces the XDG config location in the search order rather
than adding to it, so a set-but-invalid path logs a warning and reports
Posit Assistant as not installed instead of silently reverting to
/etc/rstudio and hiding the misconfiguration.

The backend-start error message and the uninstall refusal now report the
same effective path. The lock-skip check at startChatBackend keeps
comparing against the XDG location, so an installation reached through
the option over-locks the way an RSTUDIO_POSIT_AI_PATH one already does.

No unit test covers the option itself: the generated Options class
exposes only CLI parsing, with no setter a test could drive.

Addresses #18687
Warn once per session instead of on every locate() call, which runs on
each status, verify, and chat request; a misconfigured path would
otherwise repeat a warning-level line throughout the session.

Gate the uninstall refusal on verifyPositAiInstallation() rather than
exists(). A system path that exists but holds no installation — a typo,
or a mounted-but-empty share — reported "installed at the system level by
an administrator" and returned before clearing cached update state.

Say in the option description that the path is absolute and names the
directory containing the installation's dist directory. The user and
default system locations have pai/bin appended, this one does not, and
the description is what rsession --help shows.

Addresses #18687
@github-actions

Copy link
Copy Markdown

RStudio E2E - all platforms

All tests passed!

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

Passed Failed Skipped Flaky
2521 0 193 5
Platform ✅ Passed ❌ Failed ⚠️ Skipped 🔁 Flaky
✅ auth-teardown 2 0 10 0
✅ desktop-linux 634 0 38 1
✅ desktop-macos 630 0 42 2
✅ desktop-windows 638 0 39 2
✅ server-linux 589 0 44 0
✅ 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 71f714a9dae39dd2c27c809a44c0253bf7ddcc6c - Run #756

@gtritchie
gtritchie merged commit cc28b17 into main Aug 29, 2026
29 checks passed
@gtritchie
gtritchie deleted the feature/posit-assistant-path branch August 29, 2026 23:08

This branch was previously deployed

1 inactive deployment
e2e-playwright — 71f714a9 Deployed Aug 29, 2026 by gtritchie via windows / e2e-desktop-windows (2) #756
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