Repository navigation
Conversation
Generated routed rows now expose fields, max_items, summary, and jq when a child declares them, and the router forwards those query values to a serving child that accepts them so a large_result hint can be followed without pinning that child.
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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: d55717cb22
ℹ️ 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".
| continue | ||
| try: | ||
| query, body = cand.adapter.to_upstream(plan.identity, cand.variant) | ||
| query = _with_parent_response_budget_query(parent, cand.endpoint, query) |
There was a problem hiding this comment.
Preserve routing evidence before forwarding shape-changing controls
When AnyAPI serves a routed call with jq=.output.data.tweets or summary=true, these controls can remove the structure the router still needs to classify the answer. anyapi.yaml documents that jq replaces output and summary returns only an outline, but the X posts adapters still read output.data.tweets / output.data.items. Consequently, child_outcome() classifies a successful, billed response as a miss, and the default waterfall calls more providers instead of returning the requested projection; if no later provider hits, it returns null output/raw despite having received results. Preserve the evidence needed for routing decisions, or explicitly handle projected responses, before enabling these controls. The current tests check forwarding but never classify a trimmed child response.
Useful? React with 👍 / 👎.
| for eid in ("treg.x.user.posts", "treg.x.search.posts"): | ||
| qp = ((cat.by_id[eid].get("input") or {}).get("queryParams") or {}) | ||
| assert set(qp) >= {"fields", "max_items", "summary", "jq"}, (eid, sorted(qp)) |
There was a problem hiding this comment.
Replace the endpoint-specific declaration test with generic coverage
This test hard-codes two catalog endpoint IDs and restates their query declarations, contrary to the explicit repository rule in AGENTS.md: “No per-endpoint tests” and tests restating declarations are to be deleted rather than extended. It couples the mechanism test suite to individual catalog rows without exercising routed execution. Remove this endpoint-specific assertion and cover response-budget inheritance and execution through generic behavioral tests instead.
AGENTS.md reference: AGENTS.md:L278-L280
Useful? React with 👍 / 👎.
Problem
Routed parents such as
treg.x.user.postsandtreg.x.search.postswrap the child's answer as{output, raw, _treg}. When AnyAPI serves the call, itslarge_resulthint tells callers to re-run withjq,fields,max_items, orsummary=true. Those controls exist on the child asqueryParamsand trim the response, not the charge. The generated routed catalog row listed only identity body fields, and the router built the child request fromto_upstreamidentity mapping alone, so extra query values were dropped.Public reproduction on main before this change:
catalog_get treg.x.user.posts— body isusername/user_idonly; noqueryParams.catalog_get anyapi.x.user.posts— listsfields,max_items,summary,jq.treg call treg.x.user.posts --data '{"username":"<public handle>"}' --query max_items=1 --query summary=true— HTTP 200, served byanyapi.x.user.posts,output.postsstill had a full native page (20 items),rawduplicated the posts, andraw.hintstill suggested those four controls.Options
fields,max_items,summary, andjqwhen at least one child declares them. Afterto_upstream, parent query keys among those names that the selected child declares are copied onto the child request; adapter-built query wins on a name clash. The child performs the trim; the parent still wraps the child's answer unaltered. Charge is unchanged.Verification
max_items=1andsummary=truedo not change the envelope.