Repository navigation
chore(api): sync spec for the spend-policy surface - #18
Conversation
…_routes.rs Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The expected counts for unexposed routes, total operations, and Rust routes were incremented to match a recent addition to the API surface. The pinned assertions ensure that any future changes to the route set are reviewed explicitly rather than silently accepted. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
The test assertion for the excluded admin operation count was updated from 37 to 38 to match the current state of the public manifest, ensuring the test continues to validate that the generated Rust routes align with the manifest. Auto-committed-on: macbook Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe API manifest adds spend-policy operations. Generated Rust route tables include the matching public and excluded admin routes. Synchronization tests update operation and route-count expectations. ChangesSpend policy routes
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🔵 Low · up to The SDK now exposes three spend-policy operations, including two policy mutations, while the administrative route remains blocked from the public surface. The change is mergeable with explicit owner awareness that backend authorization and resource scoping for these operations should be confirmed. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
How this change flows0 changed behaviours across 7 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 29 further behaviours left out to keep the diagram readable. flowchart LR
n0["AgentIntegrationsApi"]:::impacted
n1["Error"]:::impacted
n2["send"]:::impacted
n3["HttpClient"]:::impacted
n4["post_multipart"]:::impacted
n5["reject_unexposed_route"]:::impacted
n0 -->|uses| n3
n2 -->|uses| n1
n2 -->|calls| n5
n4 -->|uses| n1
n4 -->|calls| n2
n4 -->|calls| n5
n5 -->|uses| n1
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge. |
…d-policy routes Re-ran scripts/sync-openapi.mjs against a fresh spec dump from the companion backend/feat/openrouter-agent-integration checkout after merging upstream/main. The backend source has no spend-policy routes (grep across the checkout finds nothing under that name; only spend-caps exists), so the four spend-policy entries picked up by main's PR #18 sync were stale/phantom and are correctly dropped by resyncing against the actual backend. UNEXPOSED_ROUTES therefore goes back to 49 (not 50) and the pinned assertion in src/lib.rs::exclusion_tests is updated to match. All 12 OpenRouter routes/typed methods from this PR remain intact, as do main's other merged routes. Co-authored-by: Medulla <medulla@tinyhumans.ai>
Overview
Syncs the generated spec for the backend's spend-policy surface (tinyhumansai/backend#1287).
Changes
Regenerated from the backend branch's own spec via
--input, perAGENTS.md. Verified againstorigin/main— both lists gain entries and neither loses one:PUBLIC_ROUTESUNEXPOSED_ROUTESGET /spend-policy,PUT /spend-policy,PUT /api-keys/{keyId}/spend-policyPATCH /admin/users/{userId}/spend-policy— admin-only, so it adds no public operation and is blocked at the raw transportPinned counts updated to match:
UNEXPOSED_ROUTES.len()49 → 50,operationCount215 → 218,excludedAdminOperationCount37 → 38.Testing
cargo test— 25 suites, 0 failurescargo clippy --all-targets -- -D warningscleancargo fmt --checkcleanorigin/mainprogrammatically to confirm nothing was droppedNotes
Depends on tinyhumansai/backend#1287.
Related Issues
Summary by CodeRabbit
New Features
API Updates