Skip to content

Release v1.8.1 — falsification-audit hardening (C-67/C-68/C-69/C-70)#198

Merged
Polichinel merged 6 commits into
mainfrom
development
Jul 2, 2026
Merged

Release v1.8.1 — falsification-audit hardening (C-67/C-68/C-69/C-70)#198
Polichinel merged 6 commits into
mainfrom
development

Conversation

@Polichinel

Copy link
Copy Markdown
Contributor

Promote developmentmain for v1.8.1. Trial-merge clean; merged tree identical to
development. Merge with a MERGE COMMIT, not squash (dev/main-divergence rule).

What ships (patch: bug fixes, identical contract, floor stays 1.0.0)

  • C-68 (the audit's hard finding): reconcile_proportional now conserves exactly for any
    nonzero draw sum — the torch-port's + 1e-8 epsilon 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).
  • C-67: conformance suites refuse to run under python -O instead of silently passing.
  • C-69: empty-index searchsorted returns all -1 instead of an obscure IndexError.
  • C-70 cleared: the audit's tests (test: C-70 test adds — proportionality law, mmap read-only pin, missing-map-entry raise #195: proportionality law, mmap read-only pin,
    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).
  • Register: 67 total / 12 open / 55 resolved; audit regression pins in
    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

Polichinel and others added 6 commits June 28, 2026 03:36
…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>
@Polichinel Polichinel merged commit 58c5c99 into main Jul 2, 2026
14 checks passed
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