Repository navigation
Closed
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)kind/enhancementsource/design-architectFiled by the repo design architect jobFiled by the repo design architect jobstatus/triagedTriaged and routed (see agent note)Triaged and routed (see agent note)
Description
Phase 4 (closing audit) of design #4375 — read it bounded: one response-read contract for mcpx's outbound calls. Design doc: files/designs/code-mcpx-bounded-response-reads.md in the keep-the-four-repos-healthy goal workspace.
Gated on Phases 1–3 of #4375 landing (Phase 1 = #4354, Phase 2 = #4282, Phase 3 = #2114 / PR #3380). Do not start the audit before they land.
Scope
- Contract statement landed: the contract from Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 (error bodies are excerpts at
defaults.HTTPErrorBodyLimit; 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) is written intointernal/defaults/defaults.gobesideHTTPErrorBodyLimit, where the next outbound call site will find it. - Read inventory: every
resp.Bodyread and every buffered copy of a peer response inpkgs/mcpx(production code; test code excluded) is dispositioned against the contract — conforms / fixed in this audit if a single-site slip / filed as a named follow-up. The inventory is recorded on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 or in the defaults doc comment beside the contract statement. - Required dispositions (each recorded on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 with its reason):
- Remote embeddings error read (
internal/catalog/embeddings.go:101, unfiled at design time): decision 1 of Design: read it bounded — one response-read contract for mcpx's outbound calls #4375 applies (excerpt atHTTPErrorBodyLimit). Fix in this audit if it stays a one-line change; otherwise file it as a named follow-up. internal/cli/*reads from mcpx's own daemon (loopback/local endpoint): disposition each as deliberately-local or conforming — and name any site whose endpoint is configurable beyond the local daemon; such a site joins the contract and is fixed or filed, not waved through as local.- Decoder-streamed success paths (embeddings
Decode, cliDecode, the mcpclient JSON decoder path): streaming, but the decoded value itself is unbounded — record the disposition per path (the per-message / decoded-value bound questions are open questions on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375; this audit records, it does not silently expand the contract). - Stdin / file
io.ReadAllsites: out of scope — they are not peer bytes. Record that ruling so they are not re-audited as contract violations.
- Remote embeddings error read (
- Closing evidence on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375: all three origins (mcpx(model+scripting): OpenAI-compatible providers buffer response bodies whole — io.ReadAll uncapped, and the error path embeds the entire body in the error string #4354, mcpx(mcpclient): a non-JSON 200 reply is buffered whole with no size cap — Send's fallback io.ReadAll is unbounded while the error path in the same function caps at 4 KB #4282, mcpx(daemon): chat-completions proxy has no upstream timeout and buffers the whole upstream response in memory — proxyToUpstream uses http.DefaultClient and an uncapped TeeReader buffer #2114) closed or verified already-fixed, the contract statement landed, and the inventory complete.
Acceptance criteria
- The contract statement is present in
internal/defaults/defaults.gobesideHTTPErrorBodyLimitand matches Design: read it bounded — one response-read contract for mcpx's outbound calls #4375's four decisions. - The read inventory covers every production
resp.Bodyread / buffered peer-response copy inpkgs/mcpx, each with a disposition and a reason or a follow-up link. - All four required dispositions are recorded on Design: read it bounded — one response-read contract for mcpx's outbound calls #4375.
- No behaviour change beyond a single-site slip fix (the embeddings excerpt, if it qualifies); anything larger is filed as a named follow-up, not fixed inside the audit.
Filed by the design architect (pass 38, 2026-11-02) as Phase 4 of design #4375. Gated on Phases 1–3 (#4354, #4282, #2114) landing; stays status/blocked until then. Triage: record the gating and enqueue the implementation follow-up once the gating clears; do not start the audit early.
Metadata
Metadata
Assignees
Labels
app/mcpxPackage/app: mcpx (pkgs/ or apps/ in this repo)Package/app: mcpx (pkgs/ or apps/ in this repo)kind/enhancementsource/design-architectFiled by the repo design architect jobFiled by the repo design architect jobstatus/triagedTriaged and routed (see agent note)Triaged and routed (see agent note)
Activity
dezren39 commentedon Nov 2, 2026
Design architect, pass 38 (2026-11-02): this issue is Phase 4 (closing audit) of design #4375 — read it bounded. It is gated on Phases 1–3 landing (Phase 1 = #4354, Phase 2 = #4282, Phase 3 = #2114 / PR #3380) and carries
status/blockeduntil then; its triage packet is enqueued in the pilot queue (task 6247) so triage can record the gating. Do not start the audit before Phases 1–3 land. The four required dispositions (embeddings error read at catalog/embeddings.go:101; internal/cli own-daemon reads; decoder-streamed success paths; stdin/file reads ruled out of scope) are in the issue body — disposition each on #4375 with its reason.dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked
Triage verdict (task 6247, 2026-11-02):
pkgs/mcpx/internal/defaults/defaults.go:400-402holdsHTTPErrorBodyLimitwhere the contract statement must land;pkgs/mcpx/internal/catalog/embeddings.go(error path, ~:101) still does an unboundedio.ReadAll(resp.Body)— the unfiled fifth instance the audit must disposition. The phase as scoped in issue Phase 4 (audit) of #4375 — closing response-read inventory + contract statement for mcpx #4376 is independently landable once its gating clears; no rescope proposed.status/blockeduntil the phases land; task 6247 is parked on that condition instead of completing, so the follow-up enqueue duty cannot evaporate.dezren39 commentedon Nov 2, 2026
🤖 Agent note · parked — phase gating re-verified, unchanged
ghstate checks353 remaining items
dezren39 commentedon Nov 10, 2026
🤖 Agent note · triage verified — Phase 1–3 gate cleared, Phase 4 defects still live
pkgs/mcpx/internal/defaults/defaults.go:422-424carriesHTTPErrorBodyLimitwith only a two-line comment; grep for contract/excerpt/truncate terms in the file returns nothing — the four-part contract statement from the Phase 4 acceptance is absent.pkgs/mcpx/internal/catalog/embeddings.go:102still doesio.ReadAll(resp.Body)on the non-2xx path with no bound.io.ReadAll(resp.Body)at catalog/embeddings.go:102 (non-2xx), cli/client.go:494, cli/embeddings.go:102, cli/embeddings.go:154, cli/exec.go:425, cli/exec.go:518, cli/exec.go:708, cli/feedback.go:85, cli/feedback.go:149, cli/opcmd.go:552 — the cli/* sites are loopback-daemon reads needing the deliberately-local vs configurable-endpoint disposition;internal/mcpclient/sse.go:230already conforms (io.LimitReader(resp.Body, defaults.HTTPErrorBodyLimit)).dezren39 commentedon Nov 10, 2026
state: picked_up
task: 13050
lane: code-b (direct, #8187)
issue: #4376
Picked up task 13050. Gate check fresh 2026-11-10 (lane code-b): all #4375 phases landed — Phase 1 #4354 CLOSED, Phase 2 #4282 CLOSED, Phase 3 #2114 CLOSED with PR #3380 MERGED. The Phase 4 closing audit is unblocked and is being worked in this session: contract statement into internal/defaults/defaults.go, full resp.Body read inventory for pkgs/mcpx production code with dispositions, and the embeddings error-read fix if it is still the one-line slip the design named.
dezren39 commentedon Nov 10, 2026
state: parked
task: 13050
lane: code-b (direct, #8187)
issue: #4376
pr: #8273
Phase 4 audit complete and opened as PR #8273 (branch queue/13050-4376-response-read-audit, commit ee3b00f): the #4375 response-read contract statement is written into internal/defaults/defaults.go beside HTTPErrorBodyLimit, and the one named slip — the unbounded remote-embeddings error read in internal/catalog/embeddings.go — now excerpts at the limit. The full 51-site read inventory with dispositions and the closing evidence for all four phases is recorded on #4375. Filed from the audit: #8271 (openapi spec fetch silently truncates at its cap instead of refusing) and #8270 (TestNoPackageRedeclaresADefault red on clean main — proven pre-existing with this audit's changes stashed; go test ./internal/catalog/ passes, the defaults package failure is #8270's, not this PR's).
Parking task 13050: resume when PR #8273 has its Codex review round — disposition any findings, then merge (the PR closes this issue) and complete the task as fixed_merged.
dezren39 commentedon Nov 10, 2026
agent-note:v1
state: picked-up
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-10T21:55:00Z
Lane code-w claimed task 13050 (direct execution lane), resuming from the pr_opened checkpoint: PR #8273 (commit ee3b00f) carries the Phase 4 work for issue #4376 — contract statement in internal/defaults/defaults.go plus the embeddings error excerpt bounded at HTTPErrorBodyLimit; closing inventory posted on issue #4375 (comment 6779403880); follow-ups #8271 and #8270 filed. This shift: disposition the Codex round on PR #8273, verify targeted tests, merge, and complete task 13050. Issue #4376 revalidated fresh: OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels. Labels synced for claim.
test(mcpx/catalog): bound oracle for the embeddings error excerpt (#4376
Merge pull request #8273 from developing-today/queue/13050-4376-respo…
dezren39 commentedon Nov 10, 2026
agent-note:v1
state: done
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:10:00Z
Task 13050 complete (fixed_merged): PR #8273 merged as 5b82ec0; issue #4376 closed by the merge. This shift added the missing bound test (TestRemoteEmbedderErrorBodyBounded, commit d9e124a) and dispositioned the Codex round (review failed on usage limits; zero findings posted — see PR #8273 comment 6780003120). Remaining audit follow-ups live on issues #8271 and #8270. Lifecycle labels removed at terminal per protocol.