Files
mxaccess/rust/crates/mxaccess-codec/tests/fixtures/m6-buffered
Joseph Doherty 9e57bfd451 [F41 + F44 reconciliation] cargo public-api baselines + multi-record DataUpdate codec
**F41 — public-api baselines (M6 DoD bullet 5)**

`design/public-api/{crate}.txt` for all 9 workspace crates, generated
via `cargo +nightly public-api --simplified -p <crate>`. Per-crate
baseline sizes:
- mxaccess-codec: 2516 lines
- mxaccess-asb:   1258 lines
- mxaccess-rpc:   1273 lines
- mxaccess-asb-nettcp: 708 lines
- mxaccess: 542 lines
- mxaccess-galaxy: 374 lines
- mxaccess-callback: 170 lines
- mxaccess-compat: 123 lines
- mxaccess-nmx: 118 lines

`design/public-api/README.md` documents the update procedure
(install nightly + cargo-public-api, regenerate the affected baseline
on intentional API changes, commit alongside).

`.github/workflows/rust.yml` gains a `public-api` job that runs the
same diff against the committed baseline; drift fails CI with a
unified diff in the log so the PR author can either revert or
update the baseline.

**F44 reconciliation — multi-record DataUpdate codec**

Cherry-picked from the F44 sub-agent's worktree (commit `aec6a0c`):
`subscription_message.rs::parse_data_update` now loops over
`record_count` like `parse_subscription_status` does, accepting any
positive count. The .NET reference still hard-throws on
`record_count != 1`; the Rust codec deliberately diverges per the F44
evidence walk against `captures/094-frida-buffered-separate-writer/
frida-events.tsv:145` (a `0x33` DataUpdate body with `record_count = 2`,
inner_length = 23 (preamble) + 2 * 19 (records) = 61, post a
separate-session writer triggering two value changes inside one
`SetBufferedUpdateInterval(1000)` window).

Two new round-trip tests:
- `data_update_multi_record_round_trip` — synthesises a 2-record body,
  parses, asserts both records decode to expected Int32 values.
- `data_update_capture_094_truncated_record_errors` — truncates the
  capture-094 fixture mid-second-record, asserts CodecError::Decode.

New wire-byte fixtures under `crates/mxaccess-codec/tests/fixtures/m6-buffered/`:
- `094-line145-dataupdate-recordcount2.bin` (57 bytes, `0x33` multi-record)
- `094-line48-substatus-recordcount2.bin` (101 bytes, `0x32` multi-record)

R2 in `design/70-risks-and-open-questions.md` updated from
"single-sample (settled silently)" to "settled per option (a) — codec
relaxed; multi-record observed in production-stack tracing."

`design/followups.md`: F44's verdict updated to reflect the
contradiction-then-relaxation, with reference to the new tests +
fixtures.

Workspace 792 → 794 tests pass; clippy clean; rustdoc clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 05:27:11 -04:00
..

M6 buffered evidence — round-trip fixtures

Wire-byte fixtures cited in docs/M6-buffered-evidence.md (F44 evidence walk of buffered/Suspend captures 077, 079-082, 094). Each .bin is the inner body of an NMX subscription callback message (post-46-byte transfer envelope) copied verbatim from the named capture's frida-events.tsv.

File Source Content
094-line145-datatupdate-recordcount2.bin captures/094-frida-buffered-separate-writer/frida-events.tsv:145 0x33 DataUpdate, record_count = 2, Int32 records. Truncated by Frida 4 bytes shy of inner_length=61 — record 2's value bytes are absent. The decoder accepts this and records record 2's value = None.
094-line48-datatupdate-recordcount2-status.bin captures/094-frida-buffered-separate-writer/frida-events.tsv:48 0x32 SubscriptionStatus, record_count = 2, the supervisory advise reply that established the buffered subscription. Two records, both Int32. Reference shape for the multi-record path.

The fixtures exist to:

  1. Demonstrate the F44 walk's evidence is reachable from the test harness without requiring access to the full capture tree.
  2. Round-trip through NmxSubscriptionMessage::parse_inner in unit tests (subscription_message::tests::data_update_capture_094_truncated_record_errors asserts the F44 contradiction of R2; data_update_multi_record_round_trip covers the typed multi-record decode path that landed with F44).

Bytes are stored as raw binary, no metadata. The TSV row offsets in the source column are the canonical citations.