Skip to content

Commit 5928e32

Browse files
committed
Freeze the v16 providers and capture the legacy-route oracle tests for the native lowering switch (R4-D L0)
Freeze the authentic ab9714b engine_script_run_v16/native_order_v4/native_run_spec_v1/native_driver_v4 provider and register frozen/live same-epoch ABI pairings. Capture literal legacy-route oracle translation units, the Appendix-C PendingIntentView schema, and its coverage validator. Contract rules: §0, P3, P6, P9, P10, P11, P12, P13, P15, §§3.3-3.6, and deferred-ANY P-DA1-P-DA7. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
1 parent ab9714b commit 5928e32

42 files changed

Lines changed: 12837 additions & 41 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/ci.md‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,29 +80,31 @@ No release tag or VERSION value is rewritten by verification.
8080

8181
The verifier fetches the pinned ABI commits `e60e571` (R2), `0e18690`
8282
(selected settlement, before exact reversal), `c3ed455` (native host v13),
83-
`f736676` (native host v14), and `e7cdf052` (the frozen v15 source-layer
84-
base) without tags only when each object is missing. It builds all five
83+
`f736676` (native host v14), `e7cdf052` (the frozen v15 source-layer base),
84+
and `ab9714b` (the frozen v16 adapter-lowering base) without tags only when
85+
each object is missing. It builds all six
8586
prepared static libraries with tests disabled, or validates and reuses
8687
their matching prepared receipts under `settlement-abi-base/`,
8788
`settlement-abi-prior/`, `native-abi-v13/`, `native-abi-v14/`, and
88-
`native-abi-v15-frozen/`. Compiler,
89+
`native-abi-v15-frozen/`, and `native-abi-v16-frozen/`. Compiler,
8990
configuration and version-source mismatches refuse reuse without deleting the old evidence.
9091
Each profile needs matching providers; a Mac Release archive cannot replace
9192
a Linux sanitizer build. CTest itself performs no network fetch.
92-
The full settlement matrix uses those five archives plus live v16. Its
93+
The full settlement matrix uses those six archives plus live v16. Its
9394
host/order matrix retains the historical v13/v14/v15 verdicts and requires
94-
both v15→v16 and v16→v15 rejection pairs; matching v16 callers/providers
95-
succeed. The unchanged driver v4 keeps its historical positive links where its
95+
both v15→v16 and v16→v15 rejection pairs, and frozen-v16 ↔ live-v16
96+
same-epoch positive pairs; matching v16 callers/providers succeed. The
97+
unchanged driver v4 keeps its historical positive links where its
9698
owner domain is unchanged. Current source callers authenticate the
9799
`pineforge-source-adapter/v1` domain, while the frozen v15 provider remains an
98100
immutable historical identity.
99101
The [ABI guide](../tests/fixtures/settlement_cpp_abi/README.md) describes the
100102
actual old/new library pairs and their immutable inputs.
101103

102-
CTest writes `settlement-abi-receipt.json` for the six-archive matrix and
104+
CTest writes `settlement-abi-receipt.json` for the seven-archive matrix and
103105
`native-abi-receipt.json` for native controls. The native receipt includes the
104-
active `v14_current_execution_shape_agnostic_compile`, frozen-v15 surface
105-
controls, and v16-current rejection controls against authenticated tar
106+
active `v14_current_execution_shape_agnostic_compile`, frozen-v15/frozen-v16
107+
surface controls, and v16-current rejection controls against authenticated tar
106108
closures. `CURRENT_TERMS_SURFACE_READY = True`: the complete current-execution,
107109
FX, and missing-Cancelled controls are active, and the good caller compiles
108110
before its intentional negative compile control. Ordinary compile failures

‎docs/pages/abi-stability.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,19 @@ values remain `native_order_v4`, the private consumer identity remains
128128
| --- | --- |
129129
| Live engine/host library | `engine_script_run_v16` |
130130
| `host-e7cdf05` immutable provider | `engine_script_run_v15` |
131+
| `host-ab9714b` immutable provider | `engine_script_run_v16` |
131132
| Source extension | `pineforge-source-adapter/v1` |
132133

