Repository navigation
fix(responses): normalize explicit incomplete reasons - #7122
Bortlesboat wants to merge 4 commits into
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueNo actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. This PR stays in draft until every box above is ticked. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…normalization # Conflicts: # scripts/test-layout/layout.json # tests/fixtures/test-layout-expected.json
…normalization # Conflicts: # scripts/test-layout/layout.json
|
Being carried into #7218 with your authorship preserved; this PR will be closed when the bundle lands. |
…continuation tests and MiMo envelope repair (#7122, #7152, #7068, #7214) (#7218) Carried from #7122, #7152, #7068, #7214 (one commit per source PR, original authors preserved). #7095 held out. Remote exact-head validation (hosted GitHub Actions stalled; local tests not run by maintainer rule): union candidate codex/prr-integ-6 (368006f, tree 27fdc37) on mini (Windows) and lidge (Linux), typecheck + full suite, compared with base-dev 4ae4936 on each host. Co-authored-by: Bortlesboat <169967362+Bortlesboat@users.noreply.github.com> Co-authored-by: AK <info@atelier-sai.jp> Co-authored-by: Aditya Rawat <adirwt852@gmail.com> Co-authored-by: shirruy <shirruy@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Normalize known
incomplete_details.reasonaliases across every Responses delivery path. Output-limit aliases such aslengthbecomemax_output_tokens; refusal/filter aliases becomecontent_filter. Unknown reasons, canonical reasons, partial output, usage, messages and retryability retain their existing behavior.The contributor's bridge SSE/JSON and direct Chat/Messages fix is retained. A follow-up covers native Responses SSE/JSON delivery, WebSocket
response.incompleteandresponse.doneframes (including native control chains), and the passthrough adapter's compaction parsers. Only response metadata is rewritten; nested user output stays opaque. No dependencies or provider configuration changed.Closes #7082.
Verification
Bun 1.4.3, macOS; validation used the repository's isolated test runner.
OCX_TEST_NO_QUEUE=1intentionally permits this lane to coexist with other triage lanes, with one test worker.bun run typecheck: passed.OCX_TEST_NO_QUEUE=1 bun scripts/test.ts tests/responses/incomplete-reason-normalization.test.ts tests/adapters/bridge-nonstreaming-terminal.test.ts tests/responses/protocol-direct-encoders-chat.test.ts tests/responses/protocol-direct-encoders-messages.test.ts --parallel=1: 262 passed, 0 failed, 736 assertions. The new file adds 81 cases. Before the follow-up runtime fix, the initial 72-case matrix had 36 pass / 36 fail on the contributor head; all 36 missing-boundary regressions now pass.OCX_TEST_NO_QUEUE=1 bun scripts/test.ts tests/responses/ws-upstream.test.ts tests/responses/sse-failed-tail.test.ts --parallel=1: 217 passed, 1 skipped, 0 failed, 1,463 assertions. The existing skip is a version-gated older-runtime case.OCX_TEST_NO_QUEUE=1 bun scripts/test.ts tests/test-layout.test.ts tests/test-layout-tooling.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/structure-ssot.test.ts tests/lab/core-lab-boundary.test.ts --parallel=1: 112 passed, 0 failed, 847 assertions.bun run structure:check,bun run privacy:scan,git diff --check: passed.docs-site/,bun install --frozen-lockfileandbun run build: passed; 577 pages, 81,200 internal links checked.OCX_TEST_NO_QUEUE=1 OCX_TEST_MAIN_TIMEOUT_MS=60000 bun run test:changed --parallel=1: intentionally bounded for the shared 16-core machine; exit 124, with 1,107 passing records across 61 started files and no failure records before termination. This is incomplete validation, not a passing changed suite.Resource exception: several implementation lanes share this machine, so the full
bun run testwas not run. Focused behavior, transport and structural checks above provide local coverage; the remaining broad Linux coverage belongs to the exact-head Ubuntu PR CI. macOS/Windows workflows were not manually dispatched.Historical Linux failures: the contributor reported 30,981 pass / 44 skip / 14 fail / 4 errors in a broad Linux run, with a bounded base comparison. The complete original failing-file logs were not attached, so this lane does not assert attribution for every historical failure. It independently ran
OCX_TEST_NO_QUEUE=1 bun scripts/test.ts tests/cli/cli-access-audio-live.test.ts --parallel=1in fresh isolated runs at this head and the exact unchanged base7640a942b35044c974e534b84d5a8049f4a8ae9a: both had 33 pass / 3 fail / 3 errors, in the same parameterizednative open and non-readiness events cannot claim readinesscases (5-second test timeouts). The test file is byte-identical between revisions. This confirms that failure family is inherited on this host; it does not claim the original Linux run was green.Checklist
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
Behavior Updates
Documentation