Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions api/tinyhumans.backend.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"url": "https://api.tinyhumans.ai/swagger.json",
"title": "TinyHumans API",
"version": "1.0.0",
"pathCount": 235,
"totalOperationCount": 260,
"operationCount": 206,
"pathCount": 237,
"totalOperationCount": 262,
"operationCount": 208,
"supplementalOperationCount": 13,
"excludedAdminOperationCount": 46,
"excludedWebhookOperationCount": 12,
Expand Down Expand Up @@ -312,19 +312,21 @@
"name": "openCompany",
"basePath": "/opencompany",
"auth": "bearer",
"operationCount": 9,
"operationCount": 11,
"tags": [
"OpenCompany"
],
"routes": [
"DELETE /opencompany/instances/{slug}",
"DELETE /opencompany/instances/{slug}/custom-domain",
"GET /opencompany/companies",
"GET /opencompany/instances",
"GET /opencompany/instances/usage",
"POST /opencompany/instances",
"POST /opencompany/instances/{slug}/custom-domain/verify",
"POST /opencompany/instances/{slug}/resume",
"POST /opencompany/instances/{slug}/suspend",
"POST /opencompany/instances/{slug}/update",
"PUT /opencompany/instances/{slug}/custom-domain"
]
},
Expand Down
2 changes: 2 additions & 0 deletions src/generated_public_routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ pub const PUBLIC_ROUTES: &[(&str, &str)] = &[
("POST", "/openai/v1/completions"),
("POST", "/openai/v1/embeddings"),
("GET", "/openai/v1/models"),
("GET", "/opencompany/companies"),
("GET", "/opencompany/instances"),
("POST", "/opencompany/instances"),
("DELETE", "/opencompany/instances/{slug}"),
Expand All @@ -144,6 +145,7 @@ pub const PUBLIC_ROUTES: &[(&str, &str)] = &[
("POST", "/opencompany/instances/{slug}/custom-domain/verify"),
("POST", "/opencompany/instances/{slug}/resume"),
("POST", "/opencompany/instances/{slug}/suspend"),
("POST", "/opencompany/instances/{slug}/update"),
("GET", "/opencompany/instances/usage"),
("POST", "/payments/coinbase/charge"),
("GET", "/payments/coinbase/charge/{gatewayTransactionId}"),
Expand Down
11 changes: 9 additions & 2 deletions tests/openapi_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,12 @@ fn generated_rust_routes_match_the_public_manifest() {
// 203 -> 204: `POST /opencompany/instances/{slug}/update`, the
// owner-triggered "update to latest" for a hosted company.
// 204 -> 206: OpenRouter System One plus its TypeSafe-compatible alias.
assert_eq!(manifest["source"]["operationCount"], 206);
// 206 -> 208: `GET /opencompany/companies`, the company-template catalog,
// and `POST /opencompany/instances/{slug}/update`, the owner-triggered
// "update to latest" — both are served by the backend `main` this syncs
// against (sdk main had been generated from the deployed spec that predated
// them).
assert_eq!(manifest["source"]["operationCount"], 208);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority high critique confident

Update the manifest before raising the operation count

The diff adds two routes to PUBLIC_ROUTES and changes the expected manifest operation count to 208, but it does not update the checked-in api/tinyhumans.backend.json. The manifest therefore still has the previous operation count and route set, causing this assertion and the subsequent rust_routes/manifest_routes equality check to fail. Add both routes to the manifest (and its derived metadata) or do not change the generated registry and expectations.

[RULE] contract-parity ·

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a false positive. api/tinyhumans.backend.json is updated in this same commit (b17b6c7): "operationCount": 208 and "totalOperationCount": 262, with both GET /opencompany/companies and POST /opencompany/instances/{slug}/update present in the namespace routes. The generated_rust_routes_match_the_public_manifest test — which asserts both operationCount == 208 and rust_routes == manifest_routes — passes in the green Rust SDK CI run for this commit, so the described assertion failure does not occur. No change needed.

// 14 -> 13: `GET /orchestration/v1/steering` left with that family.
assert_eq!(manifest["source"]["supplementalOperationCount"], 13);
// 37 -> 39: the two service-token operations on
Expand Down Expand Up @@ -188,7 +193,9 @@ fn generated_rust_routes_match_the_public_manifest() {
// user-facing half of that flow is `POST /auth/guild/link-token`.
assert_eq!(manifest["source"]["excludedAdminOperationCount"], 46);
assert_eq!(manifest["source"]["excludedWebhookOperationCount"], 12);
assert_eq!(rust_routes.len(), 206);
// 206 -> 208: the two new public opencompany routes above
// (`GET /opencompany/companies` and `POST /opencompany/instances/{slug}/update`).
assert_eq!(rust_routes.len(), 208);
assert_eq!(rust_routes, manifest_routes);
assert!(rust_routes
.iter()
Expand Down
Loading