Repository navigation
PY-PORT-2: port publishable_crates / package_include_diff / coverage_report_scope to Rust (C301) #4741
Description
Operator rule C301: no Python in the build. Ruled by aprender-a7 (PY-PORT decision): ports go into one new unpublished crate, crates/aprender-ci-tools (publish = false, one bin with subcommands). Each Python original stays only as the external validator in an identical-output case table.
Scope: the top three from the Python inventory that PY-PORT-1 (cascade-publish helpers) does not cover:
- scripts/lib/publishable_crates.py
- scripts/lib/package_include_diff.py
- scripts/coverage_report_scope.py
Acceptance:
- crates/aprender-ci-tools builds with publish = false. It has a clap-derive bin with subcommands publishable-crates, package-include-diff and coverage-report-scope.
- scripts/tests/ci_tools_py_parity_test.sh shows stdout byte-identical to the .py original, and the same success or failure, on every case, including live
cargo metadata. The test must not be vacuous: a planted mismatch must be detected, and a short run must fail. - The binary-debt ledger has a KEEP row, and the README and readme_contract checks are green.
- FALSIFY-MONO-011: aprender-ci-tools is added to the [[bin]] allowlist with baseline 27 -> 28, in its own commit. This is sign-off row 38: it loosens a shrink-only list and waits for operator sign-off.
- No caller is switched in this ticket, so CI behaviour is unchanged.
Branch py-port-2/ci-tools. Branch-only, no PR, until sign-off.
owner: aprender-flow (re-owned 2026-10-19 by aprender-triage-worker at the cop's word: previous owner session absent; picks up children only as batch constituents after its current timed task)
Folded sub-tickets (TRIAGE-100, 2026-10-14)
These open sub-tickets were folded here as checklist rows and closed as not planned so the open count stays at or under 100. Reopen one when its work resumes; an open PR for it reopens it.
- ARB-AUD-10b: python3 out of the release path — 12 scripts / 43 sites + release_wall_time.py, jq with a parity table per script #4352 — ARB-AUD-10b: python3 out of the release path — 12 scripts / 43 sites + release_wall_time.py, jq with a parity table per script — done when: git grep -n python3 -- scripts/release scripts/check_release_assets.sh scripts/check_publish_preflight.sh returns only comments, every script's parity table pas (branch:
wip/4352-release-no-python) - pr-review gate has no self-service path for fork/external contributors without pmat/agy/minisign #4462 — pr-review gate has no self-service path for fork/external contributors without pmat/agy/minisign
- One writer for derived contract files: README contract count, contracts/contracts.nt and the ONT-5 witness (the T21 roadmap.yaml rule) #4781 — One writer for derived contract files: README contract count, contracts/contracts.nt and the ONT-5 witness (the T21 roadmap.yaml rule)
- PY-PORT-2c: switch coverage_report_scope callers to aprender-ci-tools, delete the .py (C301) #4787 — PY-PORT-2c: switch coverage_report_scope callers to aprender-ci-tools, delete the .py (C301) (branch:
chore/4787-coverage-scope-bin) - PY-PORT-2b: port tarball_shrink_report.py to aprender-ci-tools #4788 — PY-PORT-2b: port tarball_shrink_report.py to aprender-ci-tools
- PY-PORT: port tarball_workspace.py to aprender-ci-tools tarball-workspace (C301) #4789 — PY-PORT: port tarball_workspace.py to aprender-ci-tools tarball-workspace (C301)
- PY-PORT-2d: port tarball_build_errors.py to aprender-ci-tools tarball-build-errors (C301) #4797 — PY-PORT-2d: port tarball_build_errors.py to aprender-ci-tools tarball-build-errors (C301)
- PY-PORT-2e: port llama_fit_verdict.py to aprender-ci-tools llama-fit-verdict (C301) #4799 — PY-PORT-2e: port llama_fit_verdict.py to aprender-ci-tools llama-fit-verdict (C301)
- PY-PORT: git_patch_id.py -> aprender-ci-tools git-patch-id (child of #4741) #4800 — PY-PORT: git_patch_id.py -> aprender-ci-tools git-patch-id (child of PY-PORT-2: port publishable_crates / package_include_diff / coverage_report_scope to Rust (C301) #4741)
- PY-PORT: crux-judge — retire the Python CRUX judge, oracles and certifier for tools/aprender-crux-judge (child of #4741) #4802 — PY-PORT: crux-judge — retire the Python CRUX judge, oracles and certifier for tools/aprender-crux-judge (child of PY-PORT-2: port publishable_crates / package_include_diff / coverage_report_scope to Rust (C301) #4741)
- PY-PORT: port tarball_test_run.py to aprender-ci-tools tarball-test-run (C301) #4812 — PY-PORT: port tarball_test_run.py to aprender-ci-tools tarball-test-run (C301)
- PY-PORT: crux_missing_stories.py -> aprender-ci-tools crux-missing-stories (child of #4741) #4816 — PY-PORT: crux_missing_stories.py -> aprender-ci-tools crux-missing-stories (child of PY-PORT-2: port publishable_crates / package_include_diff / coverage_report_scope to Rust (C301) #4741)
- PY-PORT-2f: port perf041_report.py to aprender-ci-tools perf041-report (C301) #4818 — PY-PORT-2f: port perf041_report.py to aprender-ci-tools perf041-report (C301)
- PY-PORT-2g: port annotate-book-examples.py to aprender-ci-tools annotate-book-examples (C301) #4822 — PY-PORT-2g: port annotate-book-examples.py to aprender-ci-tools annotate-book-examples (C301)
- PY-PORT: obligation_ids.py -> aprender-ci-tools obligation-ids (child of #4741) #4823 — PY-PORT: obligation_ids.py -> aprender-ci-tools obligation-ids (child of PY-PORT-2: port publishable_crates / package_include_diff / coverage_report_scope to Rust (C301) #4741)
- PY-PORT-2h: port extract_book_examples.py to aprender-ci-tools extract-book-examples (C301) #4826 — PY-PORT-2h: port extract_book_examples.py to aprender-ci-tools extract-book-examples (C301)
- PY-PORT: lockfile_registry_packages.py -> aprender-ci-tools lockfile-registry-packages #4827 — PY-PORT: lockfile_registry_packages.py -> aprender-ci-tools lockfile-registry-packages
- port the nextest fail-fast guard's embedded Python TOML reader to Rust (C301) #5032 — port the nextest fail-fast guard's embedded Python TOML reader to Rust (C301) (branch:
la-72/5032-nextest-reader-rust) — reopened 2026-10-14 as a 0.72.0 floor row; tracked on its own ticket, not here - PY-PORT-2f: port model_ladder_cells_produce.py to aprender-ci-tools ladder-cells-produce (C301) #5225 — PY-PORT-2f: port model_ladder_cells_produce.py to aprender-ci-tools ladder-cells-produce (C301) (branch:
PMAT-5225-ladder-cells-produce-port) — reopened 2026-10-14 as a 0.72.0 floor row; tracked on its own ticket, not here
Children tracked here (REDUCE-1022)
- port the nextest fail-fast guard's embedded Python TOML reader to Rust (C301) #5032 — port the nextest fail-fast guard's embedded Python TOML reader to Rust (C301) (closed: not planned)
- Python-oracle tests silently pass when python3 is absent #5373 — Python-oracle tests silently pass when python3 is absent (closed: not planned)
- Ban inventory: rewrite stub_server.py (runtime-generated test stub) in bash/Rust #5864 — Ban inventory: rewrite stub_server.py (runtime-generated test stub) in bash/Rust (closed: not planned)
- Ban inventory: rewrite scripts/lib/crux_fake_serve.py in bash/Rust #5865 — Ban inventory: rewrite scripts/lib/crux_fake_serve.py in bash/Rust (closed: not planned)
- Ban inventory: rewrite scripts/ci/fat_driver.py in bash/Rust #5866 — Ban inventory: rewrite scripts/ci/fat_driver.py in bash/Rust (closed: not planned)
- Port scripts/lib/roadmap_fragments.py (and roadmap_diff/roadmap_merge) to Rust #5902 — Port scripts/lib/roadmap_fragments.py (and roadmap_diff/roadmap_merge) to Rust (open)
- LAB: check_roadmap_completion_is_cited.sh self-test row hits live GitHub and flakes (PR #2733 is MERGED) #5910 — LAB: check_roadmap_completion_is_cited.sh self-test row hits live GitHub and flakes (PR batch: seven receipt-rule sub-tickets — guards that named the code for a broken host, and a gate green on its own fixture #2733 is MERGED) (closed: not planned)
Activity
roadmap: PMAT-4802, the crux-judge port as a child of #4741 (Refs #4802)
26 remaining items
noahgift commentedon Oct 14, 2026
Folded into this epic's checklist from #4742 (same theme; text kept verbatim; owner owner:aprender-wprodmodels keeps the work).
Original text of #4742
R12 (#4684) stopped after two review rounds that did not pass on the same findings: a text scan of how tools are invoked does not converge.
This replacement measures at run time instead. A PATH shim for
python,python3anduvwraps every nightly lane and logs each call with its caller; an execve trace catches the absolute shebangs the shim misses. The count of distinct Python entry points the gate path ran lands as a ratchet from the first measured night (head vs base, never worse). It blocks only after three green nights.Plants: a lane that calls Python through
env, through a variable and through a heredoc must each raise the count.Why P0: it is the mechanism for the operator's ruling that the build is Rust only and Python stays only as external validation.
Status: built on a branch; review stopped after two rounds that did not pass. A third round, or a park to 0.70.3, is the operator's call.
K^ 3. Owner aprender-a7r. Refs #4678. #4684 closes into this issue with a pointer.
Collapsed rows (APR-EPIC-001 rule 20, C334)
4754: 0.70.3: python run-time count: key what Python RAN, not how its argv is spelled (redesign of 0.70.2 T24: count the Python the gate path runs, at run time, not how scripts spell it (R12 replacement) #4742) (0.70.3: python run-time count: key what Python RAN, not how its argv is spelled (redesign of #4742) #4754 · last: none · owner:aprender-a7r9 · branches: build-kaizen/4754-python-runcount-files@bffb0337f7)
R12 release-path Python inventory guard (collapsed from 0.70.2 T6: BLD-002 R12 release-path Python inventory guard, shadow first, then admit it (= R12-E) #4684).
noahgift commentedon Oct 15, 2026
Folded in (cop batch 10:31Z): #5032 #5225 — each is now a checklist row of this master.