Add exact Engine L2 reconciliation transition

This commit is contained in:
Codex
2026-07-23 13:10:11 +03:00
parent ad3760e767
commit 50cba59bde
4 changed files with 1114 additions and 15 deletions
@@ -33,6 +33,20 @@ RUNNER = load_runner()
class EngineProviderTargetHostPolicyTest(unittest.TestCase):
def require_historical_target_source(self):
for relative_path, expected in (
RUNNER.ENGINE_PROVIDER_TARGET_HOST_POLICY_TARGET_SHA256.items()
):
path = ENGINE_ROOT / relative_path
if (
not path.is_file()
or hashlib.sha256(path.read_bytes()).hexdigest() != expected
):
self.skipTest(
"historical target-host policy source has advanced "
"to its exact successor"
)
def build(self, artifact_dir):
environment = os.environ.copy()
environment["NODEDC_ENGINE_SOURCE_ROOT"] = str(ENGINE_ROOT)
@@ -47,6 +61,7 @@ class EngineProviderTargetHostPolicyTest(unittest.TestCase):
return json.loads(completed.stdout)
def test_builder_emits_exact_deterministic_one_file_slice(self):
self.require_historical_target_source()
with tempfile.TemporaryDirectory(prefix="nodedc-provider-target-host-") as directory:
root = Path(directory)
first = self.build(root / "first")
@@ -126,6 +141,7 @@ class EngineProviderTargetHostPolicyTest(unittest.TestCase):
acceptance.assert_called_once_with()
def test_live_acceptance_uses_exact_literal_host_contract(self):
self.require_historical_target_source()
expected_live = "engine-provider-target-host-policy:exact-literal-host:v1"
with (
mock.patch.object(RUNNER, "component_root", return_value=ENGINE_ROOT),