Skip to content

fix(compaction): keep hosted search history as bounded reference notes in portable summaries (carry #6746) - #6799

Merged
lidge-jun merged 4 commits into
devfrom
codex/l3-hosted-search-carry
Oct 9, 2026
Merged

lidge-jun merged 4 commits into
devfrom
codex/l3-hosted-search-carry

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Maintainer carry of #6746 by @yuanyuanlove, so the full CI can run on an origin branch.

Portable compaction removes tool declarations before asking another model for a summary, but it left hosted web_search_call items in the input. An upstream can reject hosted history that has no tool declaration, so the summary failed. Responses Lite also requires parallel_tool_calls=false even when the request declares no tools, and the summary body removed that field.

After this change the portable summarizer (buildRoutedCompactionBody in src/adapters/openai-responses/passthrough.ts) renders each remaining hosted call, after bridge restoration, as a labeled reference note in its original position (src/adapters/openai-responses/compaction-search-history.ts). The note keeps an allowlist of string fields (status; action type, query, queries, URL, pattern; source type, URL, title) and drops opaque state, IDs and unknown fields. Lite summaries keep parallel_tool_calls: false. Ordinary turns, native compaction and stored history are unchanged.

Maintainer changes on top of the contributor's two commits:

  • The note is an assistant output_text reference message instead of a user message. The search was the assistant's own past action, and a user-role note would give web-sourced titles and URLs the user's authority.
  • Copied values are bounded: strings are cut at 2048 code units (never splitting a surrogate pair), queries and sources keep their first 20 entries without copying the rest, and one summary request carries at most 64 KiB of notes. Later hosted calls collapse into one omission note whose size is reserved inside that budget. Request body limits are off by default, so the projection carries its own bound.
  • The docs-site configuration page had a sentence spliced into the middle of another; the paragraph is rewritten. structure/transports/responses-failover.md describes the caps and stays at 600 lines.

Co-authored-by: panyuanyuan panyuanyuan@hetao101.com
Co-authored-by: yuanyuanlove 6202754+yuanyuanlove@users.noreply.github.com

Verification

  • bun test tests/responses/responses-compaction-override.test.ts tests/web-search/web-search-bridge-replay.test.ts tests/responses/responses-compaction-routing.test.ts tests/responses/openai-responses-passthrough.test.ts: 395 pass, 0 fail. New cases: Lite with hosted history, field and list caps with an instruction-like query that stays inside the labeled note, and 60 large hosted calls that stay under 64 KiB with exactly one omission note.
  • bun run typecheck, bun run structure:check, bun run privacy:scan: pass.
  • Independent gpt-6-sol code review: PASS after one fix (bounded list collection).
  • Rebased on dev at fd20320.
  • The full bun run test suite was not run locally (lane constraint: minimal local tests, several worktrees running in parallel). Exact-head hosted CI is the full-suite evidence. The summary requests in tests use stubbed upstreams; the contributor's PR reports live smoke runs against real Lite and non-Lite summarizers before these amendments.
  • Another open carry in this lane touches the same raw-body repair path; whichever lands second is re-checked on top of the other.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. The note lowers web-sourced text to assistant reference data and bounds its size; no auth, credential or workflow code changes and no new logging.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 9, 2026 02:06
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ab0fd21c-bbbd-42ee-b932-c0dc55e212b5
📥 Commits

Reviewing files that changed from the base of the PR and between fd20320 and be49c61.

📒 Files selected for processing (6)
  • docs-site/src/content/docs/reference/configuration/server.md
  • src/adapters/openai-responses/compaction-search-history.ts
  • src/adapters/openai-responses/passthrough.ts
  • structure/transports/responses-failover.md
  • tests/responses/responses-compaction-override.test.ts
  • tests/web-search/web-search-bridge-replay.test.ts
  • Autopilot · 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

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T02:09:18.330355Z be49c61 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Oct 9, 2026
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added bug Something isn't working and removed intake: hygiene-blocked Deterministic PR hygiene checks failed labels Oct 9, 2026
@lidge-jun
lidge-jun merged commit f7d6c04 into dev Oct 9, 2026
32 of 35 checks passed
@lidge-jun
lidge-jun deleted the codex/l3-hosted-search-carry branch October 9, 2026 03:54
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.

2 participants