Repository navigation
Codex: repeat query lists only on reads; refuse an empty required list - #162
Conversation
… list Writes and computes keep sending one JSON value for a list, as they did before #160, so no write path changes. A required query list given as [] is INPUT_INVALID instead of being left out of the request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 385e830f1b
ℹ️ 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".
| export function setQueryParam(params: URLSearchParams, name: string, value: unknown): void { | ||
| if (Array.isArray(value)) { | ||
| export function setQueryParam(params: URLSearchParams, name: string, value: unknown, effect: CapabilityEffect): void { | ||
| if (Array.isArray(value) && effect === 'read') { |
There was a problem hiding this comment.
Preserve exploded lists for GET compute capabilities
A GET or HEAD operation explicitly marked x-omni-effect: compute is still accepted by collectInputs with a plain exploded query list and is eligible for the broker, but this condition serializes that list as one JSON value rather than the OpenAPI name=a&name=b form. Consequently, any such valid manifest sends a different request than before this commit (for example tags=%5B%22a%22%2C%22b%22%5D), which breaks endpoints that require exploded list parameters. Base the list encoding on the HTTP method/supported parameter shape, or retain repeated encoding for compute GET/HEAD capabilities.
Useful? React with 👍 / 👎.
Objective. Fix the two Codex findings on #160 (merged before review finished).
What changed
setQueryParamtakes the manifest's effect and repeats a list (name=a&name=b) only for a read. Compute, write and destructive capabilities keep sending one JSON value, exactly as before Send list-valued query parameters on reads (unblocks YouTube) #160. AcompileBringwrite with an array query input therefore dispatches what it always did, and Send list-valued query parameters on reads (unblocks YouTube) #160 changes no write path (AGENTS.md stop condition 3). Used the same way inexecute.tsand the broker.execute.tscheckInput: a required query list given as[]isINPUT_INVALID("part needs at least one value") instead of being silently omitted.What did not change. Read behavior from #160; compile rules.
Tests run. typecheck 0 errors; lint 0 errors (8 existing warnings);
npm test1638 passed, 1 failed (fieldHarness.test.ts, known Windows-only CRLF).listQueryParameters.test.ts: + non-read effects keep one JSON value; + empty required list refused with no request sent.Measurements. None. Known failures. fieldHarness on Windows only. Claim ceiling. Tested with fixtures. Architectural decisions introduced. List serialization depends on the manifest's effect.
Evidence that could falsify it. A write request carrying a repeated query name.
Next permissible package. Catalog rebuild after #161.
🤖 Generated with Claude Code