Skip to content

Commit a8080a0

Browse files
luisleo526claude
andcommitted
Freeze the v15 host provider and add the source-layer relocation tooling (R4-C L0)
Freeze the e7cdf05 v15 host closure and extend the real provider matrix with same-epoch v15 pairing controls. Add the native include-independence fail-before checker, its tooling tests, and the relocation-proof handoff tooling. Contract: §6.1, §6.5, §8.1, §8.9. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_016iF71UAEuQ7F6eqWgecAHm
1 parent e7cdf05 commit a8080a0

18 files changed

Lines changed: 1008 additions & 77 deletions

‎docs/ci.md‎

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,33 +75,34 @@ separate. Git tags and checkout depth cannot change the smoke-test expectation.
7575
Ordinary CMake builds retain `AUTO`, the existing git-describe-first behavior.
7676
No release tag or VERSION value is rewritten by verification.
7777

78-
The verifier fetches the pinned historical ABI commits `e60e571` (R2),
79-
`0e18690` (selected settlement, before exact reversal), `c3ed455` (native
80-
host v13), and `f736676` (native host v14) without tags only when each object
81-
is missing. It builds all four full historical static libraries with tests
82-
disabled, or validates and reuses
78+
The verifier fetches the pinned ABI commits `e60e571` (R2), `0e18690`
79+
(selected settlement, before exact reversal), `c3ed455` (native host v13),
80+
`f736676` (native host v14), and `e7cdf052` (the frozen v15 source-layer
81+
base) without tags only when each object is missing. It builds all five
82+
prepared static libraries with tests disabled, or validates and reuses
8383
their matching prepared receipts under `settlement-abi-base/`,
84-
`settlement-abi-prior/`, `native-abi-v13/`, and `native-abi-v14/`. Compiler,
84+
`settlement-abi-prior/`, `native-abi-v13/`, `native-abi-v14/`, and
85+
`native-abi-v15-frozen/`. Compiler,
8586
configuration and version-source mismatches refuse reuse without deleting the old evidence.
8687
Each profile needs matching providers; a Mac Release archive cannot replace
8788
a Linux sanitizer build. CTest itself performs no network fetch.
88-
The full settlement matrix uses these four archives plus current v15. Its
89+
The full settlement matrix uses those five archives plus live v15. Its
8990
host/order matrix rejects cross-epoch links among v13, v14 and v15; the
9091
unchanged driver v4 requires positive links in both v14→v15 and v15→v14
91-
directions. Current-execution callers compile only from v14 and v15 headers.
92+
directions, while frozen v15 and live v15 positively pair in every matching
93+
owner domain. Current-execution callers compile from v14 and both v15 header
94+
closures.
9295
The [ABI guide](../tests/fixtures/settlement_cpp_abi/README.md) describes the
9396
actual old/new library pairs and their immutable inputs.
9497

95-
CTest writes `settlement-abi-receipt.json` for the five-archive matrix and
98+
CTest writes `settlement-abi-receipt.json` for the six-archive matrix and
9699
`native-abi-receipt.json` for native controls. The native receipt includes the
97-
active `v14_current_execution_shape_agnostic_compile` against the authenticated
98-
frozen v14 tar closure. During native-terms phase 0 through phase 1b,
99-
`CURRENT_TERMS_SURFACE_READY = False` retains the complete
100-
`CURRENT_EXECUTION_V15_CALLER` and `NATIVE_FX_CURVE_CALLER` templates as pending
101-
surface rows. The named good v15 compile and missing-Cancelled compile rejection
102-
also remain pending. Phase 1c activates every row with the actual host surface;
103-
the good caller must compile before its intentional negative compile control.
104-
Ordinary compile failures remain failures, separate from ABI link rejections.
100+
active `v14_current_execution_shape_agnostic_compile` and the frozen-v15
101+
surface controls against authenticated tar closures. `CURRENT_TERMS_SURFACE_READY = True`:
102+
the complete current-execution, FX, and missing-Cancelled controls are
103+
active, and the good caller compiles before its intentional negative compile
104+
control. Ordinary compile failures remain failures, separate from ABI link
105+
rejections.
105106

