Repository navigation
Automatic desktop recovery of pending tool operations - #39
Merged
Merged
Conversation
…er loss Adds automatic worker-loss detection in DesktopComposition, host terminal receipt export, bounded reconcile and replacement worker that keeps reopen context and the durable execution budget. Includes source-lineage records and focused tests. Not yet validated for publication: the local full core run (1595 tests) reported 2 errors in test_compiler_composition and test_video_composition. compiler_launch_args now calls compiler_host.lifecycle(), which the existing test doubles do not provide. No public evidence records or doc updates are included.
Fix two launch tests whose inert tool-host doubles lacked lifecycle(); tests only, all 77 runtime modules unchanged. Both modules are added to the automatic-tool-recovery source lineage. Add sanitized evidence: local validation (1,595 core tests, 16 workflow commands with 90 provenance tests, package and isolated install; the failed first core run is retained), the installed SDK automatic recovery trial (21 closed-review checks) and the physical IQ3_S foreground recovery trial (49 closed-audit checks; two earlier failed attempts and the observer shutdown failure retained). Update HANDOFF, PLAN, evidence and video recipe docs, and cite Erlang/OTP supervision as a design reference.
On virtualized Windows CI runners, a fixed 50ms sleep was too short under load, causing test_it_m2_01_automatic_recovery_compiler_harness to fail before interact() completed worker replacement. Replace with a bounded polling loop (up to 2.0s, polling every 10ms) matching adjacent tests. Updates source lineage and the three sanitized evidence records with the new lineage SHA. All 77 runtime files remain identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Built on #38. Validated development integration, 9 November 2026; the existing v0.4.0a1 release assets retain their original scope.
What this adds
DesktopCompositionautomatically recovers a pending compiler/video operation after worker loss. On a non-zero worker exit with one pending effect whose exact terminal result the live tool host still holds, it:CompilerHost.terminal_receipt;run_recovery reconcilecommand (no provider call);readycheckpoint;reopen_contextand the durable execution budget.composition.py,desktop_controls.pyandtask_handover.py. Source lineage is inprovenance/automatic-tool-recovery/source-lineage.json.Validation (local Windows, Python 3.11.9)
object()as the tool host, which has nolifecycle(). I fixed the test doubles (tests only, runtime unchanged) and kept the failed run. The rerun passed 1,595/1,595.worker-2completed the same task. Independent closed review: 21/21 checks, 48 case files unchanged.Evidence:
provenance/automatic-tool-recovery/{local-validation,installed-worker-loss,physical-foreground-recovery}-2026-11-08.json. Docs:HANDOFF.md,PLAN.md,docs/evidence.md,docs/video-tool-recipe.md.Hosted validation
The original attempt-1 push workflow and PR workflow passed at
08053a00d92c065b88bda3ce14f80a7cfe078f0f: all 14 jobs, 12 core-test steps and 12 distribution checks. The final condition-polling test correction does not alter the installed, physically tested runtime.Remaining qualification
Not qualified: interruption during an active tool, host loss, repeated reliability, application restart and reboot.