Release v1.8.1 — falsification-audit hardening (C-67/C-68/C-69/C-70)#198
Merged
Conversation
…on (C-63 enforce-rider) (#192) C-63 was resolved by correcting the contract (ADR-025), but the actual setflags(write=False) enforce on the value buffer was deferred to the next MAJOR (it tightens an invariant on the frozen-surface `values`). That deferred safety work lived only in ADR-025 + the resolved C-63 residual — invisible when scanning open risks. Register C-66 (Tier 3, Open) as its home: trigger = the next MAJOR (add the one-line-per-constructor setflags + a red test, riding it free) or a consumer found mutating .values in place. Also: restore the immutability cluster (now C-66-open) in the intro + causal notes, fix a stale intro open-count (12 vs header 11 → both 12), bump Last Updated. Counts: total 62→63, open 11→12, resolved 51. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
ADR-025 and the 1.8.0 CHANGELOG referenced "README design principle 2" for the immutable-value-objects principle, but the README numbers it 3 (principle 2 is "No application logic"). An earlier sed fixed only the single-line occurrences; the line-wrapped ones survived in ADR-025 (×2) and CHANGELOG (×1). Cosmetic cross-reference fix — docs-only, no release. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…pty-index join (C-67/C-68/C-69) (#194) The 2026-07-02 four-axis audit's falsification phase found one hard and three soft violations of the safety claim; fix all four (bug fixes, identical contract): - C-68 (HARD): reconcile_proportional's torch-port `+ 1e-8` denominator epsilon was a float32 no-op for draw sums >~ 0.1 but SILENTLY deflated the scale factor for tiny nonzero sums (draw sum 1e-8: country total 100 reconciled to 50, no error; the package's own assert_reconcile_contract rejected its own output). Replace it with an explicit all-zero-draw guard: exact division for any nonzero sum; all-zero draws stay zero exactly as before. Bit-identical on all realistic data — torch-oracle parity unchanged and green. Also (F8): negative country totals now raise ValueError instead of silently clamping to a zero output. - C-67: the three published conformance suites were bare asserts — a silent no-op under python -O. Entry points now call _require_assertions(), raising RuntimeError under optimized bytecode instead of reporting green while dead. - C-69: searchsorted from an empty index crashed with an obscure IndexError (the np.clip(pos, 0, -1) corner); now returns all -1, the documented not-found value. Regression pins: tests/test_falsification_safety_audit_2026_07.py (written first as failing stubs, turned green by these fixes). Reconcile.md §6 + proportional.py docstring document the behaviors. Register: C-67/C-68/C-69 registered-and-resolved, C-70 (the audit's docs/tests polish bundle) opened; counts 63->67 total, 13 open, 54 resolved; /review-rr triage CLEAN. Gate: ruff / mypy (3.10+3.11) / pytest 398 passing at 100% line+branch / validate_docs all green; /review-diff CLEAN. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…issing-map-entry raise (#195) The 2026-07 four-axis audit's three committed-test recommendations (register C-70): - Share-proportionality LAW test: the method's defining forecast-proportion property was pinned only by the frozen-oracle fixtures (an equal-split mutation would have passed every law test). The falsify F5 probe proved the law holds; commit it so the essence is oracle-independent. - mmap read-only pin: load(mmap=True) buffers were asserted only as isinstance(memmap); now pinned writeable=False + in-place write raises (falsify F2 verified the behavior). - Reconcile missing-(time,gid)-mapping-entry raise: previously pinned only at the leaf, never from the reconcile suite — Reconcile.md §10's alignment claim is now true. Tests-only; 100% line+branch coverage held; ruff/pytest green. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ard (resolves C-70) (#196) The 2026-07 four-axis audit found the code<->contract agreement strong but the narrative documentation an epoch behind. Clear the whole list: - CLAUDE.md: rewritten for the released three-package reality (was "Two packages", "Status: v0.1.0", no views_frames_reconcile — misinforming every onboarding). - README banner: v1.7.0 -> v1.8.0 + the 1.8.0 chronicle line. - ADR-013: as-built amendment (feature_names is a FeatureFrame constructor arg, not a header field; header fields are all-optional — the decision's core stands). - CIC fixes: PF/TF/FF §5 artifact name -> values.npy; PredictionFrame §6 states the real dtype behavior (float64 COERCED, object dtype ValueError); SpatioTemporalIndex §6 NaN-via-dtype wording; Reconcile.md §10 names the actual pinning files (true after #195); CICs/README "no contracts yet" -> "fully contracted"; ADRs/README framing 011–016/design-bible -> 011–025/released; Last-reviewed dates bumped. - Recurrence guard: validate_docs.sh now checks the README banner's MAJOR.MINOR against pyproject.toml (patch-tolerant), so banner epoch-lag fails validation. - Register: C-70 -> Resolved (both halves done: tests #195 + this PR); 12 open / 55 resolved. Docs+script+register only — no src/ or test change. Gate green (ruff, pytest 100%, validate_docs incl. the new check). /review-diff CLEAN. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…rdening + C-70 clearance) (#197) Co-authored-by: Claude Fable 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.
Promote
development→mainfor v1.8.1. Trial-merge clean; merged tree identical todevelopment. Merge with a MERGE COMMIT, not squash (dev/main-divergence rule).What ships (patch: bug fixes, identical contract, floor stays 1.0.0)
reconcile_proportionalnow conserves exactly for anynonzero draw sum — the torch-port's
+ 1e-8epsilon silently deflated tiny sums (draw-sum 1e-8:total 100 → 50, no error). Bit-identical on realistic data; torch-oracle parity green. Negative
totals now raise (F8).
python -Oinstead of silently passing.searchsortedreturns all-1instead of an obscureIndexError.missing-map-entry raise) + docs refresh (docs: C-70 docs refresh — narrative epoch-lag cleared + banner guard (resolves C-70) #196: CLAUDE.md/README/ADR-013/CIC accuracy +
the validate_docs banner guard).
tests/test_falsification_safety_audit_2026_07.py.After merge + green CI:
gh release create v1.8.1(version-guard: 1.8.1 > 1.8.0 on PyPI).🤖 Generated with Claude Code