Skip to content

fix(profile): preserve receipts across request copies - #112

Merged
drewstone merged 1 commit into
mainfrom
fix/profile-receipt-timeout-20260803
Aug 3, 2026
Merged

fix(profile): preserve receipts across request copies#112
drewstone merged 1 commit into
mainfrom
fix/profile-receipt-timeout-20260803

Conversation

@drewstone

Copy link
Copy Markdown
Owner

Follow-up to #111.

The real HTTP route can clone a request twice before execution:

  • the timeout wrapper injects an operator fallback into an effective request;
  • sandbox delegation adds the selected in-container backend to a delegated request.

Profile materialization writes its v2 acknowledgment on the request object received by the backend. Before this fix, the response and durable run read the original request, so either clone could strand the acknowledgment even though materialization succeeded.

This change relays the acknowledgment from every execution request to the route-owned request before each delta and again at iterator completion. A silent backend still produces one acknowledgment-only metadata delta, so durable state and non-streaming/streaming callers receive it.

Proof:

  • pnpm exec vitest run tests/execution-timeout.test.ts tests/durable-runs.test.ts tests/smoke.test.ts tests/sse-keepalive.test.ts — 114/114
  • pnpm test — 621 passed, 6 skipped
  • pnpm build — passed
  • git merge-tree --write-tree origin/main HEAD — clean tree 7c7572e9c4793922c7cd58cf638ff0ad8589addf

New real-route cases cover:

  • operator-timeout request copy with normal terminal output;
  • operator-timeout request copy with zero backend deltas;
  • sandbox-delegated request copy with zero backend deltas.

@drewstone
drewstone merged commit 2f70d5b into main Aug 3, 2026
1 check 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