# Rust mapped-session composition qualification — 2026-10-19

## Scope

Reconnect the four remaining extracted `session.rs` cases in the private Rust
store companion. All 14 historical mapped-session cases now run in
`private/rust/libhft-rust-pro-store/src/classic_session_tests.rs`. The previous
ten cases are preserved unchanged apart from the shared import declaration.
Production engine/store code, configured lifecycle methods and conformance
selectors are outside this slice.

## Contracts and adapters

| Restored case | Public adapter and retained assertion |
| --- | --- |
| `mmap_restart_advances_past_fresh_admin_sequences` | `begin`/`transmit` composes the fresh Logout after the unanswered Logon. Wire sequences are 1 and 2; reopening resumes at 3 and neither admin frame is replayable. |
| `a_replay_gap_fill_does_not_replace_a_durable_application_record` | A wire ResendRequest produces a gap fill at the historical opaque payload's sequence 1. A second wire request uses the supported reversed range to gap-fill sequence 2 while a complete application record occupies it. Both reopened payloads and restart cursors are preserved. |
| `direct_transmit_keeps_a_durable_application_replayable` | The existing public composition buffer retains the original tag append and direct `transmit` path. The reopened application record equals the complete socket frame byte for byte; the next sequence is 2. |
| `a_full_durable_store_does_not_suppress_the_terminal_sequence_logout` | A checked seed at `SEQ_CEILING - 1` followed by one discarded public `begin` claim reaches the terminal boundary without a journal write. An explicit save first confirms the journal is full. Application send returns `E_SEQ_EXHAUSTED`, the diagnostic Logout reaches the peer at the terminal sequence, the refused application does not, and reopening retains last sequence 1. |

The original opaque `b"replayable"` fixture is not an intact FIX application
frame. The public replay decoder therefore gap-fills it; its byte-preservation
assertion remains. The added complete-frame variant exercises preservation of
an actually replayable record at the gap-fill's sequence. Neither reply
advances the fresh outbound cursor.

The direct-composition buffer was already public in the engine; this slice
does not expose a field or add a public test hook. Socket assertions wait for
complete frames, including trailers, and validate checksums before examining
tags or comparing stored bytes. The existing owned runtime-directory helper
cleans the fixtures on exit. Accept and receive loops have deadlines.

## Qualification

Qualified source: `52bba8afa90e2368f292e466cbd1c8951843799e`, based on published
claim `7e18c47d0`.

| Complete companion command | Counters enabled | Counters compiled out |
| --- | ---: | ---: |
| Library unit tests passed | 83 | 83 |
| Integration tests passed | 281 | 281 |
| **Total passed** | **364** | **364** |
| Failed / ignored / filtered | 0 / 0 / 0 | 0 / 0 / 0 |
| Strict all-target Clippy | pass | pass |
| Warnings-denied Rustdoc | pass | pass |

All six commands return 0. This slice adds exactly four test functions to the
previous 360-test checkpoint; the complete-frame gap-fill variant runs inside
the existing restored gap-fill function. Cargo commands use `--locked`, the
explicit development config and an out-of-tree session target. Scan runs the
commands serially with one Cargo job and one test thread, an isolated CPU lease,
memory/process guard and command deadline. BEELINK2 runs no heavy build.

All 354 selected source/configuration/documentation/fixture hashes match before
and after the run. This includes the two shared FIXP CSV inputs outside the
Rust roots. The selected-source manifest SHA-256 is
`d4d406098e9172894006bcdeb04ffab1b15e9a6f866d4d65876c41a065bc950a`.
Git status after qualification is empty. Targeted rustfmt and whitespace checks
pass. The source review verifies the complete extracted test-name inventory,
the unchanged prior cases and the absence of production source changes.

## Retained evidence and limits

`~/archive/libhft/rust-mapped-composition-20261019/` retains the qualified source
snapshot and bundle, exact adaptation patch, source review, command controller
and resource guards, six logs, toolchain, before/after hashes, totals analysis,
clean-tree observation and publication mapping. Its checksum manifest is
verified on Scan and HP before scratch cleanup.

The four-case session adapter gap is closed. Acceptor/configured-startup and
other extracted groups retain their own integration work; the separately
claimed configured lifecycle seam and moved conformance stages need their
owners' qualification. The mapped store retains its legacy on-disk sequence
limits. These results do not declare full Rust parity or provide new hardware
power-loss/performance evidence.
