# Full-pipeline autopsy of PIZD 4.2.2

Frozen source, a distinct experimental package and a uniquely named executable keep production build artifacts isolated. All 60 traced Native/Hybrid thin outputs match the actual CLI archive SHA-256 identities; all 600 encodes restore exactly. Three warmups and seven retained traced rounds use the existing 30 public excerpts.

These are instrumented elapsed intervals, not CPU samples or competitor timing results. Main-thread intervals below are assigned to the innermost active span so nested work is not counted twice. A function can include waiting for its workers. Medians of components do not necessarily sum exactly to the median total. Inclusive span sums across worker threads overlap and must not be added to estimate runtime.

## Critical path

| Engine | Sum of encode medians ms | LZ77 main ms | Typed column wait/assembly ms | Dependency search ms | Auxiliary wait ms |
|---|---:|---:|---:|---:|---:|
| native | 318.79 | 103.17 | 37.65 | 30.81 | 81.95 |
| hybrid | 358.41 | 0.00 | 38.32 | 32.47 | 64.14 |

## Findings

- The two NASA HTTP excerpts each execute 56 dependency probes across structural candidates. These consume about 13–15 ms out of 24–28 ms complete compression. High-cardinality predictors can pass the 64-row sample because every first occurrence is counted as a successful match; a large mapping is then built even when it cannot beat the already encoded target.
- Exact pruning uses a monotone minimum cost: mandatory Mode10 header/count/index bytes + exception-count minimum + row mask + predictor keys with length prefixes + at least one target-length byte per distinct key. If this reaches the incumbent column budget, no completion can win. Current best dependency candidates tighten the budget. Original strict tie semantics are retained. This is conventional branch-and-bound engineering, not a new entropy coder.
- GH Archive window30 waits about 64 ms Hybrid /77 ms Native on auxiliary work. Its representative Hybrid trace contains 1,761 LZ calls, 1,682 below 1 KiB and 553 below 64 bytes. Total input to those calls is 804,821 bytes; their summed elapsed time is about 40.96 ms. The fixed associative table setup in predictive `pack_literal` is a concrete next target. Each call is not automatically redundant; reentrant callbacks and exact token choices must be checked before changing scratch reuse. The peer received these findings.

## Compatible dependency-budget experiment

Three alternating complete-encoder comparisons use all 30 existing public sources, both thin engines, three warmups and 11 measured rounds. No new held-out systems are introduced. The experiment changes only dependency-model preparation. Every observed archive fingerprint is identical to the frozen production control. All slower observations are retained. Most aggregate benefit comes from the two targeted NASA inputs; this is not a claim that every log family improves. HealthApp Hybrid observes +7.36% and small fixtures show larger relative increases.

| Engine | Control encode ms | Candidate encode ms | Change | Archive change |
|---|---:|---:|---:|---:|
| PIZD_native_thin_L0 | 429.117 | 385.798 | -10.09% | +0.00% |
| PIZD_hybrid_thin_L9 | 495.701 | 456.876 | -7.83% | +0.00% |

Validation: 5,040 archive emissions, 10,080 exact restorations and 5,040 independent SHA-256 checks. All 56 isolated library tests pass. The budget-boundary regression test covers predictor-index and distinct-count varint boundaries, exact ties, zero budget and unlimited budget. A failed initial harness expectation was corrected by enforcing the helper's budget contract at return; no rejected test result is presented as passing.

| Input | Engine | Control ms | Candidate ms | Change |
|---|---|---:|---:|---:|
| 25_nasa_http_jul95.log | PIZD_hybrid_thin_L9 | 33.853 | 18.311 | -45.91% |
| 25_nasa_http_jul95.log | PIZD_native_thin_L0 | 30.500 | 14.829 | -51.38% |
| 26_nasa_http_aug95.log | PIZD_hybrid_thin_L9 | 35.372 | 18.241 | -48.43% |
| 26_nasa_http_aug95.log | PIZD_native_thin_L0 | 31.514 | 14.515 | -53.94% |

## Reproduction and limits

Run `python3 tools/prepare_pipeline_autopsy.py`; build `pipeline_autopsy` with its printed manifest and the shared target directory; run it from the repository root. Then run `tools/summarize_pipeline_autopsy.py`. `tools/prepare_dependency_budget.py` prepares the independent budget candidate and patch; build its uniquely named `dependency_budget_worker` and run `tools/benchmark_dependency_budget.py`. The control worker must match the recorded frozen 4.2.2 public-panel hash.

The trace includes allocation/clock/locking overhead and measures a development panel on an uncontrolled desktop host. Main-thread attribution, repeated call counts and byte identities support choosing the next intervention; absolute trace times are not production throughput claims. The original wrong-budget harness run is explicitly discarded and retained with its reason. Live NDJSON and compressor integration remain peer-owned. Research-only files and the compatible patch are separate from a production release.
