Skip to content

fix(responses): fail closed when stream replay classification fails - #825

Closed
luvs01 wants to merge 1 commit into
devfrom
fix/combo-replay-fail-closed
Closed

luvs01 wants to merge 1 commit into
devfrom
fix/combo-replay-fail-closed

Conversation

@luvs01

@luvs01 luvs01 commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Validate lifecycle snapshot tool_choice.type and text.format.type as strings without coercing upstream values.
  • Commit the original stream if replay classification throws, preserving its bytes instead of treating a later failure as permission to send the request again.
  • Preserve normal failover for valid empty lifecycle metadata and the required-tool preflight rules.
  • Tracks Daybreak finding.

Verification

  • Before the runtime change: 5 new regressions failed and the valid-metadata control passed.
  • bun test tests/routing/combo-stream-preflight.test.ts tests/routing/combo-required-tool-stream-preflight.test.ts: 482 passed, 13,686 assertions.
  • Coverage includes both malformed selectors, hosted-operation output, combined/separate SSE chunks, unchanged response bytes, and a throwing replay classifier.
  • bun run typecheck: passed, 2,536 source files.
  • bun run structure:check, bun run privacy:scan, git diff --cached --check: passed.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 passed.
  • Fresh independent review found no remaining blocking issue and traced the accepted response through the combo consumer. Regression execution uses the real preflight with local streams; it does not execute a live hosted tool or second-provider request.
  • Local validation is focused; the whole import-graph suite includes live-provider tests. Broader automatic checks remain with CI.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Owning replay boundary contract updated.
  • Security-sensitive changes reviewed for secrets, authorization, and unsafe defaults.

Devin Review

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Nov 16, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

luvs01 commented Nov 16, 2026

Copy link
Copy Markdown
Owner Author

Recording the transfer evidence for this already-closed duplicate: work continues in lidge-jun/opencodex#8805. Both PRs were verified at the same implementation commit b5bb131a81357c53fcaa1d4d5cad9c45a6c577bd, and upstream CI 43812128369 passed. Follow-up review corrections continue on the upstream PR; the shared head branch is retained.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant