Repository navigation
fix(#2308): preflight Responses summary extraction excludes reasoning items/parts - #2310
Merged
Merged
Conversation
added 2 commits
October 7, 2026 14:13
…n-passing minor fix, unrelated to #2308)
Contributor
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.2443-pr.2310.f8e6683This exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr2310.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Owner
Author
[bot] 🏷 PR #2310 review 结论 — 可合(mergeable) 独立核验(不只信描述,全部实际跑过):
结构化七问:
协调提示(不阻塞本 PR):#2311(preflight Responses 姊妹修复,#2309)与 #2306(launcher preset-table 重构)仍 open 且触碰相同文件区域——若任一先合并,请先 rebase #2310 并重跑 preflight/launcher 套件再合。 判定:可合——方向正确(根因修复)、测试有牙、diff 干净、CI 全绿。合并请人工操作:#2310 |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.103-master.0beb2e1 # this exact build
npm install -g billion-context@master # always the newest merged build
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2308
What changed
extractSummaryText()(src/preflight.ts) — the Responses branch now reads only assistant message bodies: an explicitly-declared item type must bemessageand an explicitly-declared part type must beoutput_text; reasoning-family items/parts (reasoning/reasoning_text,summary_text, …) no longer leak into the extracted summary. Typeless shapes stay accepted for gateways that omittype, and the top-leveloutput_textcompat form is untouched. Both entry shapes are fixed by the one shared helper: the JSON branch (requestSummary) and the SSE terminals (response.completed/response.output_item.done).Behavior change (the fix itself, disclosed per policy):
.textwas concatenated regardless of declared type → model thinking persisted inside saved summaries (real-world case from the issue: 12,341 chars of reasoning_text mixed into a 7,054-char summary);""and routes into the existing unusable-summary diagnosis chain ([Bug] Codex 额度中断后恢复长会话,preflight SSE 摘要为空并持续 502 #726/fix: recover preflight from empty SSE summaries + dead-end cooldown (#726) #727) instead of being saved as a summary.No config surface added. No wire/session/persistence changes. Both compression modes unaffected (preflight is the server-side backstop in both; plugin-mode agents own their own summaries and never hit this extractor).
Tests
New suite
tests/preflight-responses-reasoning-extract.test.tspins: JSON/SSE × completed/item.done with reasoning present, reasoning-only →"", valid-delta fallback when completed carries only reasoning, typeless gateway compat, top-level output_text compat, multi-message concatenation with explicit non-message types excluded. The issue's minimal repro (expected 79 chars, got 1529) now returns exactly the 79-char final body.Local (targeted): typecheck clean; all 149 preflight-* suites pass; launcher suite 281/281. Full regression left to CI.
In-passing minor fix (separate commit, unrelated to #2308)
src/launcher.ts: dropped the leadingexportfrom internal-onlycodexRewriteInsertionIndex— the CIunused-exportsjob was red on master before this PR (verified against a clean checkout). One word, zero behavior change, makes this PR's CI green.