Skip to content

feat(delivery): freeze provider requests before submission - #117

Merged
galligan merged 1 commit into
mainfrom
dis-81-freeze-provider-requests-in-the-shared-local-reservation
Sep 13, 2026
Merged

galligan merged 1 commit into
mainfrom
dis-81-freeze-provider-requests-in-the-shared-local-reservation

Conversation

@galligan

@galligan galligan commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Context

A keyed delivery replay must retain the exact provider intent admitted for the original request. Resolving selectors or mutable defaults again during replay could redirect work or create a second submission.

What changed

  • Stores submitted intent separately from the prepared provider request and migrates the registry to schema v25.
  • Looks up keyed replays before selector resolution, intro rendering, settings reads, or provider work.
  • Freezes destination, provider and binding, native session, transport, receipt correlation, effective text, working directory, and turn settings for a new reservation.
  • Distinguishes accepted, rejected, and ambiguous submission outcomes; ambiguous receipts remain non-resendable.
  • Rejects incompatible legacy and keyed rich-input replays before effects while preserving unkeyed delivery behavior.

Verification

  • just check passed Ruff, formatting, strict mypy, 1,345 tests with 17 live tests deselected, wheel and sdist builds, and package-content validation at the current stack tip.
  • Independent targeted review scored 5/5 with zero P0–P2 findings.
  • Final exact-head composed-stack review at 7e5d6ba is clean at 5/5 with zero P0–P3 findings; adversarial supervisor coverage exercised all 27 immediate and 12 delayed recovery/closure outcome combinations.
  • Hosted current-head check and Bootstrap smoke (macOS) are successful.

Risks and boundaries

The schema upgrade is fail-closed for older executables. Legacy keyed receipts replay only when the original default-Codex request can be proven; otherwise Dispatch returns delivery_conflict. The stack remains ready for review and unmerged.

Closes: DIS-81

@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

DIS-81

@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 22308d3 to d3fa50c Compare September 13, 2026 18:20
@galligan galligan changed the title feat(delivery): freeze provider requests in reservations feat(delivery): freeze provider requests before submission Sep 13, 2026
@galligan
galligan marked this pull request as ready for review September 13, 2026 19:27
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes core delivery/idempotency semantics, registry schema (fail-closed upgrade), and provider submission paths; mis-handled replay or binding checks could duplicate or misroute work.

Overview
Keyed delivery now binds idempotency to caller-submitted intent, not post-resolution “effective” delivery. Dispatch records canonical submitted selector/mode/text/options in the registry (schema v26, separate from an immutable prepared provider request) and replays matching keys before thread resolution, intro rendering, settings reads, or provider I/O.

New reservations freeze target binding, transport, correlation ID, text, cwd, and turn settings at admit time; submission uses PreparedProviderRequest / submit_prepared with accepted / rejected / ambiguous outcomes. Legacy receipts without submitted intent replay only when the stable thread ID and original plain-text request are provable; otherwise delivery_conflict. Idempotency validation for send/queue/plain-text moves to the handler boundary (not SendInput model validation).

Reviewed by Cursor Bugbot for commit b1945e2. Configure here.

@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ab857975-9473-4632-a815-69ee9af66986)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T22:09:09.155599Z 6158f67 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from d3fa50c to 9dd9d88 Compare September 13, 2026 20:33
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_58c790a0-71de-41e9-89f1-494de92c8c6e)

@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 9dd9d88 to 48302ce Compare September 13, 2026 20:37
@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 48302ce7ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from 2616808 to f144b71 Compare September 13, 2026 20:48
@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 48302ce to 9bcc7d1 Compare September 13, 2026 20:48
@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 9bcc7d1495

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from f144b71 to d16e50b Compare September 13, 2026 22:02
@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 9bcc7d1 to 6158f67 Compare September 13, 2026 22:02
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c30beacc-86c2-475e-9475-32e46acb0688)

@galligan

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 6158f67c91

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from d16e50b to 1372196 Compare September 13, 2026 22:32
@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 6158f67 to 12551a1 Compare September 13, 2026 22:32
@galligan
galligan force-pushed the dis-94-prepare-request-correlated-native-hermes-gateway-execution branch from 1372196 to a588026 Compare September 13, 2026 22:50
@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 12551a1 to 6347de8 Compare September 13, 2026 22:50

galligan commented Sep 13, 2026

Copy link
Copy Markdown
Contributor Author

Merge activity

  • Sep 13, 11:23 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Sep 13, 11:36 PM UTC: Graphite rebased this pull request as part of a merge.
  • Sep 13, 11:36 PM UTC: @galligan merged this pull request with Graphite.

@galligan
galligan changed the base branch from dis-94-prepare-request-correlated-native-hermes-gateway-execution to graphite-base/117 September 13, 2026 23:33
@galligan
galligan changed the base branch from graphite-base/117 to main September 13, 2026 23:34
@galligan
galligan force-pushed the dis-81-freeze-provider-requests-in-the-shared-local-reservation branch from 6347de8 to b1945e2 Compare September 13, 2026 23:35
@cursor

cursor Bot commented Sep 13, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_e49b1299-7f8a-423f-91a1-47ff0106efef)

@galligan
galligan merged commit 27fcd57 into main Sep 13, 2026
9 checks passed
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