Skip to content

fix(cli): resolve output directories before invoking backends - #316

Merged
gaborbernat merged 2 commits into
tox-dev:mainfrom
harbinresearcher:codex/resolve-cli-output-directory
Oct 14, 2026
Merged

gaborbernat merged 2 commits into
tox-dev:mainfrom
harbinresearcher:codex/resolve-cli-output-directory

Conversation

@harbinresearcher

@harbinresearcher harbinresearcher commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Resolve the CLI's selected output directory against the caller's working directory before passing it to the frontend. Previously, python -m pyproject_api project --wheel created project/dist in the caller's directory, then sent project/dist to a backend already running inside project, causing the demo backend to raise FileNotFoundError.

The runtime change is one expression. Add nine end-to-end cases using the repository's existing demo backend for default, relative and absolute output paths across sdist/wheel/editable builds. They check real generated artifacts; no subprocess behavior is mocked. The pristine source fails six cases, while the three absolute-path controls pass. Adjust two existing argument-test expectations and document the CLI path interpretation.

This keeps symlink interpretation intact (absolute(), not resolve()) and leaves generic frontend path/configuration arguments unchanged.

Validation

  • Linux Python3.11.17,3.12.15,3.13.16,3.14.8, stable3.15.0 and free-threaded3.15.0: official tox baseline74 passed → patched83 passed in every environment, all reaching the configured100% coverage gate.
  • Official tox fix, type, docs and pkg_meta passed; fixed pre-commit hooks did not modify the three candidate files. Linux tested copies match the canonical worktree byte for byte.
  • Windows Python3.12.14: CLI tests16 passed; full-suite baseline73 passed/1 failed and patch82 passed/1 failed. The same unchanged test_ensure_empty_dir_on_path_symlink_to_folder fails with WinError1314 because this account cannot create directory symlinks.
  • The original CLI repro now creates the real demo wheel at the expected path.
  • Read-only AI review found no actionable issue; no independent human review is claimed.

Hosted CI and macOS are unverified. AI assistance was used for investigation, tests, implementation and review; no production incident is claimed.

Closes #315

Remote verification: ReadTheDocs and pre-commit.ci succeeded. Actions run38507824873 is action_required, awaiting maintainer approval to run; hosted tests are not yet verified.

harbinresearcher and others added 2 commits October 14, 2026 11:44
Pair each distribution with its artifact name and each outdir mode
with its expected location, removing branching from the test body.
Drop the absolute --outdir cases: that path never changed. Drop the
docs note restating ordinary relative-path behavior.

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaborbernat
gaborbernat enabled auto-merge (squash) October 14, 2026 04:23
@gaborbernat
gaborbernat merged commit 40c1564 into tox-dev:main Oct 14, 2026
26 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.

Relative CLI output directories break builds from a project subdirectory

2 participants