From 9ef904319112812db27267f0ae5aefa4da65ac5d Mon Sep 17 00:00:00 2001 From: Elie Bursztein Date: Sat, 26 Sep 2026 13:13:40 -0400 Subject: [PATCH] test(release): the fork contract follows the flush before the clone #258 moved the clone under the guest freeze into flush_then_clone, which flushes the session ledger first (#243). The doctor contract still looked for a direct clone_sandbox_state call under with_quiescence and turned main's static gate red; it now asserts the freeze wraps flush_then_clone and that the flush precedes the clone. --- build_system/tests/release/test_release_doctor_contract.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build_system/tests/release/test_release_doctor_contract.py b/build_system/tests/release/test_release_doctor_contract.py index 48f092eb2..ab7f92516 100644 --- a/build_system/tests/release/test_release_doctor_contract.py +++ b/build_system/tests/release/test_release_doctor_contract.py @@ -6576,7 +6576,11 @@ def test_fork_clones_inside_the_owner_under_a_guest_freeze() -> None: assert "ServiceToProcess::CloneState {" in fork assert "sync; true" not in fork assert "with_quiescence(" in owner - assert "clone_sandbox_state(" in owner.split("with_quiescence(", 1)[1] + # The clone runs under the freeze, after the ledger flush (#243): a fork + # copies every row the source accepted, and a failed flush fails the fork. + assert "flush_then_clone(" in owner.split("with_quiescence(", 1)[1] + flush_then_clone = owner.split("async fn flush_then_clone(", 1)[1].split("\n}\n", 1)[0] + assert flush_then_clone.index("flush_checked()") < flush_then_clone.index("clone_sandbox_state(") def test_linux_vm_launch_preformats_system_overlay_before_boot() -> None: