Repository navigation
feat(dsh): persist and recover handoff deliveries - #2603
Merged
Merged
Conversation
knqiufan
requested review from
AlexStocks,
PsiACE and
zhanghuidinah
as code owners
November 12, 2026 05:38
This was referenced Nov 12, 2026
hidb4ai
previously requested changes
Nov 12, 2026
hidb4ai
left a comment
Contributor
There was a problem hiding this comment.
Two reproducible issues remain in restart recovery and evidence-omission handling. Please address the inline findings before merging.
hidb4ai
dismissed
their stale review
November 13, 2026 08:47
Re-reviewed baaf317. Both reported findings are fixed: the kernel lock permits recovery despite stale PID markers, and overflowed Host omissions now produce an explicit coverage warning. The original counterexamples and focused Linux delivery/recovery tests, including a real local Server round trip, pass. Withdrawing this obsolete changes request. This does not establish native macOS/DSH or destination-agent acceptance.
hireview001
approved these changes
Nov 13, 2026
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.
Which issue or RFC does this PR implement?
Part of #2514; implements task 3 of RFC #2528. Based on master
fd9f1682, which includes the merged #2569. The tracking issue remains open.Rationale
A successful PowerContext preparation response must survive a DSH Host restart with the exact selected reply, workspace observation, Server/Scope binding and ACK source identity. A captured Source alone cannot reconstruct the original Prepared Handoff.
Changes
LocalDeliveryServiceand the shared Host contracts. An injectedPreflightGatemust validate before any task-content capture or preparation. Support inspected current-work fields, bounded evidence for configured generation, and explicitly selected exact Handoff revisions.contentACK source ID. Verify packages on read, export and launch lookup. Recover an interrupted write only from the verified original file; reportunknownand require an explicit new version otherwise. Protect unconfirmed and pinned packages and report capacity exhaustion.User-facing changes and integration
No public Server API or plugin entry point changes. English and Chinese developer docs describe storage, recovery and retention.
Task 4 still needs to inject the authenticated Host gate, exact boundary reader and connection resolver; map the shared safe error codes; and coordinate launch path use with retention. The exact Revision variant reuses the existing integer
ArtifactReference.revision. Target installation and launch, and final ACK verification, are outside this PR.Validation
make check;make js-test(537 plugin tests, 9 HTTP E2E);make docs-test; focused TypeScript compilation of the new handoff modules.uv run pytest -q tests/test_dsh_handoff_digest.py tests/test_workflow_actions.py tests/test_js_operations.py tests/e2e/test_dsh_http_chain.py(16 passed).continue_handoffand served the selected exact Revision. A subprocess crash and restart exercised local recovery. Gate and generation tests use fixtures; they do not establish native DSH Host, model-provider, or destination acceptance.AI usage statement
Implemented and tested with OpenAI Codex (GPT-6).