106107
## Failure evidence
107108

‎scripts/check_native_cpp_abi.py‎

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
from check_native_cpp_versions import FILES, check as check_native_versions
2222
from check_aggregate_cpp_versions import clean
2323
from prepare_settlement_cpp_abi_base import (
24-
V14_COMMIT, V14_TREE, authenticate_headers, extract_tar,
24+
V14_COMMIT, V14_TREE, V15_FROZEN_COMMIT, V15_FROZEN_TREE,
25+
authenticate_headers, extract_tar,
2526
)
2627

2728
ROOT = Path(__file__).resolve().parents[1]
@@ -44,6 +45,8 @@
4445

4546
V14_HEADERS_SHA256 = "37e9340e0a985db118006e7e3b265e0191445285ce5e8fd8fc77f1578275e28e"
4647
V14_ENGINE_EPOCH = "engine_script_run_v14"
48+
V15_FROZEN_HEADERS_SHA256 = "189a0e99ff60f7c9284243117fe501ebf9a9fb6269c787dad35957d0ca7a6ed3"
49+
V15_FROZEN_ENGINE_EPOCH = "engine_script_run_v15"
4750
CURRENT_TERMS_SURFACE_READY = True
4851
CURRENT_RESULT_DIAGNOSTIC = "R4B_CURRENT_RESULT_ALTERNATIVES"
4952

@@ -292,30 +295,47 @@ def control_applicability(ready: bool | None = None) -> list[dict]:
292295
"CURRENT_EXECUTION_V15_CALLER", "engine_script_run_v15"),
293296
("v15_native_fx_curve_surface_compile", "compile", ready,
294297
"NATIVE_FX_CURVE_CALLER", "engine_script_run_v15"),
298+
("v15_frozen_current_execution_surface_compile", "compile", ready,
299+
"CURRENT_EXECUTION_V15_CALLER", V15_FROZEN_ENGINE_EPOCH),
300+
("v15_frozen_native_fx_curve_surface_compile", "compile", ready,
301+
"NATIVE_FX_CURVE_CALLER", V15_FROZEN_ENGINE_EPOCH),
295302
)
296303
return [{"name": name, "kind": kind, "applicable": bool(applicable),
297304
"status": "required" if applicable else "pending_surface",
298305
"template": template, "provider_epoch": epoch}
299306
for name, kind, applicable, template, epoch in controls]
300307

301308

302-
def authenticate_v14_fixture(fixture: Path, destination: Path) -> dict:
303-
"""Authenticate the pinned tar closure independently of gzip-JSON fixtures."""
309+
def authenticate_host_fixture(fixture: Path, destination: Path, *, archive_sha256: str,
310+
commit: str, tree: str, epoch: str, label: str) -> dict:
311+
"""Authenticate a pinned host tar closure independently of gzip-JSON fixtures."""
304312
archive = (fixture / "headers.tar").read_bytes()
305-
if sha256(archive) != V14_HEADERS_SHA256:
306-
raise RuntimeError("frozen v14 header archive digest mismatch")
313+
if sha256(archive) != archive_sha256:
314+
raise RuntimeError("frozen " + label + " header archive digest mismatch")
307315
extract_tar(archive, destination)
308-
manifest = authenticate_headers(destination, fixture / "manifest.json",
309-
commit=V14_COMMIT, tree=V14_TREE)
316+
manifest = authenticate_headers(destination, fixture / "manifest.json", commit=commit, tree=tree)
310317
for name in ("engine.hpp", "native_host.hpp"):
311318
text = (destination / "include/pineforge" / name).read_text()
312319
epochs = set(re.findall(r"\binline\s+namespace\s+(engine_script_run_v\d+)\s*\{",
313320
clean(text)))
314-
if epochs != {V14_ENGINE_EPOCH}:
315-
raise RuntimeError("frozen v14 header owner mismatch: " + name)
321+
if epochs != {epoch}:
322+
raise RuntimeError("frozen " + label + " header owner mismatch: " + name)
316323
return manifest
317324

