# Native .NET explicit foreground CPU placement qualification

## Declared hypothesis and scope

The [inherited-placement physical generation](RECORD_2026-10-17_dotnet_native_handler_physical.md)
passes all HP flows and three SCAN flows; SCAN tick's three p50s fail stability.
A separate first-allowed-CPU configuration tests the effect of fixing the
foreground thread's placement. No timing advantage or causal conclusion is
admitted by this functional qualification. Old successful cells and the failed
SCAN tick remain unchanged, with no unchanged timing retry.

The optional Linux profile uses `sched_getaffinity` to observe the actual
current foreground mask before SDK creation. `first-cpu` narrows only that
thread through `sched_setaffinity(0, ...)`, then reads and verifies the actual
effective mask. `inherit` reads/verifies the mask without narrowing it.
Nonempty ordered unique integer CPU lists and the explicit profile are required.
The physical reader additionally matches the original mask with the fixed
entry's CPU budget. There is no host policy, root helper, SDK or native-library
change. Legacy UTC receive does not select or change foreground affinity.

Both endpoints retain profile and actual startup masks. The compact writer
binds them across all roles/runs and gives first-CPU results a distinct
`dotnet-native+handler+complete-rtt+first-cpu` key. Its original clocks,
preflight/body/sink, sample counts, admin/physical and timing gates remain
unchanged. Linux is required for this affinity proof. Unknown profiles and
wrong masks cannot silently fall back to an inherited result.

## Actual qualification

Both hosts build the complete 904-file stripped harness without engine,
private or Git trees. Builds use SDK 10.0.112, net8.0, two MSBuild jobs,
no build server/shared compilation and session build roots. Each has zero
warnings/errors. HP holds high-priority `isol`; SCAN normal `isol`. All masks
use the full endpoint budgets: HP server 8–12/client 13–17, SCAN server
10–13/client 14–17. First-CPU observations are respectively 8/13 and 10/14.
All endpoint masks in all actual functional matrices match their profile.

| Runtime configuration | Pairs per host | Cold refusals per host |
|---|---:|---:|
| Legacy receive | 12 | 73 |
| Handler / inherited mask | 12 | 109 |
| Handler / inherited mask / 2 ms probe | 12 | 28 |
| Handler / first CPU | 12 | 109 |
| Handler / first CPU / 2 ms probe | 12 | 28 |

This is 120 actual pairs and 694 independent refusals across both hosts.
Every profile covers all four flows and warmup 5, 0 and 5, retaining 240
primary/240 delay samples and 1,000 application frames per peer per host.
Each body/owner vector matches the independent canonical specification.
Ordinary runs have integer-zero boundary probe and no trace; delayed runs
prove the selected handler/extraction clock boundaries and remain ungraded.
Ten pre-warmup capture cycles close before warmup; measured capture is zero.

All 944 focused SDK-free clock, affinity, preflight, runtime, writer, report,
comparison, queue and status controls pass without skips. Mask corruption
checks are additional to the original handler-boundary controls. The source
export has zero closure/scrub findings; it does not admit a whole release.

## Immutable inputs and next step

- Qualified source pin: `06f48cec036ceeecab8731d86c21fb01d37854dc`.
- Source inventory SHA-256:
  `4ee395a4a7007d9d625b2ec6a8a9a7fd62c978401158c36cd0bcbd7bb11c8ba1`.
- Driver DLL, identical on both hosts:
  `f497d9b795a2e0580ef147d0799c019730727943a74a3f4b70e6ba838299a4d4`.
- Unchanged native library:
  `91bdc88f8cd2d375262daafdc233ce2b16bc49e8fcae0789da12af999c737dc9`.
- Unpatched SDK pin:
  `uncommitted-functional-source-26310f12584fd0f392af231da8c2ea10067f50bb337db118cc79a2895da54386`.

Source/SDK bytes and modes and native-library bytes remain unchanged. The
corrected final receipt code appends `.dll` to the executable name; the older
qualification's final path error is not repeated. No pair is rerun after a
failure. The working roots on both hosts are:

- `~/.cache/libhft/fullbench-dotnet-native-first-cpu-20261017-v1`
- `~/build/codex-fullbench/libhft/dotnet-native-first-cpu-20261017-v1`

Fresh first-CPU physical timing is the next separately declared experiment.
It will run the complete four-flow tiny/report matrices once per rig with
fresh disjoint ports, high priority on HP. Individual or matched report grades
require those original physical checks; no timing result is inferred here.
No raw capture, sample stream, log or source tarball is imported into Git.
