Skip to content

feat(cdp): answer a code send with the delivery mode it went out with - #638

Draft
Silthus wants to merge 2 commits into
sbx-api/sa1b-gatefrom
sbx-api/sa1c-delivery-mode
Draft

Silthus wants to merge 2 commits into
sbx-api/sa1b-gatefrom
sbx-api/sa1c-delivery-mode

Conversation

@Silthus

@Silthus Silthus commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Part of map #461 (sandbox sender for API sends). SA1 part 3 of 3, split from #632: the delivery_mode answer. Stacked on #637 (part 2), on #636 (part 1). #633 sits on top.

Problem

Merge Danger

Note

🟡 Merge risk: medium · two-way door: a revert drops the field from the 202

  • Every keyed code send now stores its mode with its idempotency record. A record from either cdp-api version replays in the other.
  • An own-sender send answers delivery_mode: own, and nothing else about it changes.

Changes

  • The 202 for a code send carries delivery_mode, own or sandbox.
  • A keyed send stores the mode with its idempotency record, so a replay answers with the first send's mode, even when the default sender changed in between.
  • A record written before this change replays without the field.

How did you test this code?

Test seams: the cdp-api code-send route over HTTP (cdp-api.serial.test.ts).

Test rationale: the mode on own and sandbox sends, and a keyed replay after the default sender changed.

Proofs:

CI: this PR sits on an integration base until the sandbox stack (through #587) and the send stacks (through #584 and #585) reach master.

Release status

  • This change is behind a feature flag and is not available to users

Docs update

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Agent: Claude Code, Claude Opus 5.5 (claude-opus-5-5)

Skills: /tdd, /writing-tests, /qa-swarm, /pr-description, /writing-pr-descriptions

Question Answer Who Where
How is SA1 split for review? Three stacked PRs: envelope and source, the admission gate, delivery_mode 👍 Accepted default map #461 lane handoff, 2026-11-01

Involvement: the SA1 review carries over from #632, whose code these three parts hold: one design pass, a 7-lens security swarm, a 4-lens fix round and one clean final read (GPT-6.1 Sol and Claude Opus 5.5). One GPT-6.1 Sol read of this part came back clean. A GPT-6.1 Sol read of the merge that took the newer base came back clean.

More context for AI agents

🤖 Generated with Claude Code

The 202 for a code send carries `delivery_mode`, `own` or `sandbox`. A keyed send stores the mode with its idempotency record, so a replay answers with the first send's mode, even when the default sender changed in between. A record without a stored mode replays without the field.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#584 folded the keyed replay tests into one parameterized test; the merge keeps that shape and adds this part's delivery_mode assertions to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant