Conversation
…ivery Adapt the JSON/error inspection work from #177 and #106 to current dev. Forward original bytes on demand, bound the diagnostic copy, finalize EOF/error/cancel exactly once, and preserve current SSE terminal and post-disconnect drain ownership. Add shared lifecycle regressions plus deferred-log integration and a late SSE terminal guard. Full Bun validation remains pending.
|
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: trueThanks 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 |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
1/4 boxes ticked. This PR stays in draft until every box above is ticked. |
리뷰 · 우선순위 68 / 80이 PR은 비-SSE JSON/에러 응답 로그 검사에서 #4742만의 자산은
메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
|
Closing as superseded by #4775, following the owner review above and the current dev backlog consolidation. #4775 retains the bounded non-stream inspection work and also covers SSE inspection pacing and terminal ownership; maintaining two competing implementations of relay.ts/response-log-body.ts is not a separate delivery plan. This is a duplicate/supersession close, NOT a claim that #4775 has merged, passed its remaining gates, or shipped in a release. #4775 remains the active implementation and review target. Any additional useful assertions from this PR can be retained there; the commits and discussion here remain available if the successor is withdrawn. No branch is deleted. |
Summary
response.text()/ re-encoding path inresponseWithDeferredRequestLogwith one pull-driven relay that forwards the original bytes immediately. Slow downstream readers do not cause a separate inspection branch to drain ahead. Preserve the response status, status text, headers, and existing log parser/accounting ownership.This is a fresh implementation of the remaining non-streaming issue described by luvs01/opencodex#177, incorporating the earlier non-JSON work in luvs01/opencodex#106. It is based on
dev3070d64 rather than carrying the old consolidated branch wholesale. The three existing modified files were confirmed unchanged between the initial inspected base and this refreshed base before carrying the five-file change set.SSE scope is deliberately unchanged. The old proposal's total-stream inspection cutoff is not carried: detaching a healthy long SSE observer can lose its terminal, usage, and completed-response callback. Current per-frame/output-item bounds and bounded post-disconnect drain ownership remain intact. A regression explicitly places an SSE terminal after more than the JSON inspection budget. The source fork PR remains unchanged.
Verification
Published implementation commit: 02be039.
Executed locally
tests/helpers/response-log-body-cases.tsagainst the new production helper. A temporarynode:testrunner and extensionless-TypeScript resolver were used with--experimental-strip-types; these local harness files are not part of the PR. This is WHATWG-stream helper evidence, not a Bun integration or full-suite result.src/server/response-log-body.tsand the shared case module, including--noUncheckedIndexedAccess. The check used ES2022, DOM and Node test types with bundler module resolution. This is not a repository-wide typecheck claim.git diff --no-index --checkreported no whitespace findings for the two existing TypeScript files.Not yet executed / required before review readiness
bun test tests/server/consume-for-inspection-cancel.test.ts, the repository typecheck,bun run test:changed, and the required full-suite gate before marking review-ready.bun run structure:check, the remaining owner-document/public-documentation synchronization audit, and hosted CI are pending. The specific byte-accounting document is updated; a complete documentation-gate pass is not claimed.Checklist
Review readiness checklist