Repository navigation
fix: bound pasted input and provider response bodies - #110627
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 8:50 AM ET / 12:50 UTC. Summary PR surface: Source +137, Tests +379, Docs +1, Generated 0, Other +4. Total +521 across 38 files. Reproducibility: unclear. for an independently run reproduction: the branch includes deterministic stream and timeout tests, but this review has no directly inspectable after-fix terminal, loopback, or runtime artifact. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep strict-schema traversal private to the AI/runtime boundary, remove the release-owned changelog edit, and attach redacted terminal or loopback proof showing both bounded stdin rejection and a slow-drip body being cancelled within its total budget. Do we have a high-confidence way to reproduce the issue? Unclear for an independently run reproduction: the branch includes deterministic stream and timeout tests, but this review has no directly inspectable after-fix terminal, loopback, or runtime artifact. Is this the best way to solve the issue? No. The bounded-I/O repair is a reasonable shared direction, but the strict-schema diagnostic should remain private unless a maintainer deliberately sponsors it as Plugin SDK API. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e01a880084dc. Label changesLabel justifications:
Evidence reviewedPR surface: Source +137, Tests +379, Docs +1, Generated 0, Other +4. Total +521 across 38 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eab0a00e4d
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| params.url, | ||
| { method: "GET" }, | ||
| params.timeoutMs ?? DEFAULT_TIMEOUT_MS, | ||
| timeoutMs(), |
There was a problem hiding this comment.
Thread deadlines into guarded error-body reads
When a MiniMax generated-music download returns non-2xx headers and then drips a small error body, this new resolver is only used for fetchWithTimeoutGuarded; the immediately following assertOkOrThrowHttpError is still called without bodyTimeoutMs, so its diagnostic-body read can wait indefinitely before retrying or failing. Pass the same deadline resolver into the assert call so failed downloads are bounded the same way successful bodies now are.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9465e6c30
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Only recurse through JSON Schema applicators. Annotation payloads such as | ||
| // examples/default may contain arbitrary objects that are not schemas. | ||
| for (const key of OPENAI_STRICT_COMPAT_SCHEMA_NESTED_KEYS) { | ||
| const value = record[key]; | ||
| if (value && typeof value === "object") { | ||
| violations.push(...findOpenAIStrictSchemaViolations(value, `${path}.${key}`)); | ||
| } |
There was a problem hiding this comment.
Keep strict-mode compatibility in sync with diagnostics
For schemas whose annotation payloads contain schema-looking keys (the new test uses examples: [{ anyOf: ... }], and $defs can have a definition named anyOf), this helper now returns no violations, but resolveOpenAIProjectedToolsStrictToolFlag still calls isStrictOpenAIJsonSchemaCompatible, whose recursive fallback walks every non-properties entry in packages/ai/src/providers/openai-tool-schema.ts:242-248. The result is strict=false with zero diagnostics in openai-responses-tools.ts / openai-transport-params.ts, so users lose strict tool mode and the debug message claims 0 incompatible schemas; align the compatibility walk with the same schema-map/applicator traversal used here.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
When a configured OpenAI video download uses allowPrivateNetwork or a dispatcher policy, this guarded branch now shares the new deadline between the header fetch and successful body read, but a non-2xx response still lets assertOkOrThrowHttpError read the diagnostic body without bodyTimeoutMs. If the provider or proxy drips an error body, the operation can hang here before releasing or retrying; pass the same timeout resolver/on-timeout error into the assert call.
When xAI video polling or generated-video download gets a non-2xx response with a slow body, this helper still calls assertOkOrThrowHttpError without any body deadline even though callers now pass a resolver to bound fetches and successful downloads. That leaves the error path able to stall before retry/release; derive a request/body deadline from params.timeoutMs and pass it into the assert call.
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…d-io # Conflicts: # scripts/check-control-ui-performance.mjs
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aa215e7158
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await waitProviderOperationPollInterval({ deadline, pollIntervalMs: POLL_INTERVAL_MS }); | ||
| } | ||
| throw new Error(`Vydra job ${params.jobId} did not finish in time`); | ||
| return await pollProviderOperationJson<unknown>({ |
There was a problem hiding this comment.
Preserve Vydra array status payloads
When a Vydra job-status response is an array of result objects, the old loop parsed it with readProviderJsonResponse and then extractVydraResultUrls could recurse the root array and complete the job. Routing this through pollProviderOperationJson now uses the shared object-only reader in src/media-understanding/shared.ts, so the same completed array payload is rejected as malformed before URL extraction runs.
Useful? React with 👍 / 👎.
|
Merged via squash.
|
* refactor(runtime): centralize bounded I/O handling * fix(runtime): finalize bounded I/O contracts * chore(security): drop stale audit import * docs(changelog): credit bounded I/O fixes Co-authored-by: Pick-cat <[email protected]> * fix(agents): keep provider HTTP options private * fix(ai): traverse OpenAI schema maps by value * fix(runtime): preserve absolute download deadlines * ci(ui): stabilize compressed CSS budget * fix(ai): traverse legacy schema applicators --------- Co-authored-by: Pick-cat <[email protected]>
* refactor(runtime): centralize bounded I/O handling * fix(runtime): finalize bounded I/O contracts * chore(security): drop stale audit import * docs(changelog): credit bounded I/O fixes Co-authored-by: Pick-cat <[email protected]> * fix(agents): keep provider HTTP options private * fix(ai): traverse OpenAI schema maps by value * fix(runtime): preserve absolute download deadlines * ci(ui): stabilize compressed CSS budget * fix(ai): traverse legacy schema applicators --------- Co-authored-by: Pick-cat <[email protected]>
* refactor(runtime): centralize bounded I/O handling * fix(runtime): finalize bounded I/O contracts * chore(security): drop stale audit import * docs(changelog): credit bounded I/O fixes Co-authored-by: Pick-cat <[email protected]> * fix(agents): keep provider HTTP options private * fix(ai): traverse OpenAI schema maps by value * fix(runtime): preserve absolute download deadlines * ci(ui): stabilize compressed CSS budget * fix(ai): traverse legacy schema applicators --------- Co-authored-by: Pick-cat <[email protected]>
Related: #109800
Related: #109210
Related: #109111
Related: #108310
Related: #109185
What Problem This Solves
Fixes issues where users piping auth or config input could make the CLI buffer an unbounded stream, and where slow-drip provider or NAS response bodies could keep operations alive beyond their wall-clock budgets.
The same review also found duplicated provider polling/error-body logic and an unreachable OpenAI tool-schema compatibility branch that made these timing and schema invariants harder to maintain.
Why This Change Was Made
This consolidates the five reviewed drafts into one bounded-I/O design:
The deterministic native SSE outer-abort regression from #109185 is already present on current main and remains green on this head, so it is not duplicated here.
AI-assisted. I reviewed the final control flow, dependency contract, timeout ownership, cleanup behavior, schema traversal, and generated API surface.
User Impact
Oversized pasted input now fails at a bounded stream boundary. Vydra, BytePlus, Runway, Together, OpenAI, xAI, and MiniMax generation paths now respect total operation budgets even when a CDN drips bytes continuously. Synology Chat user lookups retain their wall-clock deadline behavior. Existing provider retry semantics and public Plugin SDK exports are unchanged.
Thanks @Pick-cat for the original reports, fixes, and regression coverage.
Evidence
aa215e7158f16a7383b9a727ced0eff0bfb4fc2b: https://github.com/openclaw/openclaw/actions/runs/29644967892dependencies,additionalItems,contentSchema, and property-dependency arrays.responses_api.rs, while Codex sanitizes submitted JSON schemas injson_schema.rs.