133-
The current v16 archive is checked with five archived provider inputs: the real
134+
The current v16 archive is checked with six archived provider inputs: the real
134135
e60 R2 and 0e R3 providers, authenticated c3ed455 v13 and f736676 v14 host
135-
closures, and the immutable e7cdf05 v15 source-layer-base closure. The verifier
136+
closures, the immutable e7cdf05 v15 source-layer-base closure, and the
137+
immutable ab9714b v16 adapter-lowering-base closure. The verifier
136138
prepares real archives from immutable sources with the current profile's
137139
compiler and settings. Constructor/vtable, return-only `native_events()`, host
138140
observation, core request, driver and current-execution callers compile before
139141
links are interpreted. The v15↔v16 host/source pair is a required rejection in
140-
both directions; v16↔v16 succeeds. Existing historical v13/v14/v15 verdicts,
142+
both directions; the frozen ab9714b v16 ↔ live v16 pair is a required positive
143+
pairing in both directions. Existing historical v13/v14/v15 verdicts,
141144
including the unchanged driver-v4 positive links where applicable, remain
142145
required. No ABI caller executable is run.
143146

‎scripts/check_native_cpp_abi.py‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from check_aggregate_cpp_versions import clean
2323
from prepare_settlement_cpp_abi_base import (
2424
V14_COMMIT, V14_TREE, V15_FROZEN_COMMIT, V15_FROZEN_TREE,
25+
V16_FROZEN_COMMIT, V16_FROZEN_TREE,
2526
authenticate_headers, extract_tar,
2627
)
2728

@@ -47,6 +48,8 @@
4748
V14_ENGINE_EPOCH = "engine_script_run_v14"
4849
V15_FROZEN_HEADERS_SHA256 = "189a0e99ff60f7c9284243117fe501ebf9a9fb6269c787dad35957d0ca7a6ed3"
4950
V15_FROZEN_ENGINE_EPOCH = "engine_script_run_v15"
51+
V16_FROZEN_HEADERS_SHA256 = "1a1ab85239ce1bca9022f879ecc0e88c2ee0af719c74cdfe9d8e9d5aaada8d98"
52+
V16_FROZEN_ENGINE_EPOCH = "engine_script_run_v16"
5053
CURRENT_TERMS_SURFACE_READY = True
5154
CURRENT_RESULT_DIAGNOSTIC = "R4B_CURRENT_RESULT_ALTERNATIVES"
5255

@@ -336,6 +339,13 @@ def authenticate_v15_frozen_fixture(fixture: Path, destination: Path) -> dict:
336339
epoch=V15_FROZEN_ENGINE_EPOCH, label="v15")
337340

338341

