# HP capture workloads: common compiler implementation

## Scope and status

The capture-bounded sequence-only libhft candidate selects Clang21/C++23,
while qualified llfix capture products use GCC11/C++17. Comparing their times
would mix engine and build differences. This checkpoint adds a separate
functional controller that rebuilds unchanged llfix sources with the candidate's
exact compiler/flag/framework profile and exercises both senders against the
rebuilt receiver.

Common-compiler source `ae1772a99301b65c370dbd19ad98decc52aac79b` is retained on
`s/codex-llfix-capture-toolchain-source-20261017-v1`.

Four local input-admission checks pass, zero skips. Native compilation and
actual common-peer pairs have not run. While this implementation was prepared,
HP timing-controller-v3 and libhft candidate-v1 completed successfully. Their
source capsules and prior grades remain unchanged. No new quiet timing attempt
or result file is claimed.

## Completed HP prerequisites

Final timing-controller source `9ead704615634c7d9f8f09261ea7cebc0f66299c`
passes all six focused checks on HP, zero skips, and both actual physical Onload
clock pairs. All514 samples/568 orders per peer and four clean native exits
pass, with cold replay. The exact functional proof SHA-256 is
`68f665a86d613f3138517190c55b29b830660237cc4b16f1d09b0aff39f5b841`.
Pidstat detects the concurrent conformance compiler/assembler; functional timing
publication correctly refuses. The final eight-file capsule rechecks unchanged.
This is a new actual v3 pass, not a relabelled older-v2 proof.

Candidate source `34c250c392fb5d31582cd119cdc63c8a9dbf5d0c` compiles once
with Clang21 against the explicit215-file SDK at
`a697b542bebca49f86a5b070fb1f29d48a675948`. Its four HP controls pass, zero
skips. The two tiny pairs check385 samples/423 orders per peer; the full pair
checks1,000,000 samples/1,001,010 orders per peer. All six native exits are zero
and final cold replay agrees. Actual converted fields/owners match the unchanged
llfix peer. The full64MiB production store has1,001,012 empty committed records,
zero message payload bytes, inbound next sequence3 and26,026,320 used bytes.
The complete three-file capsule rechecks unchanged.

Candidate ELF SHA-256:
`f204381d4bd7199266c20f8b158b105567b0de860868d4edbca054faf0702970`.
Its full qualification SHA-256 is
`28cc47ab0efffec20367890de8064d6e3ea711d41d54e4accd17c6d289fbdcff`.
These are ordinary localhost functional results under a high-priority cooperative
lease; no performance percentile, physical or comparison grade is inferred.

## Admission and implementation

The controller refuses an incomplete or differently pinned candidate before
importing its code. It verifies every capsule byte/mode, compiler command and
environment, actual framework dependencies, and independently cold-replays both
candidate cohorts. Source/SDK/ELF/dependency checks continue through the frozen
candidate verifier. Only a complete actual candidate can start a build.

New llfix products compile from original qualified source paths, using the
actual candidate compiler identity and six fixed compilation options plus
pthread. Commands, product/dependency hashes and native bounded-Tap controls are
recorded. No native source or SDK is patched. Both engines use the newly
compiled peer; the libhft sender remains the checked candidate ELF.

The six tiny and three full ordinary TCP pairs require actual17/16 all-thread
placement, process identity, owned LISTEN readiness, bilateral ten-frame capture,
receiver warmup readiness and in-process converted-value/owner sinks. Frozen
graders verify every sample and sequence-only record. Nine real receiver
negative controls and final cold replay remain required. Functional percentiles
are not published as performance results.

## Local verification and remaining work

`test_toolchain.py`: four checks, zero skips. They refuse substituted compiler,
flags/includes/environment/framework/source, changed or incomplete capsules
before import, source symlinks/escaped ownership, and incomplete/reused/wrong-pin
or timing-labelled prerequisite cohorts. They execute no SDK or native benchmark
and claim no native functional proof.

The [runbook](../../bench/llfix_reference/PROFILE_CAPTURE_TOOLCHAIN.md) defines
exact input/cohort admission. With the candidate's completed build and full
proof, this lane can now qualify actual fresh products on HP. A build failure
requires a separate repaired generation, retaining its original log. New physical
entry, runtime/library observations, whole-host quiet timing and any compact
comparison remain open. Different production sequence-storage algorithms remain
disclosed; matching the compiler does not make their implementation costs equal.

## Queue submission

The new frozen two-file controller is queued on HP high-priority `isol`, shared
work allowed, after the actual prerequisite passes. One earlier queue wrapper
was locally found to contain an escaped-newline syntax error. Only its verified
own queued waiter was cancelled, before native work began; its original script,
submission and log remain intact. The replacement uses a distinct operation and
validates the complete generated Python worker syntax before submission. No
other owner's queue or process was changed. Native common-compiler proof remains
pending; the worker refuses any changed prerequisite or input.


## Later input-drift refusal

The queued common-compiler continuation refuses before native compilation.
Its original receipt/log remain unchanged. A read-only check of all587 actual
frozen native dependencies finds one changed file: `/usr/include/linux/version.h`.
The expected SHA-256 is
`846f2cb4a5fb3cef2e9182246e5526c3f225a146740cd0ef101f555969f8a8ea`;
the observed SHA-256 is
`d2d4327d37049e25a166f9663946f408d8987fe583f53b51250e018b1afb537c`.
No SDK source, native binary or frozen receipt was rewritten to waive this
check. Earlier functional passes retain their original inputs; a fresh reference
build is required for the changed header environment. This refusal is separate
from the user-requested fresh25-adapter Stage2 codec campaign.
