Repository navigation
chore: regenerate catalog from OpenAPI spec - #104
Conversation
|
Claude finished @github-actions[bot]'s task in 2m 33s —— View job Catalog diff review
Action count: 134 → 139. Purely additive: 5 actions added, 0 removed. The 2 deleted lines in the diff are both halves of one reworded description ( 1. Actions added (5)
All five are 2. Actions removedNone. No confirmation against 3. Actions changed (4) — all parameter additions, no removals
No parameters removed, no schema narrowed, nothing newly marked 4. Dangling referencesNone — nothing was removed or renamed, so nothing can have gone stale.
5. Sanity checks
Two things worth a look before merginga)
Whether Kosli's router accepts a percent-encoded slash there, or expects a greedy multi-segment match, is a server-side question the catalog can't answer. Worth one live call against a policy with a nested file before users hit it. This is the first catalog action whose path param is itself path-shaped. b)
The ids are unique so no test breaks, but What I could not verify
Separately, and outside this PR's scope: Verdict: additive, internally coherent, no removals to confirm, no stale references. Safe to merge on the catalog's own terms; item (a) is the only thing I'd want answered first, and it can equally be a follow-up. |
…ng (#105) ## What this fixes for users Ask Claude "show me the flows tagged team:platform or team:security" and the model calls `list_flows` with `tag: ["team:platform", "team:security"]`. The server sent that as one query entry: ``` GET /api/v2/flows/acme?tag=team%3Aplatform%2Cteam%3Asecurity ``` The API reads that as a single tag literally named `team:platform,team:security`. No flow has it, so the answer is an empty list, and the user is told there are no such flows. There is no error, because a comma is a legal tag character. For enum and integer lists, such as `list_evaluations` `outcome` and `version` in #104, the API instead rejects the comma-joined value with a validation error. After this PR the key is sent once per element, which is what the API expects: ``` GET /api/v2/flows/acme?tag=team%3Aplatform&tag=team%3Asecurity ``` A one-element list serialised the same either way, so every single-value filter worked and the bug only showed when a question needed two or more values. The second commit covers a related case: these filters are typed array-or-null, and a model that passes `null` for "no filter" was sending `?tag=null`, again returning nothing. `null` now means not supplied. ## Summary `KosliClient.execute` serialised a GET/DELETE query with `URLSearchParams.set(k, String(v))`, so an array like `["allow", "deny"]` was sent as one `?outcome=allow,deny` entry. The Kosli API declares every list query parameter as FastAPI `List[...] = Query()`, which reads the key repeated (`?outcome=allow&outcome=deny`) and refuses or literally matches a comma-joined value. Single values worked, so this only showed up when the model passed two or more. Eighteen catalog actions on `main` already take such parameters (`list_flows` `tag`, `list_environments` `type`, `list_audit_log` `role`, ...), and #104 adds `get_trail` `exclude` and `list_evaluations` `version`/`outcome`. ## Changes - Each array element appends its own query entry; scalars are unchanged. - A query that serialises to nothing (for example an empty array) sends no trailing `?`. - Tests for scalar, repeated and empty array query parameters. - One line in `CLAUDE.md` recording the convention next to the existing "change how params are serialized" note. The multipart branch already repeated array keys, so the two branches now agree. ## Test plan - [x] `npm test` (138 passing) - [x] `npm run typecheck` - [x] `npm run build`
Automated catalog update from the Kosli OpenAPI spec.
Please review the diff to verify the changes look correct before merging.