Pin 202609 pipeline toolchain (duckdb/pandas/pyarrow/rdflib) + isolated venv - #358
Pin 202609 pipeline toolchain (duckdb/pandas/pyarrow/rdflib) + isolated venv#358rdhyee wants to merge 3 commits into
Conversation
…olated venv The 202609 rebuild's reproducibility was verified twice (8/28, 8/28→8/31) but only by luck: only duckdb was pinned in scripts/requirements.txt, and nothing actually installed FROM that file into an isolated environment — scripts ran against whatever was in the shared pyenv `myenv`, used by many other projects. Between 8/28 and 8/31, an unrelated `myenv` upgrade moved duckdb 1.4.4 -> 1.5.5, which changed step 2's output bytes and hard-crashed step 4 (provenance/isamples_202609/step9_clean_rerun_2026-08-31.md in the isamples-suite provenance repo). pandas/pyarrow/rdflib were only ever floor-pinned (>=), so even duckdb's pin wasn't protecting the full chain. This exact-pins scripts/requirements.txt to the versions the 8/28 reference build actually used (recorded in that build's own manifest.json files), and adds scripts/setup_pipeline_venv.sh to install them into a project-local `scripts/.venv` via `uv` rather than into any shared interpreter — mirroring the hermetic pattern the pqg repo's step 1 already uses via its own uv.lock, applied here as a pinned requirements.txt since these are one-shot scripts rather than an installable package. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdwkgvUJhJ3G9cJNj9oUuZ
…hten claims Codex review (High): the Makefile's `PY ?= python` default meant `make all`/`make test` still ran against the ambient interpreter even after `scripts/setup_pipeline_venv.sh` created the pinned venv — the exact mistake this PR set out to close, just reachable through a different door. `PY` now defaults to `scripts/.venv/bin/python` (overridable, e.g. `PY=python` for CI, which already installs scripts/requirements.txt into its own ephemeral runner); a Makefile warning fires if that venv is missing. Verified `make test` (62/62) against the pinned venv both before and after this change. build_vocab_labels.py's docstring usage block updated to match. Codex review (Medium): scripts/requirements.txt and setup_pipeline_venv.sh overstated hermeticity — pandas/pyarrow/rdflib's transitive deps, the Python interpreter version, and `uv` itself are still resolver-chosen, so this is narrower than pqg's step-1 uv.lock. Reworded both to claim only what's actually pinned (the 4 output-critical direct deps), and to say so explicitly rather than "all versions ... exact pins." Codex review (Low): fixed "major-version bump" -> correct term for 1.4->1.5; "the pin drifted" -> "the ambient install drifted, the pin was never applied" (the file's pin didn't move); setup_pipeline_venv.sh now prints package versions before "ready" instead of after (so an import-time failure can't look like a successful run); DATA_PROVENANCE.md's toolchain-pin bullet now explicitly distinguishes itself from the pre-existing "still unresolved" data-lineage reproducibility gap immediately below it, instead of reading as a contradiction. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdwkgvUJhJ3G9cJNj9oUuZ
|
🤖 rbotyee (Claude, operated by @rdhyee) — Raymond's intent: have Codex review this PR before merge, per the repo's standard multi-AI review loop. What I did: ran a Codex review; findings and my response below. Codex review (first pass)High — Medium — the PR's language overstated hermeticity: pandas/pyarrow/rdflib's transitive dependencies, the Python interpreter version, and Low — a few wording issues: "major-version bump" for a 1.4→1.5 release-line change; "the pin drifted" when the file's pin didn't move (the ambient install drifted because nothing had ever installed from the pin); Response (pushed in
|
…g#358 - Makefile: only warn about a missing PY when PY looks like a path (contains "/") -- `wildcard` doesn't search $PATH, so PY=python was producing a false "not found" warning even though the shell resolves it fine. - DATA_PROVENANCE.md: `make` doesn't install anything -- it just uses the venv scripts/setup_pipeline_venv.sh already installed into. Reworded so only the setup script is credited with the install step. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NdwkgvUJhJ3G9cJNj9oUuZ
|
🤖 rbotyee (Claude, operated by @rdhyee) — Raymond's intent: same as above — Codex sign-off before merge. What I did: fixed the 2 remaining low-severity nits from Codex's second pass ( Codex second pass — verdict
Two low-severity nits it caught, both fixed in
Codex's own verification: Claude + Codex: LGTM. Not merged — Raymond's call. |
Summary
pandas/pyarrow/rdflibinscripts/requirements.txtalongside the existingduckdb==1.4.4pin, and addedscripts/setup_pipeline_venv.shso those pins install into an isolatedscripts/.venv(viauv) instead of a shared interpreter.duckdbwas pinned, and nothing ever installed fromscripts/requirements.txtinto an isolated env — scripts ran against whatever was in the shared pyenvmyenv(used by many other projects). Between 2026-08-28 and 2026-08-31, an unrelatedmyenvupgrade movedduckdb1.4.4 → 1.5.5, which changed one step's output bytes and hard-crashed another. Full writeup:provenance/isamples_202609/step9_clean_rerun_2026-08-31.md(isamples-suite provenance repo, not in this PR).pqgrepo's step 1 already uses (its ownuv.lock) — applied here as a pinnedrequirements.txt+uv-managed venv since these are one-shot scripts, not an installable package.Test plan
bash scripts/setup_pipeline_venv.shcreatesscripts/.venvand reportsduckdb 1.4.4 pandas 2.3.3 pyarrow 21.0.0 rdflib 6.3.2— matches the 2026-08-28 reference build's own manifest.json environment fields exactly.🤖 Generated with Claude Code
https://claude.ai/code/session_01NdwkgvUJhJ3G9cJNj9oUuZ