Skip to content

0.8.8: manifests name their source commit; bad live quotes skipped (no value moves) - #25

Merged
loggger101 merged 1 commit into
mainfrom
release-provenance
Dec 1, 2026
Merged

loggger101 merged 1 commit into
mainfrom
release-provenance

Conversation

@loggger101

Copy link
Copy Markdown
Owner

An audit of the repo, in three rounds. Data contract unchanged at 1.22.1: rebuilt from metals-2026-10-07, all eight tables equal the committed fixtures and the published prices-2026-11-20 byte for byte.

What was wrong, and what changed

  • Release provenance. Every published release (prices-2026-10-07 through prices-2026-11-20) has source_commit: "". The publish workflow installed a wheel, so the build ran from site-packages, outside any checkout. The workflow now installs editable, and a new step fails the run unless the manifest names $GITHUB_SHA with a clean tree. That step fails on the real prices-2026-11-20 manifest. A commit is recorded only when the checkout's top level holds the package, and both manifests gain source_dirty.
  • Bad live quotes. A metals.dev payload of gold 0, platinum -5 and silver "NaN" priced gold at $0/kg and platinum at -$160.75/kg, and left silver's reference price under a live label, with the run ending COMPLETE. Both live paths now skip a close that is not a finite number above zero (spacecost's snapshot rule), so the reference price stands.
  • --live false green. build --live -q with no yfinance exited 0, printed nothing, and wrote "live_quotes": true over reference prices only. build and show --live now exit 1 with a stderr line, and the build manifest gains quoted_rows.
  • Gate gap. check-release passed a ninth table for a destination that does not exist. It now fails.
  • Docs. The README said every destination has the same columns, but earth_surface lacks seven, value_route among them. It now names them, and a test holds the list. The install lines pinned v0.5.0 (data contract 1.19.0) and now pin v0.8.7. A docstring's platinum example had outdated figures.

Verification

  • 208 tests pass locally (Windows, Python 3.14). Each new check was shown to fail on a planted defect.
  • The published prices-2026-11-20 assets pass check-release, and a local rebuild matches every sha256.

Not covered by this PR

The publish workflow's new step has not run on GitHub yet. A dry run (dry_run: true) before the next real release would confirm the Windows runner's checkout reads as clean.

…o value moves)

Release provenance: every published release through prices-2026-11-20
says source_commit "", because the publish workflow built from an
installed wheel outside any checkout. The workflow now installs editable
and fails unless the manifest names $GITHUB_SHA with a clean tree. A
commit is recorded only when the checkout's top level holds the package
(a copy in another project's .venv no longer reports that project's
HEAD), and both manifests gain source_dirty.

Live quotes: a close that is not a finite number above zero is skipped
with a WARN on both live paths (yfinance, metals.dev), the rule spacecost
holds snapshots to. Before, gold 0 priced gold at $0/kg and platinum -5
below zero, with the run ending COMPLETE.

CLI: build/show --live exit 1 when no live quote came back (before: exit
0, silent under -q, manifest "live_quotes": true); the build manifest
gains quoted_rows.

Gate: check-release fails a table for a destination the package does
not price.

Docs: README says which seven columns earth_surface lacks (held by a
test), its install lines pin v0.8.7 (were v0.5.0), and the platinum
example in apply_delivery_destination uses the seed build's figures.

Data contract unchanged at 1.22.1. Rebuilt from metals-2026-10-07, all
eight tables equal the fixtures and prices-2026-11-20 byte for byte.
208 tests pass.
@loggger101
loggger101 merged commit 008f8a8 into main Dec 1, 2026
31 of 34 checks passed
@loggger101
loggger101 deleted the release-provenance branch December 1, 2026 18:39
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.

1 participant