# HOLOGRAM_REPLAY_X100

Phase-12.HR — repeated verified workflows replay through `emit_holo_hit_envelope_v2` BEFORE any model/capsule call. The C++ runtime (`run_chat`) computes `sha256_16(input)`, hits `g_holo_cache`, and emits an envelope with `replay:true`, `source_hologram_id`, `source_dag_id`, and a real measured `wall_ms`. No 7B forward pass, no llama.cpp HTTP call, no capsule re-execution on the warm path.

| workflow | kind | cold wall_ms | warm wall_ms | speedup × | replay? | model_called | source_hologram_id |
|---|---|---|---|---|---|---|---|
| create_file_exact | terminal | 574.6 | 2.1 | 275.8× | True | False | 05dd402f2d633e50 |
| sed_transform | terminal | 1151.0 | 2.9 | 403.3× | True | False | 693ecf4ddc5d0834 |
| parse_json_target | terminal | 399.2 | 2.2 | 180.1× | True | False | 7136010513845032 |
| mbpp_solved_code | code | 285.6 | 2.0 | 139.9× | True | False | 8a5c79ec9725a6b6 |
| identity_who_are_you | identity | 415.6 | 1.9 | 217.5× | True | False | 43cec62bba334b24 |

## Summary

* workflows tested: **5**
* warm wall_ms < 100ms: **5/5** (target ≥3)
* speedup ≥ 50×: **5/5** (target ≥3)
* speedup ≥ 100×: **5/5** (stretch ≥1)
* `replay: true` set in DAG: **5/5**
* warm path with no model call: **5/5**

## Architectural witness

* Cache live at `dag/hologram_cache.jsonl`. Each row is a `{hash, output, ts}` triple keyed on `sha256_16(input)`.
* Successful `run_native_terminal_task` and `run_native_code_repair` paths call `holo_cache_store(input, replay_payload)` after the verifier passes. Identity route does the same.
* `run_chat()` calls `holo_cache_lookup` BEFORE any `shared_mgr()`/organ initialization. On hit it returns inside `run_chat` without touching the model layer.
* Replay envelope carries `model_called: false`, `llamacpp_called: false`, plus `source_dag_id` (pointing at the cold-run capsule on disk) for full provenance.


## DOD

* GREEN  — DOD met: ≥3 workflows under 100ms, ≥3 with ≥50× speedup, ≥1 stretch ≥100× (5/5). All warm rows have `replay:true` and `model_called:false`.