Skip to content

feat(dsh): verify and recover exact handoff receipts - #2651

Merged
hidb4ai merged 4 commits into
codex/dsh-handoff-preflightfrom
codex/dsh-handoff-receipts
Nov 18, 2026
Merged

hidb4ai merged 4 commits into
codex/dsh-handoff-preflightfrom
codex/dsh-handoff-receipts

Conversation

@knqiufan

@knqiufan knqiufan commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

Which issue or RFC does this PR close?

Refs #2514 and RFC #2528. This PR builds on #2602 (preflight and restricted launch).

Rationale for this change

Opening a target only confirms that the OS accepted the launch. DSH needs independent evidence that the receiver continued the exact handoff, and it needs to keep that evidence when a later refresh fails or the local package expires.

What changes are included in this PR?

  • Add a two-line draft builder. After the user sends the edited draft, the Codex and Claude receive hooks verify the private package against its saved checksum, target, working directory, and Scope. They supply the existing PowerContext Continue and ACK procedure to the receiver, without putting protocol fields in the draft. The parser also handles the leading tilde escaped by the Codex editor.
  • Read the ACK by the saved receipt Source ID. Verify the exact Prepared digest or committed revision, Scope, receiver and checks; distinguish verified, missing, forbidden, unavailable, invalid and historical reads from the receiver's decision. Persist verified observations for restart and expired-package recovery.
  • Expose the optional, Server-owned SourceRecord.handoff_receipt marker and the existing get_connection_identity operation through MCP as a read-only tool. Require committed receipt attribution in enforced mode and regenerate the affected clients and capability catalogs.

Are there any user-facing changes?

The shared draft and receipt behavior become visible when the menu is connected in #2655. Existing handoff selections and receipt identities are preserved. A self-reported receiver in access-disabled mode is shown separately from an authenticated principal.

How was this change tested?

  • make contract-test — 69 checks passed. make integration-manifest-check — 61 checks passed on the final stack.
  • uv run pytest -q tests/integrations/test_dsh_handoff_receiver.py tests/test_mcp.py tests/e2e/test_access_control_regressions.py -k 'handoff or connection_identity or receipt' — 23 passed.
  • From the DSH plugin directory, pnpm exec vitest run --maxWorkers=1 tests/receipt.spec.ts tests/receiver-prompt.spec.ts and pnpm exec vitest run tests/e2e/receipt.spec.ts — 15 unit cases and one real Server integration case passed.
  • The rebuilt Desktop protocol probe passed against the recorded SQLite wheel in anonymous loopback, static Bearer, HTTPS with an explicit CA and base path, and enforced Provider modes. The native Codex run in feat(dsh): add one-click handoff from assistant replies #2655 separately verified the escaped draft path and ACK readback.

AI usage statement

OpenAI Codex assisted with implementation, tests, local validation, and preparing this PR.

@knqiufan knqiufan changed the title DSH handoff: verify and recover exact receipts feat(dsh): verify and recover exact handoff receipts Nov 14, 2026
@knqiufan
knqiufan marked this pull request as ready for review November 14, 2026 15:32
* feat(dsh): add the Codex Desktop handoff adapter

* fix(dsh): ship Codex Desktop diagnostics in the default Host

* fix(dsh): recover Codex probes and isolate target discovery
@hidb4ai
hidb4ai merged commit 3df7fe3 into codex/dsh-handoff-preflight Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6.0 v1.6.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants