POST coverage cluster 3/4: inference-engine accessors (proof-covered, previously untested)

New module (inference_words_test.c, Module 26) covers exactly the 8
words proof/COVERAGE.md marks proof-covered in inference_words.c (out
of 20 registered): the 5 output accessors (INFER-WINDOW@/DECAY@/
VARIANCE@/FIT@/EARLY-EXIT@), INFER-RUN (populates what they read), and
Q.VARIANCE/INFER-DECAY-SLOPE/INFER-WINDOW-WIDTH (array-based
primitives, using HERE as multi-cell scratch memory). Deliberately not
the L8 Jacquard or Bayesian-posterior words in the same file -- not
proof-covered, out of this cluster's scope.

Caught and fixed a contract-selection mistake before booting: copied
CONTRACT_PHYSICS_TRANSPARENT from the Q48.16 cluster without checking
whether it fit. It doesn't -- these words are specifically about
reading physics state (dictionary heat, rolling window), so asserting
A4' transparency on them would test an invariant they deliberately
don't have. Switched to CONTRACT_NONE with an explanatory comment.

Boot-verified: zero warnings, all 9 suite entries pass, FINAL TEST
SUMMARY 1031->1040 total / 993->1002 passed (+9 exactly), 0 failed,
contract checks (A4'/A1) still report "all passed" -- confirms the
CONTRACT_NONE fix actually avoided the violation, not just silenced it.

Cluster 4 of 4 (final one) left: physics freeze/diagnostic, 5 words.
Full writeup in FABRIC-2.md Section J.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Robert Allan James
2026-08-18 23:34:59 -04:00
co-authored by Claude Sonnet 5
parent 7100523656
commit 825ab078f1
7 changed files with 11139 additions and 1 deletions
+36
View File
@@ -1506,3 +1506,39 @@ only in each word's own line and the global `FINAL TEST SUMMARY`. Confirmed pre-
checking `Arithmetic Words Summary` in the same boot log, not introduced here.
Two clusters left: inference-engine accessors (8 words), physics freeze/diagnostic (5 words).
**Cluster 3, inference-engine accessors — done.** `inference_words.c` registers 20 words;
`proof/COVERAGE.md` claims coverage for only 8 ("5 accessors full; rest guard/shape") —
`INFER-WINDOW@`/`INFER-DECAY@`/`INFER-VARIANCE@`/`INFER-FIT@`/`INFER-EARLY-EXIT@` (the five
output accessors), `INFER-RUN` (the word that populates what they read), and the two other
array-based primitives `Q.VARIANCE`/`INFER-DECAY-SLOPE` plus `INFER-WINDOW-WIDTH`. New file
`inference_words_test.c` (Module 26, matching `word_registry.c`'s own numbering again) covers
exactly those 8 — deliberately **not** the L8 Jacquard or Bayesian-posterior words in the
same file, since `COVERAGE.md` doesn't claim proof coverage for them and this cluster's scope
was proof-covered-but-untested, not "everything in this file."
**A real contract-selection mistake caught before booting, not after.** Copied
`{CONTRACT_PHYSICS_TRANSPARENT, 0}` from the Q48.16 cluster without re-deriving whether it
fit — it doesn't. That contract re-runs a word's input under perturbed physics scalars
(execution heat, rolling-window fields, etc.) and requires an identical result, enforcing
axiom A4' (word results independent of physics state). `INFER-RUN` and the accessors reading
its output are specifically *about* physics state (dictionary heat, the rolling window) —
applying A4' transparency to them would assert an invariant they deliberately don't have, by
design, not a bug to catch. Caught by re-reading the contract's own implementation
(`test_contracts.c`) before running anything, not by a failing boot — switched to
`{CONTRACT_NONE, 0}` with an inline comment explaining why, matching how the hand-rolled ACL/
Mama modules (which also touch state contracts shouldn't police) opt out of the tabular
runner's contract mechanism entirely.
The three array-based words needed real data in VM memory — `HERE`, `HERE 8 +`, `HERE 16 +`
used as three-cell scratch storage, the same idiom `memory_words_test.c` already uses for
single-cell tests, just extended to multiple cells at literal byte offsets (cell size is 8
bytes here, no `CELL+` needed).
Verified: zero build warnings, all 9 test-suite entries pass, `FINAL TEST SUMMARY` moved
1031→1040 total / 993→1002 passed (+9 exactly), 0 failed, **contract checks (A4'/A1) still
report "all passed"** — confirming the `CONTRACT_NONE` fix actually avoided the violation it
was meant to avoid, not just silenced a check.
One cluster left: physics freeze/diagnostic (5 words: `FREEZE-WORD`, `FREEZE-CRITICAL`,
`UNFREEZE-WORD`, `FROZEN?`, `DECAY-RATE@`).