Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"source_revision": "33388bda9a32b06a880f669b0f084e63e39dfb9a",
"codex_cli_version": "0.172.0",
"input": {
"source_fixture": "examples/loopx-turn-codex-cli-e2e-smoke.py",
"source_fixture_sha256": "061dfe69d38b8026e975a2cb235024f36151adb5c64f3f8023b5343436593bd9",
"initial_goal_state_sha256": "6273055657eed5a303e6800622da66a37eabd55d332c88e985f5e8371fa305e9",
"initial_registry_sha256": "71f2b7e26c378038336002a62ba2d7d6398bdff2be0779a9c88c0bc3fefd751b",
"normalization": "Replace the disposable root in the fixture bytes before hashing.",
"row_digest_basis": "UTF-8 compact JSON with sorted case, provider, goal_state_sha256, and registry_sha256 keys.",
"model_response_scope": "Deterministic loopback responses in an isolated synthetic project."
},
"turn_identity": "SHA-256 of the case-scoped and provider-scoped original Turn key.",
"runner_sha256": {
"governed_headless.py": "778312c12ba2953c90ba9fa698a0dfc34735eae3191fd427ca62995ca3814d85",
"headless_roles.py": "19e4caac8ea25c1a15795491079ee231bc13d56f40644b9707e918ed6a3514cc",
"restart.py": "201b2a5076592518a04175ae9fed0981e61c9645d125d84b800450883029a227",
"rfc_evidence.py": "8fdf806f5da1be63feecff794226bea880dd55484fc44e562d74b3f7192dfea7",
"run.py": "0867d0c388070deb7e495aa9bd8df41049ec5a093e1364d07941f562c01918f5"
},
"observations": [
{
"scenario": "app_server_recovery",
"provider": "file",
"input_sha256": "afbc6cd6b9fff382552a019c121571c7f1a0e081900c7ccff921db620e5ad63f",
"original_turn": "be1eec4f01a4da645234431f6be011123e855fa61d42614483d6438e3599ce1f",
"replay_turn": "be1eec4f01a4da645234431f6be011123e855fa61d42614483d6438e3599ce1f",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"quota_before_replay": 1,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "app_server_recovery",
"provider": "sqlite",
"input_sha256": "3f45ab4b3c81568136b9e92cbfbb3fb7567654469baf447a711096d73a3694be",
"original_turn": "e03ddebd33a73134f8003bb456831390941503206dec25f10ddd144313b0518a",
"replay_turn": "e03ddebd33a73134f8003bb456831390941503206dec25f10ddd144313b0518a",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"quota_before_replay": 1,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "explicit_adapter_retry",
"provider": "file",
"input_sha256": "ad90082fd4c556cb4f21699b3a636ae83e970eb301d903670bd180a834f7bf46",
"original_turn": "d1a81ba9c16ea98aa397c3fd3e210212a11d987324272ab4012f442350225844",
"retry_turn": "d1a81ba9c16ea98aa397c3fd3e210212a11d987324272ab4012f442350225844",
"replay_turn": "d1a81ba9c16ea98aa397c3fd3e210212a11d987324272ab4012f442350225844",
"adapter_attempts": 2,
"same_effect": true,
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"quota_before_retry": 0,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "explicit_adapter_retry",
"provider": "sqlite",
"input_sha256": "750433aae67508b36a3378d6cfb0cb7a17416307b4003aedd46c8c6e782abbc3",
"original_turn": "c7929f6844e24398c13c7d1470023505102b01d5cb8d15c838cc4993d36d9969",
"retry_turn": "c7929f6844e24398c13c7d1470023505102b01d5cb8d15c838cc4993d36d9969",
"replay_turn": "c7929f6844e24398c13c7d1470023505102b01d5cb8d15c838cc4993d36d9969",
"adapter_attempts": 2,
"same_effect": true,
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"quota_before_retry": 0,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "core_exit_unknown_outcome",
"provider": "file",
"input_sha256": "f5d4518d565ae4d98b6e54882727983e6098868a63db07f5877a53a0f8a649f7",
"original_turn": "ab732f0b3a63f4db8721170a508cf1f72b1c0c2826afd258da8f4442e114ef46",
"retry_turn": "ab732f0b3a63f4db8721170a508cf1f72b1c0c2826afd258da8f4442e114ef46",
"recovery_reason": "host_outcome_unknown",
"adapter_attempts": 1,
"same_effect": true,
"provisional_artifact_sha256": "8ca64b74632a55bb65e8b63fbc1e314e8e606e3acdda91af1ed2600be16d47b4",
"new_retry_provider_requests": 0,
"quota_after_retry": 0
},
{
"scenario": "core_exit_unknown_outcome",
"provider": "sqlite",
"input_sha256": "f292d88c020cefb395ef1a8e6e54974a0e8ade67a6ce76abc7ba58fc54ac18c7",
"original_turn": "0a06c1af41ae97ce104fc4016aad75d658e5354f71ba9a62e1484799cc865d03",
"retry_turn": "0a06c1af41ae97ce104fc4016aad75d658e5354f71ba9a62e1484799cc865d03",
"recovery_reason": "host_outcome_unknown",
"adapter_attempts": 1,
"same_effect": true,
"provisional_artifact_sha256": "8ca64b74632a55bb65e8b63fbc1e314e8e606e3acdda91af1ed2600be16d47b4",
"new_retry_provider_requests": 0,
"quota_after_retry": 0
},
{
"scenario": "headless_recovery",
"provider": "file",
"input_sha256": "d411b38540e7f72b0a287d7e7dc42481f13ff0c6d510202695b0e13ef978cdfc",
"original_turn": "5e98430c8c9ddd80ab31fd7b51019cd7814f9e9814804d0b2d5fef0ded9a60c7",
"replay_turn": "5e98430c8c9ddd80ab31fd7b51019cd7814f9e9814804d0b2d5fef0ded9a60c7",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"native_processes": 5,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "headless_recovery",
"provider": "sqlite",
"input_sha256": "db7e4e454dc9869338886770f19042e9a5ec51706a77a9a283bce4d91c8d3272",
"original_turn": "acf6ab2e28f034102ba732878ea7fd54d07cccf91a80a660b2df25a894925796",
"replay_turn": "acf6ab2e28f034102ba732878ea7fd54d07cccf91a80a660b2df25a894925796",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"native_processes": 5,
"quota_after_replay": 1,
"new_replay_host_invocations": 0
},
{
"scenario": "headless_validation_rejected",
"provider": "file",
"input_sha256": "d2f2799d7b612e27f6fd06bace36fa4192ccb1fea7da7dc80fdcb0c628dc33cd",
"original_turn": "fab1c2a450e854fb108b7bbc4b56e1cc159e57e4506fa0c96ebda1f452c6c3c1",
"validation": "failed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"native_processes": 5,
"quota_after_validation": 0
},
{
"scenario": "headless_validation_rejected",
"provider": "sqlite",
"input_sha256": "904b244301121fc840a231a8afe15698d632720c6b4acdb3525d21a5810f3590",
"original_turn": "4c60350d5e63dd3e234f6b191fa9d59b3700f2b75e539d9dbedbf62431a329e4",
"validation": "failed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"native_processes": 5,
"quota_after_validation": 0
}
],
"replay_accounting_followup": [
{
"scenario": "explicit_adapter_retry",
"provider": "file",
"input_sha256": "ad90082fd4c556cb4f21699b3a636ae83e970eb301d903670bd180a834f7bf46",
"original_turn": "76f5b81996bb2c7f8422ae6540d5a0679e920ba81e0a776aa9779fcf5653d623",
"replay_turn": "76f5b81996bb2c7f8422ae6540d5a0679e920ba81e0a776aa9779fcf5653d623",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"host_attempts_before_replay": 2,
"host_attempts_after_replay": 2,
"new_replay_host_invocations": 0,
"quota_before_replay": 1,
"quota_after_replay": 1,
"runner_sha256": "35542bce79c1dfeeba3a5fec45fde6f47928fef3308ac0a5fda32ddac936d79b"
},
{
"scenario": "explicit_adapter_retry",
"provider": "sqlite",
"input_sha256": "750433aae67508b36a3378d6cfb0cb7a17416307b4003aedd46c8c6e782abbc3",
"original_turn": "cf6055230b2df9bed2754df200b56ea93a29d482c27f26171c02b04471982f5b",
"replay_turn": "cf6055230b2df9bed2754df200b56ea93a29d482c27f26171c02b04471982f5b",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"host_attempts_before_replay": 2,
"host_attempts_after_replay": 2,
"new_replay_host_invocations": 0,
"quota_before_replay": 1,
"quota_after_replay": 1,
"runner_sha256": "35542bce79c1dfeeba3a5fec45fde6f47928fef3308ac0a5fda32ddac936d79b"
},
{
"scenario": "headless_recovery",
"provider": "file",
"input_sha256": "d411b38540e7f72b0a287d7e7dc42481f13ff0c6d510202695b0e13ef978cdfc",
"original_turn": "94660e4247377edfcff6257bd6f3d3f9c540e4e5975c5ac1ecd53ad97a17a954",
"replay_turn": "94660e4247377edfcff6257bd6f3d3f9c540e4e5975c5ac1ecd53ad97a17a954",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"host_attempts_before_replay": 1,
"host_attempts_after_replay": 1,
"new_replay_host_invocations": 0,
"quota_before_replay": 1,
"quota_after_replay": 1,
"runner_sha256": "5db147e255063b10f78365753803ed4317e69289a01032166a657f5f24017c4c"
},
{
"scenario": "headless_recovery",
"provider": "sqlite",
"input_sha256": "db7e4e454dc9869338886770f19042e9a5ec51706a77a9a283bce4d91c8d3272",
"original_turn": "a6f76cc68b0095bef08496a249ad99486a4e5b07409d971c849f6da2c9e0859d",
"replay_turn": "a6f76cc68b0095bef08496a249ad99486a4e5b07409d971c849f6da2c9e0859d",
"validation": "passed",
"artifact_sha256": "b1a480fc4e26d1df40cd2dd0563537ac2edcb51d5cdfab3ff509109901b92458",
"host_attempts_before_replay": 1,
"host_attempts_after_replay": 1,
"new_replay_host_invocations": 0,
"quota_before_replay": 1,
"quota_after_replay": 1,
"runner_sha256": "5db147e255063b10f78365753803ed4317e69289a01032166a657f5f24017c4c"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,102 @@ pair. The cold pair above measured higher time and token use. These are
fixed-order observations. Interruption after writeback remains a separate case.
[Recompute both interrupted runs, original receipts and usage](https://github.com/loopx-project/loopx/pull/9695#issuecomment-7299508121).

### C3/C4 native role recovery within one C1 Turn

File and SQLite each ran one isolated `turn run-once` through the existing
`generic-cli` seam with a Complete Turn v1 Host request. The trial used two
real Codex app-server 0.172.0 sessions and scripted model responses on loopback.
The source tree included the [native binding persistence change](https://github.com/loopx-project/loopx/pull/9914)
at `7ba31aaacd`. The Controller read the complete context. The Worker received
only the scoped instruction, wrote a provisional artifact with its ordinary
workspace tool, and reported the measured value. The Controller then issued
a correction based on the observed artifact.

The trial disconnected the Controller and interrupted an in-flight Worker
Turn. Native readback confirmed the interruption, and the delayed reply had
no effect on the artifact or the returned result. Both sessions reopened
under their original IDs. The Worker applied the correction, and the original
Controller returned a typed result. The Worker had workspace-only permission.
Its native tool was able to write the allowed artifact and was denied read and
write access to a synthetic Core file outside the allowed directory. The trial
pinned the native executable so the restricted environment did not depend on
the package manager's Node launcher.

Both Core validators accepted the corrected artifact and the same admitted
Turn settled once per backend. Replay used the original receipt and invoked
neither Host nor another debit.

A follow-up trial closed both native sessions after the confirmed interruption
and exited the adapter. File and SQLite each recorded one failed attempt with
zero debit. Plain replay returned that failure without launching a Host.
On explicit retry a new adapter checked the recorded Turn, the original C1
input and the provisional artifact digest. It verified the old interruption
from native history and resumed both original native sessions. The independent
validator accepted the corrected artifact under the same Turn and settlement
identity. Each backend recorded two Host attempts and one debit. A changed
provisional artifact on File and a mismatched Turn on SQLite were refused
before either native session reopened, with zero debit.

A separate crash trial terminated the Core CLI after dispatch and before
it recorded a Host outcome. On both backends the original journal returned
`host_outcome_unknown` on explicit retry and preserved the original attempt
and settlement identity. No new Host started and no quota was spent. This
qualifies the exercised source CLI, native transport and recovery boundaries
with a trial adapter. Durable product role generations, product adapter
recovery, Workbench integration, and comparable outcome and full-cost
evidence remain open.

The headless variant ran Codex CLI 0.172.0 `exec` and `exec resume` through the
same `generic-cli` trial boundary. Each File and SQLite case used five native
processes, with separate Controller and Worker session IDs and three resumes.
The Controller received the C1 input, read the provisional artifact, requested
a correction, and read the revised artifact. The Worker used the same working
directory with workspace-only permissions. Its tools could update the artifact
and were denied read and write access to a synthetic file outside that directory.
An independent Core validator accepted the corrected artifact with one debit
per backend. Replay returned the original receipt without launching a Host.
A counterfactual validator rejected the same artifact on both backends with
zero debit. The native processes used deterministic loopback model responses.
The [trial receipt summary](#c3c4-trial-receipt-summary) records the evidence
for the app-server and headless observations. The product adapter still needs
to own role selection, durable binding, and recovery.

#### C3/C4 trial receipt summary

These synthetic-source trials used Codex 0.172.0 and deterministic loopback
responses. The initial app-server confirmation records repository revision
`7ba31aaacdcb98e604e7b0bd733f644c9a199775` and request contract
`loopx_turn_host_request_v1`. The input exercised provisional work, an
artifact-based correction and a scoped workspace write. The headless runner
also asserted the same Turn key before and after replay and checked that
replay did not invoke a Host.

| Trial | Observation per backend | File observation SHA-256 | SQLite observation SHA-256 |
| --- | --- | --- | --- |
| App-server recovery | Both roles reopened under their original bindings. Independent validation passed. Replay kept quota at 1 with zero new Host invocations. | `f2237734e077ea4de6af723766dc53009dacf28def07bfc795bc334c31bc14cc` | `e38c27915517f4ddb09d24752ba85f4cd796a6e0ada0c5c879d848d07447205c` |
| Adapter exit and explicit retry | The first attempt spent 0. Explicit retry reused the same Turn and effect and reopened both sessions. Independent validation passed. Two attempts and 1 total debit after replay. | `6f420d2ab9822d6f1cd3c66c24290d63f788be5247ea4c0886c54489267efcf9` | `baca03171f607aae42bd4c1a76d9e64dbc4f7827b115cae7c6ed298532cc9f09` |
| Core crashes before recording Host outcome | Explicit retry returned `host_outcome_unknown`. The effect identity stayed the same. Zero new Host calls and zero debit. | `c1d7cf69229a30875f07db17f11d03c3724e71dfcdef61809177def681e39e65` | `f0e68c854e7c4d773f3fb6fe2b83210f942c4a62aafd039a258785e05f0b2353` |
| Headless C1 trial | Independent validation passed. Two fresh and three resume processes. Replay used the original Turn with zero new Hosts and 1 total debit. | `fa250d6cdb4361d9776e258b7daf00e21601b58460e737826b9efcc91c2e979c` | `89c1d85eb4f91f714468b3620693f78e4676eb68b6e1ebce5fea86e39ac07084` |
| Headless validation rejection | Independent validation rejected the trial. Zero debit. | `42a81e73697d0285f3d536374caa27a0231cfbfde43e2e8667c2bcadbbf0c892` | `ab7bbd9af10bb03f9b400748a9de92cc42d17d03d82aea51ddf2cebe83c3ea79` |

The table identifies historical local observations. The [December 4 rerun
records](mechanism-c3-c4-recovery-observations-2026-12-04.json) give one row per
case and backend. The input record pins the checked-in fixture and commits the
initial Goal and registry after normalizing the disposable root. Each row binds
the scenario and provider to those inputs and records an anonymized original
Turn key, the validation or recovery decision, the artifact digest and the
applicable retry, replay and quota counts. The rerun used deterministic
loopback responses on the recorded Core revision. Independent reproduction
still requires the full fixture inputs and portable runners. Product adapter
acceptance remains open in the C3/C4 acceptance ledger.

Four follow-up trials on the same pinned source recorded the counts
immediately before and after replay. On File and SQLite, explicit adapter
retry kept two Host attempts and headless recovery kept one. Each replay
read back its original Turn with zero new Host invocations and quota spent
unchanged at one. The follow-up rows in the same evidence file record the
input and artifact digests, validation and counts for each trial.

### C1 same-session warm continuation

Four File arms used the native Codex App server 0.172.0 with GPT-5.6-Sol at
Expand Down
Loading