Skip to content

fix: keep root directory accessors consistent during isolation - #625

Merged
gaborbernat merged 4 commits into
tox-dev:mainfrom
AryanRG:fix/isolated-dirs-root-redirection
Oct 17, 2026
Merged

gaborbernat merged 4 commits into
tox-dev:mainfrom
AryanRG:fix/isolated-dirs-root-redirection

Conversation

@AryanRG

@AryanRG AryanRG commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

When Unix root enables use_site_for_root, isolated_dirs(root) redirects user_config_dir to <root>/user_config/app but leaves user_config_path and config iteration using the site directory. A config file written under the isolated user directory can therefore be missed by find_config_file().

Temporarily use the base _use_site descriptor during isolation so user and site kinds keep the documented separate layout. The existing restoration mechanism restores normal root redirection, including nested contexts and exceptions. Add regressions for four string/Path pairs with both multipath settings, iteration and restoration, and document the behavior.

Related implementation history: #590 and #604. This addresses the remaining root-redirection interaction.

Local validation of this patch on macOS:

  • The nine new regressions fail against pristine main and pass with the fix; the focused helper/plugin suite passed again before publication (52 passed).
  • Fresh full suites on CPython 3.11–3.15 each passed with 2,242 passed and 125 skipped on the final commit.
  • Fresh checks on a disposable clone of the final commit passed: all 14 pre-commit hooks, types, prose, Sphinx with -W, sdist/wheel build, Twine, wheel contents, and towncrier check --compare-with origin/main. The numbered newsfragment also rendered successfully. These checks left tracked file contents unchanged.
  • Earlier local coverage on the same source/test contents was 98.53%, with diff-cover reporting 100% for its 25 counted changed lines.
  • Root was simulated with a patched Unix UID. Native Linux/root, Windows, Android/iOS, PyPy and free-threaded CPython were not run locally.

Prepared with AI assistance.

Draft pending maintainer approval of the hosted workflows. At the final-head check, both the check and Release workflows reported action_required with no jobs run. The local results above are separate from hosted CI.

@gaborbernat
gaborbernat marked this pull request as ready for review October 17, 2026 18:02
@gaborbernat
gaborbernat enabled auto-merge (squash) October 17, 2026 18:02
@gaborbernat
gaborbernat merged commit fb0b1a9 into tox-dev:main Oct 17, 2026
33 checks passed
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.

2 participants