โ€บNavigation

iteration 04 ยท card 78 S5โ€“S13 ยท batch-6 implementation ยท 2026-07-02

Card 78 โ€” certified: causal, deterministic, restart-proof, documented, discoverable 13/16

← campaign board ยท previous: iter 03 (the plumbing)

In plain language โ€” what happened this iteration

The feature works; today it earned its certifications. Five distinct properties were formally proven, each with its own test that counts its checks (so a test that accidentally checks nothing fails loudly instead of passing silently):

โ€ข No crystal ball (causality): the value at bar #5,000 was recomputed using ONLY data up to bar #5,000 โ€” chopping off everything after it โ€” and had to match the full-history run bit for bit, at dozens of sampled positions on both markets. Any mismatch would mean the feature secretly peeks at the future, which would make it useless (and dangerously misleading) for prediction.
โ€ข Same question, same answer (determinism): the entire 10,000-bar computation was run twice and compared at every single bar โ€” not "approximately equal" but identical to the last binary digit.
โ€ข Units don't matter (scale-freeness): multiply every price by 4, or re-express every duration in different units โ€” the answer's bits don't move. This proves the feature measures *structure*, not magnitude.
โ€ข Garbage in, calm out (totality): 12 hostile inputs (empty windows, NaN, infinity, zero prices, mismatched lengths) โ€” no crash, no infinite output, ever.
โ€ข Survives a restart: the pipeline restarts nightly-ish in production. The stream was split in half, frozen to a JSON "memory snapshot", thawed, and continued โ€” every value identical to an uninterrupted run. This also proved live streaming and batch reprocessing agree bar-for-bar on real trade data.

Then the paperwork that isn't just paperwork: an Architecture Decision Record now explains every locked convention (why ranks are computed on a ratio instead of a logarithm, why ties break by arrival order, why the fixtures are self-contained) so a future engineer can't accidentally "fix" a deliberate choice. And the feature became discoverable: six typed commands (/hoeffding:test, /hoeffding:doctor, โ€ฆ) now run its gates โ€” under this repo's rule, a capability without a discoverable command is an incomplete delivery.

What's left before the pull request: the full repo-wide quality gate (format, lints, every test, dependency audit), an adversarial review where one agent attacks the implementation and another defends it (any conceded finding blocks), and the commit.

Grounded this iteration

S5 causality + S6 determinism + S11 robustness: dedicated two-substrate lanes appended to bar_close_robustness_test.rs (the generic drivers are close-only) โ€” truncation bit-parity, recompute bit-parity, dual-axis bit-exact scale invariance, 12-case crash/bounds totality; all green on BTC+ETH. S10 parity: batch โ‰ก streaming โ‰ก checkpoint-restart extended with the hoeffding column + non-vacuity guards, green on real aggTrades (the duration window round-trips the JSON checkpoint). S12: ADR committed-ready. S13: hoeffding:* mise namespace (6 tasks) + verbatim-mirrored slash-command wrappers + .mise.toml include; mise run hoeffding:test = 12/12.

stage13/16
harness lanes4/4 ร—2 symbols
parity trio3/3
mise gate12/12
namespace6 tasks + 6 wrappers
files ready28

Certifications recorded

PropertyProofResult
Causality (S5)Full-vs-truncated bit parity at stride-sampled bars, both substrates truncated togetherGREEN ร—2 symbols
Determinism (S6)to_bits-identical recompute at every bar (NaN-aware)GREEN ร—2 symbols
Scale-free both axes (S11)pow-2 close rescale + affine duration transforms โ†’ identical bitsGREEN ร—2 symbols
Crash/bounds totality (S11)12 degenerate (close,dur) windows: no panic, no ยฑInfGREEN
Parity (S10)batch โ‰ก streaming โ‰ก JSON-checkpoint-restart on real trades, non-vacuousGREEN
ADR (S12)docs/adr/2026-07-02-bar-hoeffding-phi-squared-midreturn-duration.mdWRITTEN
Discoverability (S13)hoeffding:{oracle,oracle-fresh,test,test-full,check-full,doctor} + wrappers; !.claude/commands/ exception verifiedREGISTERED

Next fire picks up here

S14 check-full: mise run check-full (fmt + lint + test + deny) โ€” expect long; also mise run hoeffding:check-full (test + test-full + oracle-fresh drift guard; oracle-fresh needs numpy + network). S15 challenge: spawn 1 Attacker + 1 Defender agents on the diff (kernel, generator legs, fixture provenance, checkpoint back-compat, tie semantics); work real findings; 0 conceded. S16: commit (NO AI attribution) โ†’ gh pr list --head feat/bar-orth/batch6-78-hoeffding first (never open a second PR), then open the stacked PR (order-1: base = main), record pr_url in the ledger, set card 78 status "done", move to card 59. Worktree: ~/eon/odb-worktrees/batch6-78-hoeffding, 28 files uncommitted, ledger is truth.