TEMPLE4 ENGINE SELECTION — WHICH CORRECTED TRAILBLAZE IS OPTIMAL
================================================================
Decision: Temple4 ships the CORRECTED Trailblaze 0.8b as its inference engine.

All three trees (0.7, 0.8b, 0.9) received the identical byte-exact Q4_K fix and
all three now PASS: byte-exact self-test, standalone q4k_verify_test.c, full CPU
build, and runtime forward-pass self-test. So correctness is equal across them;
the choice comes down to feature completeness of the actual runtime.

EVIDENCE (measured this session, not assumed)
---------------------------------------------
File counts (c/h): 0.7 = 54,  0.8b = 54,  0.9 = 76.
  → 0.9's extra files are audit scripts, stubs/, and extracted*/ analysis
    bundles, NOT new runtime modules. The src/ module set is identical across
    0.8b and 0.9 (same 18 .c files).

Version headers (README):
  0.7  README: "TRAILBLAZE v0.7"
  0.8b README: "TRAILBLAZE v0.8b" — adds telemetry-coupled HDGL control
               endpoints /api/strand/control and /api/strand/state.
  0.9  README: still says "v0.7". The "0.9" directory is an AUDIT WORKSPACE
               built on the 0.7 base, not a forward progression of the runtime.

Inference core (layer4/tb_infer.c) — the decisive comparison:
  diff 0.9 → 0.8b : 87 lines present only in 0.8b, 4 lines only in 0.9.
  The 87 added lines include:
    - /api/strand/state  (GET  — controller telemetry readout)
    - /api/strand/control (POST — live control of hdgl_alpha, etc.)
    - a quality-pressure controller: ctrl_hdgl_alpha_scale
    - critic-coupled routing: alpha_eff = hdgl_alpha * clamp(ctrl_scale) then
      * critic_alpha_mod (sigmoid [0.3,1.0]).
  The 4 "0.9-only" lines are NOT lost functionality — 0.8b reimplements the
  same expert-selection more richly (direct sel.hdgl_alpha in 0.9 vs the
  telemetry+critic-modulated alpha_eff in 0.8b). No regression in 0.8b.

CONCLUSION
----------
0.8b's inference core is a SUPERSET of 0.9's: same dequant/loader/forward path,
PLUS adaptive telemetry-coupled routing and the strand HTTP control surface.
Therefore 0.8b-corrected is the most optimal engine for Temple4.

WHAT SHIPS IN TEMPLE4
---------------------
engine/                         corrected Trailblaze 0.8b (full source tree)
  layer4/tb_gguf.c              Q4_K byte-exact (fixed); .orig kept alongside
  bin/tb_infer_cpu_verified     rebuilt from corrected source (this session)
  ... full runtime, strand endpoints intact ...
engine-corrections/             provenance for all three corrected trees
  Q4K_FIX_0.7.diff
  Q4K_FIX_0.8b.diff
  Q4K_ENGINE_FIX.diff           (0.9 canonical)
  Q4K_ENGINE_CORRECTION.txt
  ENGINE_VERSION_SELECTION.txt  (this file)
  q4k_verify_test.c             byte-exact test (validates all trees)
Everything from the prior Temple4 (sidecar, substrate, HolyC, KJV oracle, etc.)

VERIFICATION SUMMARY (0.8b-corrected, this session)
---------------------------------------------------
  in-file  -DTB_GGUF_TEST : [Q4_K] w=0.5*8=4.0000, min-sub w=3.5000 PASS (byte-exact)
  standalone q4k_verify_test.c : 5/5 assertions PASS (exit 0)
  full CPU build (build_cpu_verified.sh) : built bin/tb_infer_cpu, clean
  runtime self-test : [generate] 8 tokens PASS; lattice M=0.9992; wuwei ALL PASS;
                      === TRAILBLAZE Inference Runtime PASS ===
  server object (tb_infer.c -c) : compiles clean; 2 strand endpoint strings present

HONEST CAVEATS
--------------
- Correct tokens still require a real Qwen3 GGUF (not bundled). The Q4_K math is
  proven exact independently of any model file.
- 0.7 and 0.8b had exactly one tb_gguf.c each (no extracted copies); 0.9 had
  three copies, all corrected. All buggy-mapping counts are now zero everywhere.
- The tb_infer_cpu_verified binary in the ORIGINAL Temple4 was built from
  pre-fix 0.8b source. It is replaced here by the corrected-source rebuild.
