# Primitive JMH export functional proof, 2026-10-03

This checkpoint migrates the primitive launcher owned by the microbench session.
The [preserved guide](../../benchmarks/retained/docs/MICROBENCH_JMH.md) describes its artifact
inputs, output precedence and retained failures. No Stage 2 adapter, converted
field contract, canonical workload, shared helper API, full-session runtime,
Maven pom or Java primitive algorithm changed. The qualified SCAN ranking and
all earlier frozen source/runtime generations remain unchanged.

The user subsequently parked this optional utility lane outside the public
export. Its launcher, primitive class, original project pom, guide and tests
are retained under `internal/` as a historical snapshot. Replay uses the original
complete capsule/source pin below. The original proof and admission status are
unchanged; see [the parking note](../../benchmarks/retained/java/fixbench/README_JMH_PARKED.md).

## Source and implemented behaviour

The functional source is private devel
`ca27a2319fc7bde90ce0ebac764620708974672a`, preserved on
`archive/primitive-jmh-export-source-20261003`. The session branch is
`s/codex-microbench-jmh`; no private history is published to a public repository.

The launcher consumes the existing inert Java source bootstrap and structural
layout API. The old Windows output default is removed. Explicit result output
wins over `FIXBENCH_RUN_ROOT`, then the session build root, then the selected
project's local target. An existing result directory is refused.

Maven packaging and dependency resolution share explicit effective target
properties, and runtime consumes the jar from that same target. Archive outputs
use `java/...`; development outputs use `bench/java/...`. Existing SDK target
and source inputs are consumed without rebuilding the SDK. Missing selected
system jars are refused before outputs or build commands.

Ready-artifact mode selects a benchmark jar and absolute dependency classpath,
requires `--skip-build`, and calls neither Maven nor an SDK builder. It captures
source/support and runtime hashes, exact argv and JVM version, then verifies
unchanged bytes and valid nonempty JMH JSON after execution. JMH uses fail-on-error.
Both JVM and launcher statuses are retained. Functional failures cannot become
qualified timing, field parity or release results.

## Fresh HP functional execution

The controller materialized the complete draft benchmark manifest: **735 selected
files plus three templates, 738 original source files**. The copied archive has
no `.git` or engine directory. An unrelated `.git` and engine marker in its
parent exercise ancestor isolation. Source bytes are checked before and after
the job. The controller, selected-source mapping, source pin, artifact bytes,
dependency poms, readiness output and SHA-256 records are retained.

Execution used `host-cpu-slot run --pool isol --priority normal --max-time 5m` on
HP, with concurrent shared work permitted. Its observed affinity was CPUs 8–17.
This was a short functional check, with no quiet-host or comparative timing
admission. No other session's work, SDK cache, queue request or process was changed.

The actual compiler was `/usr/bin/javac`, OpenJDK 17.0.20.1. It compiled the
unchanged `FixPrimitiveMicrobench.java` with `--release 8`, JMH core/generator
1.23, and the real annotation processor. Runtime used JMH core 1.23,
jopt-simple 4.6 and commons-math3 3.2 copied from the recorded Maven cache.
Their bytes and poms are sealed; upstream source/licence/release provenance is
**unqualified**. This is not SDK provenance evidence.

The real launcher used a jar and classpath paths containing spaces, explicit
ready artifacts, and deliberately missing unselected Maven/SDK paths. Every
method ran one warmup and one measurement iteration of 100 ms, with one fork:

| Method | Original JMH rows | Retained raw samples |
|---|---:|---:|
| `checksumMessage` | 1 | 1 |
| `findClOrdIdTag` | 1 | 1 |
| `formatChecksum3Ascii` | 1 | 1 |
| `formatPositiveLongAscii` | 1 | 1 |
| `parseDecimalScaled6` | 1 | 1 |
| `parseLongAscii` | 1 | 1 |
| `scanSohFields` | 1 | 1 |

All seven real methods and raw samples pass, **zero skips**. Three actual
refusal controls also pass: output reuse, missing benchmark jar, and empty
dependency classpath. Existing results survive the reuse attempt unchanged;
missing-input controls create no result directory. All **738 original source
files** and every original capsule input remain byte-identical.

The utility's synthetic FIX-shaped fixture has a placeholder checksum and fixed
BodyLength. The utility returns consumed values to JMH, but it does not execute
an engine's field parser. No Stage 2 parity or deployed-session claim is inferred.
The real proof covers ready primitive artifacts. Full-project Maven build/release
admission remains unqualified; producer/consumer wiring is checked with retained
executable process doubles in both source layouts.

## Verification and preserved evidence

The focused suite passes **16 tests**, zero skips. It covers selected/unused
input precedence, existing result preservation, invalid classpaths and run
parameters, failed Maven/JVM receipts, successful exits with missing/nonfinite
results, runtime mutation rejection, actual archive CLI startup, missing support
refusal and matched producer/consumer targets in both layouts. Explicit SDK and
benchmark targets with spaces are included.

The combined JMH/layout/output/archive gate passes **43 tests**, zero skips:

```sh
python3 -m unittest tools.test_jmh_microbench \
  tools.test_libhft_benchmark_layout tools.test_benchmark_output_path_defaults \
  tools.test_benchmark_export_layout -v
```

The full draft export still refuses admission: **132 scrub findings in 30 files,
87 textual path escapes, zero dead documentation links** at the frozen source.
The new launcher and guide scan clean. No standalone whole-harness or release
admission is inferred from this functional checkpoint.

Evidence is preserved on BEELINK2 and HP under
`~/archive/libhft/codex-microbench-jmh-20261003/`. `hp-functional/` contains the
complete frozen source/dependency capsule, original controller, generated Java
classes, benchmark jar, compiler/JVM logs, exact commands, original JMH JSON and
refusal receipts. `ORIGINAL_SHA256.json` seals its **826 original files**.
Local verification, publication/equivalence checks and coordination handoff are
kept beside that immutable generation. Disposable build/source copies may be
removed only after the retained bytes verify.
