Skip to content

docs(mcpx): #4375 response-read contract + bounded embeddings error excerpt (#4376) - #8273

Merged
dezren39 merged 2 commits into
mainfrom
queue/13050-4376-response-read-audit
Nov 10, 2026
Merged

dezren39 merged 2 commits into
mainfrom
queue/13050-4376-response-read-audit

Conversation

@dezren39

@dezren39 dezren39 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

Phase 4 (closing audit) of design #4375 — one response-read contract for mcpx's outbound calls. All three gated phases have landed (#4354, #4282 closed; #2114 closed with PR #3380 merged).

  • Contract statement landed in pkgs/mcpx/internal/defaults/defaults.go beside HTTPErrorBodyLimit: the four decisions (error bodies are excerpts at the limit; a buffered success body is refused past its named cap, never silently truncated; a retained copy is truncated while the delivered stream is not; every outbound call carries a deadline as well as a byte bound), plus the audit summary.
  • The one slip fixed: internal/catalog/embeddings.go's remote-embeddings error path read the body whole (io.ReadAll(resp.Body)); it now excerpts at defaults.HTTPErrorBodyLimit per decision 1 — the single behaviour change this audit's acceptance allows.
  • Full read inventory (every production resp.Body read / buffered peer-response copy in pkgs/mcpx, each dispositioned) is recorded on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 with the closing evidence. Filed from the audit: mcpx(openapi): spec fetch truncates silently at 32MiB instead of refusing past the cap (#4375 contract decision 2) #8271 (openapi spec fetch truncates silently at its cap instead of refusing — decision 2 deviation, two sites, deliberately not fixed inside the audit).

Tests

Merge Danger

Door: two-way

Blast Radius: low

One bounded-read change on an error path plus a doc comment. No success-path behaviour changes.

Closes #4376


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 10, 2026 21:12
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-10T21:12:30.635042Z
We couldn’t complete this review. Comment @codex review to try again.
ee3b00f 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.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

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 32 seconds.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2c91acc-9c1c-4cab-875d-9a288413aa98
Commits

Reviewing files that changed from the base of the PR and between 49c7267 and d9e124a.

Files selected for processing: 3

  • pkgs/mcpx/internal/catalog/embeddings.go
  • pkgs/mcpx/internal/catalog/embeddings_error_bound_test.go
  • pkgs/mcpx/internal/defaults/defaults.go
  • Autofix · 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

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
state: merge-ready
queue: repo-health-code-pilot
task: 13050 (small_fix, worker repo-worker-code, lane code-w)
by: repo-worker-code lane code-w
at: 2026-11-10T22:05:00Z

Codex gate disposition for PR #8273: the Codex code review FAILED TO RUN — its summary comment records status "failed" and the follow-up comment states the Codex usage limit for code reviews was reached. Verified fresh this shift: zero Codex review submissions and zero inline review comments exist on this PR, so there are no Codex findings to disposition — nothing is being merged past. (The review-state metadata flags has_any_findings=true for the failed run itself; no finding text was ever posted.)

Substituted verification by the merging lane: diff reviewed line-by-line (embeddings.go LimitReader bound at defaults.HTTPErrorBodyLimit; defaults.go contract statement — both exactly on the #4376 acceptance). Missing test supplied in d9e124a: TestRemoteEmbedderErrorBodyBounded (oracle: contract decision 1 — a non-200 body over the limit yields an error excerpt of exactly HTTPErrorBodyLimit bytes). Targeted tests on the laptop: go test ./internal/catalog/ PASS (incl. the new test); go test ./internal/defaults/ fails only TestNoPackageRedeclaresADefault, byte-identical failure on clean main (pre-existing, flags mcpauth/testsupport lines this PR never touches). Merging under the standing criteria.

@dezren39
dezren39 merged commit 5b82ec0 into main Nov 10, 2026
3 of 10 checks passed
@dezren39
dezren39 deleted the queue/13050-4376-response-read-audit branch November 10, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant