Repository navigation
feat(agent): resume interrupted tasks from durable history - #904
Merged
Merged
Conversation
Implement explicit continuation admission with durable source-turn fencing, preserved completed output and tool results, and provider-specific history validation. Add fault-injection and headless recovery evidence for #903.
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
Interrupted Wuu tasks can start a fresh sampling turn from durable active history with one click, without repeating the original question. Explicit Continue is separate from automatic transport recovery and retains completed output and confirmed tool results. Closes #903.
Changes
turn/start.resume_after_turn_id: acquire the execution lease, refresh history, validate the source turn and tool ledger, then persist a new display-only turn boundary. Concurrent and stale continuations fail closed, including delayed duplicate clicks after completion/restart.Automatic recovery policy stays bounded: this change does not add indefinite connection waiting, a separate never-submitted retry allowance, or progress-driven shared-budget resets. The fault tests retain cancellation and nested/shared-budget limits.
Test plan
7d58d83dreproduces the same timeout with unmodified assertions. The full non-race affected-package run passed.go vetin affected packages.go test -p 2 ./cmd/... ./internal/... ./prompts/... -count=1). The final affected-package rerun passed after the recovery-boundary fixes.NODE_OPTIONS=--no-experimental-webstorage.node desktop/scripts/continuation-recovery-e2e.mjsafter locked desktop/Web dependencies; optionally setWUU_HEADLESS_CHROMIUMto an existing headless binary.85be31b2098d2651a2bfa024ef721673c937c260: independent runtime/provider and UI reviews cleared; 22 checks succeeded and 3 were skipped by configuration. Final CI. Only canceled font-install jobs and their aggregates were retried on the same SHA; no assertions or dependencies were bypassed.Risk and rollback
Medium: recovery touches admission, durable turn projection and provider history. The continuation API is additive; older hosts reject continuation requests. Older clients may fold display-only continuation boundaries into preceding turns, so use a matching host and shell. Revert this PR to remove the action and new checkpoint handling; no database schema migration is introduced.
Linked issues / docs
Closes #903. Updates English/Chinese conversation and development guides, plus app-server protocol documentation. Reproducible logs and screenshots are local ignored artifacts under
artifacts/issue-903/; they are not live-provider acceptance evidence.