318325

326+
def authenticate_v14_fixture(fixture: Path, destination: Path) -> dict:
327+
return authenticate_host_fixture(
328+
fixture, destination, archive_sha256=V14_HEADERS_SHA256,
329+
commit=V14_COMMIT, tree=V14_TREE, epoch=V14_ENGINE_EPOCH, label="v14")
330+
331+
332+
def authenticate_v15_frozen_fixture(fixture: Path, destination: Path) -> dict:
333+
return authenticate_host_fixture(
334+
fixture, destination, archive_sha256=V15_FROZEN_HEADERS_SHA256,
335+
commit=V15_FROZEN_COMMIT, tree=V15_FROZEN_TREE,
336+
epoch=V15_FROZEN_ENGINE_EPOCH, label="v15")
337+
338+
319339
def remove_current_result_cancelled(text: str) -> str:
320340
"""Remove just the appended result alternative; reject ambiguous mutations."""
321341
aliases = list(re.finditer(
@@ -660,6 +680,19 @@ def main() -> int:
660680
"manifest_sha256": sha256((FIXTURE / v14_name / "manifest.json").read_bytes()),
661681
"files": v14_manifest["files"], "provider_epoch": V14_ENGINE_EPOCH,
662682
}
683+
v15_frozen_name = "host-e7cdf05"
684+
v15_frozen_destination = root / v15_frozen_name
685+
v15_frozen_manifest = authenticate_v15_frozen_fixture(
686+
FIXTURE / v15_frozen_name, v15_frozen_destination)
687+
v15_frozen_include = v15_frozen_destination / "include"
688+
receipt["fixtures"][v15_frozen_name] = {
689+
"source_commit": v15_frozen_manifest["commit"],
690+
"source_tree": v15_frozen_manifest["tree"],
691+
"archive_sha256": V15_FROZEN_HEADERS_SHA256,
692+
"manifest_sha256": sha256((FIXTURE / v15_frozen_name / "manifest.json").read_bytes()),
693+
"files": v15_frozen_manifest["files"],
694+
"provider_epoch": V15_FROZEN_ENGINE_EPOCH,
695+
}
663696

664697
def compile_object(name, source, include_path, extra_source_dir=None):
665698
path = root / (name + ".cpp")
@@ -778,6 +811,10 @@ def link(name, objects, runtime, missing=None):
778811
CURRENT_EXECUTION_V15_CALLER, include)
779812
current_fx_curve = compile_object("v15_native_fx_curve_surface_compile",
780813
NATIVE_FX_CURVE_CALLER, include)
814+
compile_object("v15_frozen_current_execution_surface_compile",
815+
CURRENT_EXECUTION_V15_CALLER, v15_frozen_include)
816+
compile_object("v15_frozen_native_fx_curve_surface_compile",
817+
NATIVE_FX_CURVE_CALLER, v15_frozen_include)
781818
# The unmodified V15 probe above must compile before this mutation is meaningful.
782819
mutated_include = root / "missing-cancelled-include"
783820
shutil.copytree(include, mutated_include)

‎scripts/check_native_cpp_versions.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,16 @@ def check_fx_curve_introduced_at(manifests):
179179

180180

181181
def authenticate_historical_host_manifests(root=ROOT, providers=PROVIDERS):
182-
"""Reuse authenticated provider closures without injecting current-only values."""
182+
"""Reuse older authenticated closures without injecting current-only values.
183+
184+
The frozen v15 provider is a same-epoch control, not evidence that a v15
185+
value predates its public owner.
186+
"""
183187
manifests = {}
184188
with tempfile.TemporaryDirectory(prefix='.native-fx-introduced-', dir=root) as temporary:
185189
for label, provider in providers.items():
190+
if provider['engine_epoch'] == 'engine_script_run_v15':
191+
continue
186192
manifest_path = provider['manifest']
187193
if not manifest_path.parent.name.startswith('host-'):
188194
continue

0 commit comments

Comments
 (0)