Skip to content

test: validate five-language truck interoperability (A5) - #127

Merged
ip332 merged 4 commits into
mainfrom
feat/103-interop-matrix
Nov 21, 2026
Merged

ip332 merged 4 commits into
mainfrom
feat/103-interop-matrix

Conversation

@ip332

@ip332 ip332 commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

Closes #103

Adds a reproducible black-box matrix in which C99, C++ owning, C++/C storage, Python and Go each produce actual BRF files, and every consumer checks every populated/default field and re-encodes those files byte for byte. All truck bindings come from the unchanged authoritative examples/truck/schemas/configuration.brd root. Expected IDs and values are explicit public-contract fixtures; no compiler layout or identity implementation is an oracle.

Producer / consumer C99 C++ owning C++/C storage Python Go
C99 PASS PASS PASS PASS PASS
C++ owning PASS PASS PASS PASS PASS
C++/C storage PASS PASS PASS PASS PASS
Python PASS PASS PASS PASS PASS
Go PASS PASS PASS PASS PASS

Coverage and controls

  • Eight truck records, populated/default cases, signed/unsigned scalars, booleans, bounded strings and distinct two-element record arrays. The enum companion fixture runs through the same complete grid without changing the truck schema. In total, 295 top-level/extracted streams produce 1,475 consumer checks.
  • GearState → EngineStatus → Timestamp, VehicleSnapshot → GearState → EngineStatus and deeper paths through fault arrays. Every actual nested span and record-array element is extracted through the existing C generic view, compared with an independently encoded standalone record, and delivered to every generated decoder with the correct expected mapping.
  • Generic C/Python checks and the inspector cover populated/default fixtures in minimal and reflective QBS modes. Python checks every producer; C extracts/checks each producer's minimal streams. Representative inspector streams must match every producer's bytes. The C++ QBS probe verifies EngineStatus, timestamps and fault-array values from every producer in both modes.
  • Full truck schema_id 9200ca494f010801b830d0857cf66dde agrees across all five generated bindings, --print-schema-id, --describe, and both QBS images. It remains separate from native per-namespace gid.
  • Replacing only a generated common dependency with revision B must trigger the explicit configuration guard in every language. Separate wire-identical field-renaming fixtures must trigger native gid guards while retaining schema_id.
  • Mapping-specific legacy RC3 local IDs are rejected by every generated consumer and the inspector; an additional legacy nested ID is rejected while its parent's current ID remains intact. No universal assertion about all IDs below 0x00010000 is introduced.
  • Truncation, trailing bytes, invalid UTF-8 and unknown enum values are rejected by all five generated decoders, generic C/Python and both inspector modes.
  • Repeated generation and output-directory changes produce identical files. Selected/full generation agrees on shared outputs. Import reordering, selection and prefixing preserve hierarchical IDs, full schema_id and both complete QBS byte streams. Every populated/default truck producer fixture is also encoded through prefixed APIs and compared byte for byte. Additional native verification through the retained prefixed consumers passed 59 streams per variant (including nested cutouts), all 16 own populated/default truck files per variant, eight matching error-exit cases per variant, and two applicable valid mutation controls per variant.
  • Reuses public_examples_test for the A4.5 A/B application in all five variants: each revision decodes its own bytes, EngineStatus retains 0x00050001, and revision B's MirrorFold has 0x00030002.

Mutation evidence

Injection Intended assertion
Altered record header ID Current expected generated record mapping rejects it in every consumer.
Valid changed field values Every consumer accepts the new expected values, then fails the matrix's original value checks.
Changed observed 128-bit configuration identity The same metadata equality assertion used for actual generated accessors fails for every binding.
Valid Timestamp delivered to an EngineStatus cell Correct Timestamp consumption succeeds; the misrouted producer/consumer combination fails.

Negative controls require their expected normal error exits; signals and runtime-fault diagnostics cannot count as rejection. Mutation results and consumer diagnostics are retained in report.json; these do not rely on unrelated compilation errors. The configuration-import and gid compilation failures above are additional independent controls.

Validation

Final head: 875c277a8a2489be0089bc201a072296c7943410.

  • Native exact-commit scripts/quarry-validate validate HEAD: 72/72 CTest entries passed; 526.1 seconds including configure/build/CTest (CTest: 519.63 seconds), with two build/test slots and GOMAXPROCS=2.
  • Strict generated C99 / C++20: -Wall -Wextra -Wpedantic -Wshadow -Werror.
  • Linux GCC complete CTest: 72/72 passed, 398.24 seconds; matrix 16.62 seconds.
  • Linux Clang 18.1.3 targeted matrix, including a Clang-built C runtime and C++ QBS probe: all 25 cells passed, 1,475 fixture checks, no skips; 17.322 seconds.
  • All commit hooks enabled. Delivery uses scripts/quarry-validate push.

The final-head CI artifact contains reports, command logs and exchanged BRF streams. The matrix prints the readable grid and writes fixture-level expected/observed IDs, byte/decode outcomes, toolchain/runtime availability, skip reasons, mutations and wall time to build/*/interop-matrix/report.json (or the explicit work directory). CI requires all five variants, gives the host runner ownership of Docker-created evidence before upload, uploads reports/command logs/BRF streams, and executes a separate Clang 18 matrix. Added native matrix time: 34.77 seconds in the final two-slot native suite. Linux GCC adds 16.62 seconds for the matrix; Clang 18 adds 17.322 seconds for the matrix and about 42 seconds for its complete configure/build/matrix step. Coverage passed 67/67 entries in 193.14 seconds. Final-head Cortex-M, artifact upload, GCC LTO and clang-tidy all passed. The new C++ probe has zero clang-tidy diagnostics; optional views are unwrapped through an explicit shared presence guard. A previous local run timed out across a confirmed 25-minute macOS thermal-emergency sleep; the unchanged suite passed after reducing CPU concurrency.

Boundaries and remaining limitations

Nine files change: matrix driver/adapters/model/configuration checks, the C++ generic probe, matrix README, enum fixture, CTest registration and CI wiring. Compiler backends, runtime sources/APIs/epochs, formats, IR, record allocation and both identity encodings are unchanged. The experimental FQN-hash branch is preserved.

Python/Go have configuration guards but no native per-namespace gid API; that capability is reported N/A, not invented or counted as a passing gid test. Missing Go yields explicit SKIP cells locally; CI's require-all mode makes it fatal. No matrix rows are skipped in the reported five-toolchain runs. The C++ QBS probe uses the existing source-tree tooling API, not a new installed runtime surface. Source-file equality after reordered imports is intentionally not required (#90). This targeted Clang 18 run does not claim to resolve the unrelated full-suite issue #85. General C renaming #119, A6 and release publication remain out of scope.

@ip332 ip332 added this to the v0.1.31-rc.1 milestone Nov 21, 2026 — with ChatGPT Codex Connector
@ip332 ip332 added stage-a Stage A of record identity and schema discovery; required for v0.1.31-rc.1 area: tests Test suites, fixtures and conformance matrices labels Nov 21, 2026 — with ChatGPT Codex Connector
@ip332
ip332 marked this pull request as ready for review November 21, 2026 21:45
@ip332
ip332 merged commit 2a9aafd into main Nov 21, 2026
5 checks passed
@ip332
ip332 deleted the feat/103-interop-matrix branch November 21, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: tests Test suites, fixtures and conformance matrices stage-a Stage A of record identity and schema discovery; required for v0.1.31-rc.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A5: Comprehensive cross-language interoperability validation

1 participant