fix(responses): make whole-string citation stripping agree with the streaming filter - #3882
Conversation
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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesCitation marker alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Citation stripping now preserves malformed marker text while removing only valid bounded citation spans, with streaming and whole-string output aligned. The covered boundary and chunking cases leave no active merge-readiness risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
5d2d3cb to
1586d9e
Compare
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 73 / 80이 PR은 방금 이 패치는 통째 경로도 스트리밍과 같은 규칙으로 맞춥니다. START부터 다음 START(또는 끝)까지를 한 구간으로 보고, 그 안에 END가 있고 길이가 상한 안이면 그 스팬만 지웁니다. END가 없거나 상한을 넘으면 malformed 일반 텍스트로 남깁니다. 상한 이름도 테스트가 계약을 직접 잠급니다. 과대 malformed 뒤에 정상 스팬이 오면 malformed는 남고 정상만 빠집니다. 이어 붙은 START끼리도 앞 조각이 뒤 END에 먹히지 않습니다. 그리고 여러 입력을 청크 크기 1·7·4097·통째로 잘라 스트리밍 drain 결과와 로컬 검사는 메인테이너 지시로 NOT RUN이고 CI는 머지 전 기록 예정입니다. 독립 astra 리뷰는 PASS로 적혀 있습니다. 범위가 작고 회귀 축이 분명해서, CI만 초록이면 머지 가치가 큽니다.
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
1586d9e to
85a3fee
Compare
…treaming filter After #3868 the streaming filter keeps a malformed START verbatim when a later START opens a real span, but stripCitationMarkers still paired the first START with that later span's END and deleted everything between. bridge.ts re-strips the accumulated text for output_text.done and output_item.done, so the terminal text disagreed with the concatenated deltas. Walk START-delimited segments in the whole-string path too, and share the 4096 span bound with the whole-string path (an over-bound span that is terminated late is malformed text in both), and assert delta-vs-whole equality across several chunkings. Found by the lane A fresh-base composition audit on dev d00615d. Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
85a3fee to
e96b5c5
Compare
Summary
After #3868 the streaming citation filter keeps a malformed START verbatim when a later START opens a real span, but
stripCitationMarkersstill paired the first START with that later span's END and deleted the text between.src/bridge.ts:615re-strips the accumulated message foroutput_text.done/output_item.done, so the terminal text disagreed with the concatenated deltas. This makes the whole-string path walk START-delimited segments exactly like the streaming filter.Found by the lane A fresh-base composition audit on
dev@d00615d56(anchors:src/responses/citation-markers.ts:48,src/bridge.ts:615). Follow-up to the #3843 carry; Co-authored-by trailer kept.Verification
tests/responses/citation-markers.test.ts: malformed START before a later valid span is kept in whole-string mode; concatenated streaming output equals whole-string stripping for four inputs × four chunkings (1, 7, 4097, whole).--no-verify.Checklist
Summary by CodeRabbit
Independent review (astra explorer, read-only) — PASS at amended head. The shared 4096 bound closes the chunk-dependence gap the first round found: the whole-string path and the streaming filter now classify every START-delimited segment identically (in-bound END = span removed; over-bound or superseded = verbatim). Hand-traced all existing tests plus the late-END and at-bound equivalence inputs across chunk sizes 1/7/4097/whole. Callers
bridge.ts:615and:1707change only in the intended way.Maintainer integration decision (MAINTAINERS.md, dev-only admin integration): @lidge-jun integrates #3882 (+ docs follow-up #3888) into
dev. Exact-head evidence for #3882 ate96b5c52e: Cross-platform CI run 34114667385 — Linux test 1/4–4/4, macOS 1/2, 2/2, gates, storage policy, api usage, keyring ×3, npm-global ×3, docker smoke = success; Windows shards and macos control deferred to the final release-train head by maintainer policy. #3888 is docs-only on top of #3882. Independent review PASS at the amended head (see body). Local suites NOT RUN. Maintainer integration, not self-approval.