342+
def authenticate_v16_frozen_fixture(fixture: Path, destination: Path) -> dict:
343+
return authenticate_host_fixture(
344+
fixture, destination, archive_sha256=V16_FROZEN_HEADERS_SHA256,
345+
commit=V16_FROZEN_COMMIT, tree=V16_FROZEN_TREE,
346+
epoch=V16_FROZEN_ENGINE_EPOCH, label="v16")
347+
348+
339349
def remove_current_result_cancelled(text: str) -> str:
340350
"""Remove just the appended result alternative; reject ambiguous mutations."""
341351
aliases = list(re.finditer(
@@ -693,6 +703,19 @@ def main() -> int:
693703
"files": v15_frozen_manifest["files"],
694704
"provider_epoch": V15_FROZEN_ENGINE_EPOCH,
695705
}
706+
v16_frozen_name = "host-ab9714b"
707+
v16_frozen_destination = root / v16_frozen_name
708+
v16_frozen_manifest = authenticate_v16_frozen_fixture(
709+
FIXTURE / v16_frozen_name, v16_frozen_destination)
710+
v16_frozen_include = v16_frozen_destination / "include"
711+
receipt["fixtures"][v16_frozen_name] = {
712+
"source_commit": v16_frozen_manifest["commit"],
713+
"source_tree": v16_frozen_manifest["tree"],
714+
"archive_sha256": V16_FROZEN_HEADERS_SHA256,
715+
"manifest_sha256": sha256((FIXTURE / v16_frozen_name / "manifest.json").read_bytes()),
716+
"files": v16_frozen_manifest["files"],
717+
"provider_epoch": V16_FROZEN_ENGINE_EPOCH,
718+
}
696719

697720
def compile_object(name, source, include_path, extra_source_dir=None):
698721
path = root / (name + ".cpp")
@@ -803,6 +826,12 @@ def link(name, objects, runtime, missing=None):
803826
current_host_events = compile_object("current_host_events_caller", HOST_EVENTS_CALLER, include)
804827
current_execution = compile_object("current_execution_caller",
805828
render_current_execution_caller("engine_script_run_v16"), include)
829+
# The frozen L0 provider has the same published epoch and must accept
830+
# every current caller at compile time. Link-time pairing with its
831+
# real archive is enforced in the settlement matrix.
832+
compile_object("v16_frozen_host_caller", HOST_CALLER, v16_frozen_include)
833+
compile_object("v16_frozen_current_execution_caller",
834+
render_current_execution_caller("engine_script_run_v16"), v16_frozen_include)
806835
compile_object("v14_current_execution_shape_agnostic_compile",
807836
render_current_execution_caller(V14_ENGINE_EPOCH), v14_include)
808837
current_surface = current_fx_curve = None

‎scripts/check_native_cpp_versions.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ def authenticate_historical_host_manifests(root=ROOT, providers=PROVIDERS):
187187
manifests = {}
188188
with tempfile.TemporaryDirectory(prefix='.native-fx-introduced-', dir=root) as temporary:
189189
for label, provider in providers.items():
190-
if provider['engine_epoch'] == 'engine_script_run_v15':
190+
# v15 is the old source-layer provider and frozen v16 is the
191+
# same-epoch L0 pairing control. Neither can establish when the
192+
# current FX value was introduced.
193+
if provider['engine_epoch'] in ('engine_script_run_v15', 'engine_script_run_v16'):
191194
continue
192195
manifest_path = provider['manifest']
193196
if not manifest_path.parent.name.startswith('host-'):

‎scripts/check_settlement_cpp_abi.py‎

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22
"""Actual old/new settlement ABI pairings. Compile and link; NEVER run callers.
33
4-
Requires separately prepared real e60 R2, 0e R3, v13, v14 and frozen-v15 archives. No Git/network/build fallback
4+
Requires separately prepared real e60 R2, 0e R3, v13, v14, frozen-v15 and frozen-v16 archives. No Git/network/build fallback
55
is performed by this CTest-time checker. Existing native/script ABI guards stay
66
separate and mandatory, including their old epoch and sanitizer RTTI controls.
77
"""
@@ -741,6 +741,8 @@ def main() -> int:
741741
parser.add_argument('--v14-receipt', type=Path, help='prepared real f736676 epoch 14 provider; mandatory in full matrix')
742742
parser.add_argument('--v15-frozen-receipt', type=Path,
743743
help='prepared real e7cdf052 frozen epoch 15 provider; mandatory in full matrix')
744+
parser.add_argument('--v16-frozen-receipt', type=Path,
745+
help='prepared real ab9714b frozen epoch 16 provider; mandatory in full matrix')
744746
parser.add_argument('--base-generated-include', type=Path)
745747
parser.add_argument('--extra-flag', action='append', default=[])
746748
parser.add_argument('--receipt', type=Path, required=True)
@@ -826,6 +828,21 @@ def main() -> int:
826828
v15_frozen_members,v15_frozen_shape = frozen_shape(
827829
v15_frozen_include,include,selected=True)
828830
report['v15FrozenShape']=v15_frozen_shape
831+
v16_frozen_library,v16_frozen_include,v16_frozen_generated,v16_frozen_receipt = load_provider(
832+
args,scratch/'v16-frozen',cache,args.v16_frozen_receipt,PROVIDERS['v16-frozen'],
833+
# R4-C relocated the source-only private helpers out of
834+
# BacktestEngine before this v16 capture. The frozen
835+
# provider must expose the complete generic settlement
836+
# surface, but must not be mislabeled as a v15 base that
837+
# still owns `add_to_pyramid_market`-style source helpers.
838+
expect_present=(*OLD_METHODS,*NEW_METHODS,*REVERSAL_METHODS),
839+
expect_absent=())
840+
report['v16Frozen']={'receiptSha256':identity(args.v16_frozen_receipt)['sha256'],
841+
'archiveSha256':identity(v16_frozen_library)['sha256'],
842+
'commit':v16_frozen_receipt['commit'],'tree':v16_frozen_receipt['tree']}
843+
v16_frozen_members,v16_frozen_shape = frozen_shape(
844+
v16_frozen_include,include,selected=True)
845+
report['v16FrozenShape']=v16_frozen_shape
829846

830847
def compile_tu(name,text,headers,generated):
831848
# Each caller must name its actual header epoch, including return-only APIs.
@@ -856,11 +873,18 @@ def link(name,obj,runtime,missing=(),domain=None,engine=ENGINE, symbol_missing=N
856873

857874
def compare_layout(name,headers,generated,layout_members,shape,*,selected=False):
858875
relocation_layout = bool(shape['relocationLayout'])
876+
# Spell PendingOrder according to *each* provider's genuine
877+
# ownership. Pre-v16 archives have the engine type; v15 and
878+
# the frozen/live same-epoch v16 pair own it in source/.
879+
# `relocation_layout` independently controls which engine
880+
# storage words are compared across the reviewed bridge.
881+
old_source_pending = (headers / 'pineforge/source/pine_pending_intent.hpp').is_file()
882+
current_source_pending = (include / 'pineforge/source/pine_pending_intent.hpp').is_file()
859883
old_text,word_count = layout_source(
860884
layout_members, selected=selected,
861-
relocation_layout=relocation_layout)
885+
source_pending=old_source_pending, relocation_layout=relocation_layout)
862886
current_text,current_word_count = layout_source(
863-
layout_members, selected=selected, source_pending=relocation_layout,
887+
layout_members, selected=selected, source_pending=current_source_pending,
864888
relocation_layout=relocation_layout)
865889
if current_word_count != word_count:
866890
raise RuntimeError('v15/v16 source-layout rows have different widths')
@@ -890,6 +914,9 @@ def compare_layout(name,headers,generated,layout_members,shape,*,selected=False)
890914
report['v15FrozenLayout']=compare_layout(
891915
'v15-frozen',v15_frozen_include,v15_frozen_generated,
892916
v15_frozen_members,v15_frozen_shape,selected=True)
917+
report['v16FrozenLayout']=compare_layout(
918+
'v16-frozen',v16_frozen_include,v16_frozen_generated,
919+
v16_frozen_members,v16_frozen_shape,selected=True)
893920
if not args.base_only:
894921
current_header=clean((include/'pineforge/engine.hpp').read_text())
895922
for method in (*NEW_METHODS,*(REVERSAL_METHODS if full_matrix else ())):
@@ -941,6 +968,7 @@ def compare_layout(name,headers,generated,layout_members,shape,*,selected=False)
941968
'v13': (v13_library, v13_include, v13_generated),
942969
'v14': (v14_library, v14_include, v14_generated),
943970
'v15-frozen': (v15_frozen_library, v15_frozen_include, v15_frozen_generated),
971+
'v16-frozen': (v16_frozen_library, v16_frozen_include, v16_frozen_generated),
944972
current_label: (library, include, args.generated_include),
945973
}
946974
report['archiveProviders'] = {
@@ -968,7 +996,7 @@ def compare_layout(name,headers,generated,layout_members,shape,*,selected=False)
968996
link(caller+'-'+name+'-'+provider+('-real' if positive else '-rejected'),
969997
obj,runtime,engine='pineforge::'+engine_epoch(native_providers[caller][1])+'::BacktestEngine::',
970998
symbol_missing=None if positive else needle)
971-
for caller in ('v14', current_label):
999+
for caller in ('v14', 'v16-frozen', current_label):
9721000
_,headers,generated = native_providers[caller]
9731001
epoch = engine_epoch(headers)
9741002
caller_engine = 'pineforge::'+epoch+'::BacktestEngine::'
@@ -1005,7 +1033,7 @@ def compare_layout(name,headers,generated,layout_members,shape,*,selected=False)
10051033
}
10061034
engine_objects = {current_label: {
10071035
'selected':new, 'reversal':reversal}}
1008-
for caller in ('v13','v14','v15-frozen'):
1036+
for caller in ('v13','v14','v15-frozen','v16-frozen'):
10091037
_,headers,generated = native_providers[caller]
10101038
engine_objects[caller] = {name:compile_tu(caller+'-engine-'+name,text,headers,generated)
10111039
for name,text in engine_callers.items()}
@@ -1022,10 +1050,13 @@ def compare_layout(name,headers,generated,layout_members,shape,*,selected=False)
10221050
required_v15_v16_rows = {
10231051
'v15-frozen-engine-old-api-'+current_label+'-rejected',
10241052
current_label+'-engine-selected-v15-frozen-rejected',
1053+
'v16-frozen-host-'+current_label+'-real',
1054+
current_label+'-engine-selected-v16-frozen-real',
1055+
'v16-frozen-engine-selected-'+current_label+'-real',
10251056
}
10261057
actual_rows = {entry['name'] for entry in report['links']}
10271058
if not required_v15_v16_rows <= actual_rows:
1028-
raise RuntimeError('v15/v16 rejection pairs are missing from the ABI matrix')
1059+
raise RuntimeError('required v15/v16 rejection or same-epoch v16 pairs are missing from the ABI matrix')
10291060
link('old-api-old-real',old,old_library)
10301061
link('old-private-old-real',private_old,old_library)
10311062
link('old-events-old-real',old_events,old_library)

