Repository navigation
feat: results library phase 4 — packaging, distribution and parity - #1757
Merged
Merged
Conversation
- autofit/export/package.py: package() — size-capped / exactly-N part zips (objects
whole), tables.zip, parts_manifest.csv, package.json, SHA256SUMS, README +
KNOWN_ISSUES with provenance (git revs, results-index hash); deterministic
atomic zips (UTC times, STORED media); delta rebuilds keep assignments and leave
unchanged parts byte-identical; stale parts removed; include_dataset; force
- autofit/export/verify.py: verify() — checksums, CRC (corruption reported, not
raised), members vs package.json, empty members, CSV parse/ragged/row counts,
coverage from the real zips, unlisted zips
- autofit/export/parity.py: compare() (identity incl. column sets, exact incl.
big-integer ids and one-sided blanks, tolerance-by-sigma with floors, gating,
markdown report) and scatter_between() (run-to-run z distribution)
- python -m autofit.export {package,verify,compare}; af.export
Refs #1756
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Results-library phase 4 (closes #1756; epic ledger PyAutoMind
draft/feature/autofit/results_library_epic.md). This phase covers shipping a finished results library and checking a rebuild against its reference, through a newaf.exportpackage:package: part zips plus a manifest, checksums and a provenance README. A rebuild rewrites only the parts that changed.verify: checks a package is whole.compare: diffs two results tables.scatter_between: run-to-run scatter.It generalises the DR1 tools
merge_catalogue.distribute(part zips, manifest, SHA256SUMS) andcompare_catalogues.py(1,138 lines).API Changes
Additive only.
af.exportis a new module.af.export.package(source, dist, cap_gb=|n_parts=, include_dataset=, title=, repos=, index=, notes=, replan=False, force=False)→PackageReport.af.export.verify(dist, allow_empty=...)→VerifyReport(.ok,.problems).af.export.compare(a, b, key="id", exact=(), gate=(), threshold=3, floor=0, rel_floor=0, columns=None)→ParityReport(.passed,.columns,.to_markdown()).af.export.scatter_between(a, b, paths, key=...)→ScatterReport.python -m autofit.export {package,verify,compare}: exit 0 = OK, 1 = problems / tables differ, 2 = error.See full details below.
Test Plan
test_autofit/export: 37 tests, 15 of them review regressions:scatter_between;test_fit_status.py::test_sigusr1_then_sigterm_in_a_fitting_process, a signal-timing flake under load. It passes 5 of 5 alone, and this branch does not touchautofit/non_linear.columns=dropped the σ companions;cap_gbwas forgotten andn_partsignored on a rebuild;n_partswas not exact;forceoption;.completed) were dropped;Workspace/Science/scratch/results_library_p4_w1d/):part_002.zipwas rewritten, and the other three are byte-identical (sha256sum -c);output/vsoutput_sed/) are copies, with z = 0 everywhere. Calibrating real run-to-run scatter (P19's median z of 15) needs genuine reruns, which is phase-5 census work.Full API Changes (for automation & release notes)
Added
autofit.export.package:package(...),PackageReport,PackageException;index_hash(index),write_zip(zip_path, members),part_name(i),sha256(path),csv_records(handle).autofit.export.verify:verify(dist, allow_empty=(".completed", "*/.completed"))andVerifyReport.autofit.export.parity:compare(...),ParityReport,ColumnParity,scatter_between(...),ScatterReportandScatter.autofit.export.readme:write_readme(dist, document, title, notes).python -m autofit.exportsubcommandspackage,verifyandcompare.autofit/__init__.py:from . import export, soaf.export.*works.Migration
Decisions flagged:
af.export, includingscatter_between; the ledger saidaf.agg, which doesn't exist.force=Truerewrites every zip.part_*.zipindistit did not write.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code