Phase 5 (ADR-0067 follow-up):
teaching/cross_pack_supersede.py — supersede_cross_pack_chain()
CLI: core teaching supersede ... --cross-pack
--subject-pack-id ... --object-pack-id ...
Strict per-chain residency, anti-leakage, byte-identical rollback
on any post-append re-load failure. 9 new tests.
Articulation benchmark suite (Phase 4 capability proof):
benchmarks/articulation.py — 5 sub-benches
[1] breadth — every intent shape (9 + OOV + cross-pack)
[2] determinism — N reruns / unique-surface count
[3] footprint — psutil RSS profile across T turns
[4] cross-topic — thread context across mixed subjects
[5] ollama-compare — opt-in side-by-side with local Ollama
CLI: core bench --suite articulation
--runs N (det rerun count)
--turns N (footprint sample window)
--ollama-model MODEL --ollama-reruns N
Full operator preamble + JSON report path.
10 new tests cover the bench shape (psutil import-skipped).
Documentation:
benchmarks/README.md — full operator manual: catalogue of every
bench suite, how to read good/neutral/bad results for each sub-
bench, why CORE vs Ollama comparisons are valid on the
determinism axis and not on linguistic quality, workflow guide.
README.md — articulation bench listed in the live-demo grid and
quick-start examples.
Reference run (llama3:8b, 100 turns, 5 reruns):
determinism_all_identical=True
per-turn ΔRSS ≈ 23 KiB
CORE byte_identical_on_every_prompt=True
Ollama unique_surfaces≥2 on every prompt
Verification:
18 new tests pass
Full lane: 2116 passed, 2 skipped, 0 failed in 2:38
Full lane wall-time: 6:35 → 2:25 (2.7× speedup). No behavioral
changes; same 1933 passed, 2 skipped.
Three wins, biggest first:
1. pytest-xdist as a project dependency.
``pyproject.toml`` gains ``pytest-xdist>=3.6``. ``cmd_test``
injects ``-n auto`` for ``--suite full`` when xdist is importable;
curated suites stay single-process because worker-spawn overhead
is net-negative on the smaller suites. Operator can override
via passing ``-n <N>`` or ``--dist`` explicitly.
Verified: ``core test --suite full -q`` prints ``bringing up
nodes...`` and parallelises across the runner's CPUs.
2. Module-scoped fixture for run_demo() in test_learning_loop_demo.py.
The 7 demo tests each previously called ``run_demo(emit_json=True)``
from scratch — and ``run_demo`` itself runs the cognition lane
twice via the replay-equivalence gate. ~15s/file → ~3s/file.
Module scope (not session) is intentional: pytest-xdist
distributes by test, so a session-scoped fixture would still be
re-evaluated per worker that picks up a test from this file.
Module scope keeps the cost paid once per worker per file, which
is the actual lower bound.
3. Module-scoped fixture for the teaching-loop bench.
``test_teaching_loop_bench.py``'s 5 tests previously each ran
``run_teaching_loop_determinism(runs=2 or 3)`` — 12 pipeline
invocations across the file. One ``runs=3`` invocation shared
across all 5 tests covers every assertion: ~25s → ~7s.
For local iteration, ``core test --suite cognition -q`` etc. remain
fast (no xdist overhead). The full-lane speedup is most visible
under CI / pre-merge runs.
Audit of the one-mutation-path invariant (ADR-0021 §3) found three leaks
where pack authority or session-state writes could substitute for coherence
judgment. All three landed fixes or partial closures in this push.
Leaks closed:
- Leak A: pack vocab defaulted to COHERENT — flipped to SPECULATIVE in
language_packs/{compiler,schema}.py; docstring corrected to align with
ADR-0021 (it was rationalizing the leak).
- Leak B: vault.recall was epistemic-blind — VaultStore.store() now stamps
every entry with EpistemicStatus (default SPECULATIVE); recall(min_status=)
filters to admissible-as-evidence tier. All 4 vault-write sites updated.
- Leak C (write-side): generate/proposition.py:198 stored articulated
propositions unmarked — now stamps SPECULATIVE, breaking the
fabrication-feedback loop in principle. Read-side audit of 5 call sites
is the residual.
New architectural invariants (tests/test_architectural_invariants.py):
- INV-21: one-mutation-path allowlist (caught Leak C on first run)
- INV-22: pack lexicon default is SPECULATIVE (Leak A guard)
- INV-23: vault recall epistemic-aware (Leak B guard)
New eval lanes:
- teaching_injection_resistance — ships GREEN at 1.00/1.00/0 (the
structural anti-injection claim is real and measurable)
- refusal_calibration — honest gap: 0% refusal, 0% fabrication
- contradiction_detection — honest gap: 50% flag via versor-delta heuristic,
100% false-positive; motivates the proper coherence-checker
- articulation_of_status — honest gap: 0% speculative articulation, 60%
false certainty; output-side leak surface
New benchmarks:
- benchmarks/footprint.py — total deployed runtime is 7.06 MiB
(109,358x smaller than Llama 3.1 405B, runs offline, no GPU)
- benchmarks/learning_curve.py — monotonic + replay-deterministic curve
per lane
Documentation:
- docs/truth_seeking_schema.md — foundational architectural commitment,
five rules, mapped to human failure modes, leaks published openly
- evals/CLAIMS.md — five-tier public claims doc; Tier 4.5 publishes
known gaps with named fixes; verification contract at top
- README.md — new pillar between algebraic substrate and language pillar
Includes in-flight formation pipeline scaffolding (formation/, tests/formation/,
docs/formation_pipeline_plan.md) and minor CLI/contracts/gitignore edits
that were already in the working tree at session start.
Verification: 798 passed, 2 skipped, 1 deselected (pre-existing pack-count
test drift unrelated to schema changes).
MLX was declared as a darwin-only dependency but no source code
imports it — runtime is NumPy (Python path) + Rust/Rayon
(CORE_BACKEND=rust). Per ADR-0020, third-backend work
(GPU / JAX / MLX) is explicitly deferred until both Python and
Rust paths are mature.
Smoke suite (27/27) confirms no path depends on MLX. Re-add if
and when a deferred Apple-Silicon GPU backend is opened.
* Make core CLI help robust and intuitive
* Package runtime support modules for core CLI
* Add CLI help and doctor tests
* Fix CLI trace help and pack listing
* Export language pack listing helper
* Bootstrap repo root for console runtime imports
* Align trace formatter with Proposition schema
* Cover real trace payload formatting