‎scripts/ci_verify.py‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""Shared local/CI verification driver. Stdlib only. Not a command generator.
33
44
Profiles: release, debug, sanitizers, native. Default build dir build-ci-PROFILE.
5-
Source guards, explicit configure, full rebuild, pinned e60/0e/v13/v14 ABI prepare/reuse,
5+
Source guards, explicit configure, full rebuild, pinned e60/0e/v13/v14/v15/v16 ABI prepare/reuse,
66
CTest, install+find_package+VERSION smoke, native help / required WebSocket.
77
Fail fast on configure/build. After a successful build collect independent
88
CTest and package failures in the same run. Never deletes source, tests, or
@@ -348,6 +348,7 @@ def __init__(self, cfg: VerifyConfig):
348348
self.abi_v13_action = 'not-started'
349349
self.abi_v14_action = 'not-started'
350350
self.abi_v15_frozen_action = 'not-started'
351+
self.abi_v16_frozen_action = 'not-started'
351352
self.summary: dict = {
352353
'schemaVersion': SCHEMA,
353354
'status': 'incomplete',
@@ -371,6 +372,7 @@ def __init__(self, cfg: VerifyConfig):
371372
'abiV13': {'action': self.abi_v13_action},
372373
'abiV14': {'action': self.abi_v14_action},
373374
'abiV15Frozen': {'action': self.abi_v15_frozen_action},
375+
'abiV16Frozen': {'action': self.abi_v16_frozen_action},
374376
'stages': self.stages,
375377
'failures': self.failures,
376378
}
@@ -381,6 +383,7 @@ def write_summary(self) -> None:
381383
self.summary['abiV13'] = {'action': self.abi_v13_action}
382384
self.summary['abiV14'] = {'action': self.abi_v14_action}
383385
self.summary['abiV15Frozen'] = {'action': self.abi_v15_frozen_action}
386+
self.summary['abiV16Frozen'] = {'action': self.abi_v16_frozen_action}
384387
self.summary['actualVersion'] = self.actual_version
385388
self.summary['stages'] = self.stages
386389
self.summary['failures'] = self.failures
@@ -554,6 +557,15 @@ def ensure_abi_v15_frozen(self) -> None:
554557
'--header-manifest', str(manifest)],
555558
stage='abi-v15-frozen', fetch_stage='abi-v15-frozen-fetch')
556559

