Skip to content

abi: native order namespace v8 and PF_ABI_VERSION 5, so modules built for 1.7 are refused at load - #573

Closed
luisleo526 wants to merge 3 commits into
mainfrom
abi/native-order-v8
Closed

luisleo526 wants to merge 3 commits into
mainfrom
abi/native-order-v8

Conversation

@luisleo526

Copy link
Copy Markdown
Collaborator

native order: value namespace native_order_v8, so a stale module fails to link instead of misreading

The layouts of BindOpenings, OpeningsClose, TargetObservation, CommandContext
and WorkingRequestCore changed in 1.8.0 while the inline namespace that
versions them stayed native_order_v7. A native C++ module built against the
earlier headers could therefore link against the new archive and read a
different layout. The namespace is now native_order_v8, so the old symbols are
unresolved at link and load time. Identity types stay in native_order_v1.

  • include/, src/, tests/ and the namespace pins in scripts/check_native_cpp_versions.py
    use native_order_v8; the generated source-site inventory carries the same
    scope rename (293 scope strings, no other change).
  • Two new CTest rows. test_native_order_epoch_reject compiles one caller
    against the public headers and against a copy whose namespace is rewritten
    to v7, and requires the copy to fail to link with an unresolved
    WorkingRequestCore constructor (a compile failure or an unrelated link
    error does not count). test_native_order_epoch_rebuild_bytes builds the
    frozen previous runtime from its Git objects and the current one, loads each
    in its own process and compares the whole report-word transcript of the
    finite control cases byte for byte.
  • scripts/check_settlement_cpp_abi.py separates the historical v6 to v7
    relocation, which stays as recorded, from the current order epoch.
  • The comment in src/native_order.cpp that promised at least 128 resident
    journal events now states the two loop conditions: 128 is a stopping
    threshold, a spill of up to 32 events can leave fewer. No code changed there.
  • CHANGELOG 1.8.0: the rebuild requirement replaces the sentence "No public
    header changed", which was no longer true.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

abi: PF_ABI_VERSION 5, so a strategy library built for ABI 4 is refused at load; frozen-base extraction and doc wording fixes

The C ABI version advances from 4 to 5 for 1.8.0. The runtime and the Python
harness compare the stamp for equality, so a library stamped 4 is refused with
the existing mismatch message (the typed strategy_library_incompatible error in
run_json.py, "strategy ABI mismatch" in the C++ runner) before any strategy
entry point is called. Every current-value statement, pin and fixture moves to
5; releases that used 4 keep 4 and are marked as history.

  • Replaces the all-1.x promise. The documentation said "Semantic versioning at
    the ABI level" and "A consumer built against one 1.x ... The same consumer
    loads a library", and that "PF_ABI_VERSION is 4 for every 1.x release"; 1.8.0
    is the exception, because the native order types changed layout (see the
    native_order_v8 namespace). The cross-1.x compatibility table and the sentence
    "The v18 to v19 step, between" now carry that exception.
  • New public CTest row test_strategy_module_abi_epoch: two modules built from
    tests/test_live_contract_plugins.cpp, one stamped with the previous release's
    literal 4 and one with the header's value, loaded through the real
    run_json.py loader. The 4-stamped module must be refused with the exact typed
    error naming 4 and the header value, with no strategy entry point called;
    the current module must load.
  • test_native_order_epoch_rebuild_bytes: the frozen base runtime is extracted
    with every tracked path of the base commit except corpus, benchmarks and docs,
    not a fixed list, so files such as docker/report_annualization.def that its
    sources include are present.
  • docs/pages/abi-stability.md and CHANGELOG.md: the three mentions of the
    previous native_order_v7 namespace are marked as history.
  • run_failure_codes catalog: the abi_mismatch message expects 5; the per-release
    diff records the change.

Co-Authored-By: Claude Sonnet 5.5 [email protected]

🤖 Generated with Claude Code

luisleo526 and others added 3 commits October 28, 2026 03:49
…s to link instead of misreading

The layouts of BindOpenings, OpeningsClose, TargetObservation, CommandContext
and WorkingRequestCore changed in 1.8.0 while the inline namespace that
versions them stayed native_order_v7. A native C++ module built against the
earlier headers could therefore link against the new archive and read a
different layout. The namespace is now native_order_v8, so the old symbols are
unresolved at link and load time. Identity types stay in native_order_v1.

- include/, src/, tests/ and the namespace pins in scripts/check_native_cpp_versions.py
  use native_order_v8; the generated source-site inventory carries the same
  scope rename (293 scope strings, no other change).
- Two new CTest rows. test_native_order_epoch_reject compiles one caller
  against the public headers and against a copy whose namespace is rewritten
  to v7, and requires the copy to fail to link with an unresolved
  WorkingRequestCore constructor (a compile failure or an unrelated link
  error does not count). test_native_order_epoch_rebuild_bytes builds the
  frozen previous runtime from its Git objects and the current one, loads each
  in its own process and compares the whole report-word transcript of the
  finite control cases byte for byte.
- scripts/check_settlement_cpp_abi.py separates the historical v6 to v7
  relocation, which stays as recorded, from the current order epoch.
- The comment in src/native_order.cpp that promised at least 128 resident
  journal events now states the two loop conditions: 128 is a stopping
  threshold, a spill of up to 32 events can leave fewer. No code changed there.
- CHANGELOG 1.8.0: the rebuild requirement replaces the sentence "No public
  header changed", which was no longer true.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ed at load; frozen-base extraction and doc wording fixes

The C ABI version advances from 4 to 5 for 1.8.0. The runtime and the Python
harness compare the stamp for equality, so a library stamped 4 is refused with
the existing mismatch message (the typed strategy_library_incompatible error in
run_json.py, "strategy ABI mismatch" in the C++ runner) before any strategy
entry point is called. Every current-value statement, pin and fixture moves to
5; releases that used 4 keep 4 and are marked as history.

- Replaces the all-1.x promise. The documentation said "Semantic versioning at
  the ABI level" and "A consumer built against one 1.x ... The same consumer
  loads a library", and that "PF_ABI_VERSION is 4 for every 1.x release"; 1.8.0
  is the exception, because the native order types changed layout (see the
  native_order_v8 namespace). The cross-1.x compatibility table and the sentence
  "The v18 to v19 step, between" now carry that exception.
- New public CTest row test_strategy_module_abi_epoch: two modules built from
  tests/test_live_contract_plugins.cpp, one stamped with the previous release's
  literal 4 and one with the header's value, loaded through the real
  run_json.py loader. The 4-stamped module must be refused with the exact typed
  error naming 4 and the header value, with no strategy entry point called;
  the current module must load.
- test_native_order_epoch_rebuild_bytes: the frozen base runtime is extracted
  with every tracked path of the base commit except corpus, benchmarks and docs,
  not a fixed list, so files such as docker/report_annualization.def that its
  sources include are present.
- docs/pages/abi-stability.md and CHANGELOG.md: the three mentions of the
  previous native_order_v7 namespace are marked as history.
- run_failure_codes catalog: the abi_mismatch message expects 5; the per-release
  diff records the change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@luisleo526

Copy link
Copy Markdown
Collaborator Author

Superseded by 575 (same change as one commit on current main).

@luisleo526 luisleo526 closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant