feat: ship durable execution foundations - #1785
Draft
simple-agent-manager[bot] wants to merge 20 commits into
Draft
feat: ship durable execution foundations#1785simple-agent-manager[bot] wants to merge 20 commits into
simple-agent-manager[bot] wants to merge 20 commits into
Conversation
Contributor
|
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.



Summary
9c53b61e2and Worker/ProjectData foundation through4847cf0b8onto currentmain(8c689a6a7), preserving the bounded control-loop protections from Fix runaway-cost and infinite-loop control paths #1777.Ready.This draft is open early while full gates, specialist review, fresh-node staging verification, and CI evidence are completed.
Validation
pnpm lintpnpm typecheckpnpm testgo test -race ./internal/acpStaging Verification (REQUIRED for all code changes — merge-blocking)
Deploy Stagingworkflow triggered manually and passed for this branchapp.sammy.party(staging) using test credentials and actively tested the applicationStaging Verification Evidence
Pending fresh-node staging verification. Staging will be returned to zero VMs at rest.
UI Compliance Checklist (Required for UI changes)
End-to-End Verification (Required for multi-component changes)
Data Flow Trace
claimDuePromptDeliveriesand dispatches it throughrunPromptDeliveryClaim.DefaultVmPromptDeliveryAdapter.submitprobes/workspaces/{workspaceId}/agent-capabilities, thensendPromptToAgentOnNodeserializesprotocolVersionanddeliveryIdon the production request path.handleVersionedPromptDeliverydurably accepts/claims the receipt before invokingSessionHost.AcceptPrompt; the observer converges it to one terminal receipt.lookupReceiptResultpermits replay only for a positive same-runtimenot_found; changed or unproven runtime returns ambiguity.CheckpointRolloverandmonitorProcessExitshare one exact-once episode outcome; a terminal winner suppresses delayed restart and laterReady.Untested Gaps
Fresh-node live protocol verification is pending and blocks readiness.
Post-Mortem (Required for bug fix PRs)
What broke
The prior integration was lost with its workspace. The surviving foundations also disagreed on the prompt-delivery wire contract, and checkpoint deadline/cancellation could lose ownership to delayed process-exit restart.
Root cause
The Worker negotiated durable delivery but omitted
protocolVersionanddeliveryIdfrom the real JSON request body. Independently, checkpoint failure cleared or failed to durably claim the rollover episode beforeprocess.Stop/process.Waitraces.Class of bug
Cross-component contract drift plus asynchronous terminal-ownership race.
Why it wasn't caught
Mocks asserted adapter intent without inspecting the real HTTP body, and checkpoint tests let
Stopimmediately releaseWait, hiding the delayed-exit ordering.Process fix included in this PR
Exact shared Worker/VM contract fixture and production-path request-body assertion; deterministic delayed-
Waitrace tests under Go's race detector. Documentation/rule sync remains under specialist review.Post-mortem file
tasks/active/2026-08-09-integrate-durable-execution-foundations.mdSpecialist Review Evidence (Required for agent-authored PRs)
needs-human-reviewlabel added and merge deferred to human — N/A while review is pending; draft will not mergeExceptions (If any)
Agent Preflight (Required)
Classification
External References
Canonical ready idea
01KZK586BN98BRDGKC44V12HT0, all read-only state from cancelled mission6009d56f-9a80-4f29-aef6-fcf498edc721, and the surviving exact foundation commits were read before implementation. No third-party API behavior changed.Codebase Impact Analysis
Affected:
apps/apiProjectData delivery/alarm ownership and VM adapter;packages/sharedcontract types/constants;packages/vm-agentpersistence, HTTP handlers, and ACP process lifecycle; migrations/tests/docs. Current-main control-loop budgets and kill switches are retained.Documentation & Specs
Task/research file added. Durable-execution docs and rule synchronization remain under Phase 5 review.
Constitution & Risk Check
Checked no-hardcoded-business-values, exact-once ownership, append-only migration safety, control-loop I/O budgets, alarm isolation, fail-closed runtime identity, credential-free wire fixtures, legacy rollout compatibility, and zero-VM staging cleanup.