560+
def ensure_abi_v16_frozen(self) -> None:
561+
provider = PROVIDERS['v16-frozen']
562+
manifest = self.cfg.source / provider['manifest'].relative_to(ROOT)
563+
self.abi_v16_frozen_action = self.ensure_prepared_provider(
564+
self.cfg.build_dir / provider['default_output'], provider['commit'], provider['tree'],
565+
extra_argv=['--commit', provider['commit'], '--tree', provider['tree'],
566+
'--header-manifest', str(manifest)],
567+
stage='abi-v16-frozen', fetch_stage='abi-v16-frozen-fetch')
568+
557569
def ensure_prepared_provider(self, output: Path, commit: str, tree: str, *,
558570
extra_argv: list[str], stage: str, fetch_stage: str) -> str:
559571
prepare = [
@@ -715,6 +727,7 @@ def run(self) -> int:
715727
self.ensure_abi_v13()
716728
self.ensure_abi_v14()
717729
self.ensure_abi_v15_frozen()
730+
self.ensure_abi_v16_frozen()
718731

719732
ctest = ['ctest', '--test-dir', str(self.cfg.build_dir),
720733
'--output-on-failure', '--no-tests=error', '--parallel', str(self.cfg.jobs)]

‎scripts/collect_ci_diagnostics.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
"native-abi-v15-frozen/receipt.json": "native-abi-v15-frozen-receipt.json",
2929
"native-abi-v15-frozen/configure.log": "native-abi-v15-frozen-configure.log",
3030
"native-abi-v15-frozen/build.log": "native-abi-v15-frozen-build.log",
31+
"native-abi-v16-frozen/receipt.json": "native-abi-v16-frozen-receipt.json",
32+
"native-abi-v16-frozen/configure.log": "native-abi-v16-frozen-configure.log",
33+
"native-abi-v16-frozen/build.log": "native-abi-v16-frozen-build.log",
3134
"settlement-abi-receipt.json": "settlement-abi-receipt.json",
3235
"native-abi-receipt.json": "native-abi-receipt.json",
3336
}

0 commit comments

Comments
 (0)