From f620de84077b9c65e840105f4124aa643450e8f5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 20 Aug 2026 20:09:07 +0000 Subject: [PATCH] fix(distcheck): drop the python flow's vestigial CLI-binary prerequisite #738 moved the wheel's CLI in-process and deleted `dirsql/_binary/`, so the python distcheck flow stopped staging a cargo-built binary. `gate.py` never referenced one again, but three callers were never updated: `python_flow_test.py` located `target/{release,debug}/dirsql` and skipped when it was absent, then never used the path -- `run()` takes `(_PKG, _REPO)`. So the only real-subprocess coverage of the flow silently skipped on a machine with no cargo build lying around, which is every clean checkout. Observed directly rather than assumed: with no binary present the case skipped before this change and passes after it (39.84s, `1 passed`). `dirsql-python-ci.yml`'s distcheck job then built that binary on every Python PR for nothing. `Install Rust` / `Rust cache` stay -- `maturin build` compiles the PyO3 extension. Verified by running the job's remaining command with no binary in `target/`: `dirsql-distcheck python` -> `OK`, exit 0. The README still described the flow as staging the binary; its two other stale lines the issue cites (#942's workflow renames) were already corrected on main by 6c02901. The node flow is untouched: it genuinely needs the staged host CLI. Fixes #972 Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01FPnyJVtn9Ld2iNbP9xnGus --- .github/workflows/dirsql-python-ci.yml | 3 --- internals/distcheck/README.md | 12 ++++++------ .../tests/integration/python_flow_test.py | 16 +++------------- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/dirsql-python-ci.yml b/.github/workflows/dirsql-python-ci.yml index cbffde713..7487aa7c4 100644 --- a/.github/workflows/dirsql-python-ci.yml +++ b/.github/workflows/dirsql-python-ci.yml @@ -260,8 +260,5 @@ jobs: - name: Put maturin on PATH run: echo "$PWD/packages/python/.venv/bin" >> "$GITHUB_PATH" - - name: Build dirsql CLI binary - run: cargo build -p dirsql --features cli - - name: Run packaging distcheck (build -> pack -> install -> run) run: uv run --project internals/distcheck dirsql-distcheck python diff --git a/internals/distcheck/README.md b/internals/distcheck/README.md index b1205aa87..45cbb2aea 100644 --- a/internals/distcheck/README.md +++ b/internals/distcheck/README.md @@ -12,8 +12,8 @@ not a behavior test of an SDK, so it lives here rather than in an SDK package's subcommand. Run a flow locally: ```bash -# build -> pack -> install -> run the published PyPI wheel (needs a cargo dirsql -# binary + maturin on PATH) +# build -> pack -> install -> run the published PyPI wheel (needs maturin on +# PATH) uv run --project internals/distcheck dirsql-distcheck python # build -> pack -> install -> run the published npm artifact set (needs @@ -26,10 +26,10 @@ tooling, so one tested home matters more than language purity of the harness. ## What the flows verify -- **`python`** -- stages the cargo-built `dirsql` binary under `dirsql/_binary/` - the way the release pipeline's bundle step would, builds the wheel with - `maturin build`, `pip install`s it into a fresh venv, and runs the installed - `dirsql --version` console script plus `import dirsql`. +- **`python`** -- builds the wheel with `maturin build`, `pip install`s it into a + fresh venv, and runs the installed `dirsql --version` console script plus + `import dirsql`. Nothing is staged: since #738 the wheel's extension module + carries the CLI and the console script calls it in-process. - **`node`** -- packs the main `dirsql` package and a reconstructed host `@dirsql/cli-` sub-package, `npm install`s both into a fresh dir, and runs `node_modules/.bin/dirsql --version`, cross-checking the installed diff --git a/internals/distcheck/tests/integration/python_flow_test.py b/internals/distcheck/tests/integration/python_flow_test.py index 3ce91752f..de031ecaf 100644 --- a/internals/distcheck/tests/integration/python_flow_test.py +++ b/internals/distcheck/tests/integration/python_flow_test.py @@ -2,9 +2,9 @@ Runs `gate.run` with its default `subprocess.run` / real `FileSystem` -- the build -> pack -> install -> run behavior the old per-package packaging -suite exercised. Skips when the build prerequisites (the cargo `dirsql` binary, -`maturin`) are absent, since the flow's actual CI execution is the -`dirsql-distcheck python` job, which builds them first. +suite exercised. Skips when the build prerequisite (`maturin`) is absent, +since the flow's actual CI execution is the `dirsql-distcheck python` job, +which installs it first. """ from __future__ import annotations @@ -20,16 +20,6 @@ def test_pip_installed_wheel_builds_installs_and_runs(): - binary = next( - ( - os.path.join(_REPO, "target", profile, "dirsql") - for profile in ("release", "debug") - if os.path.exists(os.path.join(_REPO, "target", profile, "dirsql")) - ), - None, - ) - if binary is None: - pytest.skip("dirsql CLI binary not built (cargo build -p dirsql --features cli)") if shutil.which("maturin") is None: pytest.skip("maturin not on PATH (uv sync in packages/python)")