Skip to content

fix(studio): declare 400 and 429 on the skill files route, and stop hard-coding the route count - #2355

Merged
kantord merged 1 commit into
mainfrom
fix/studio-knowledge-route-statuses
Oct 15, 2026
Merged

kantord merged 1 commit into
mainfrom
fix/studio-knowledge-route-statuses

Conversation

@kantord

@kantord kantord commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

main's "Mecatl Studio (apps/)" job has been failing since the skill files route (#2155) landed next to the knowledge-route convention test (#2313), and every PR that CI merges with main fails the same test. Each change was fine on its own: #2313 declared 400 and 429 on the 15 knowledge routes and pinned the count at 15, and #2155 added a 16th route without them.

The failure on main:

src/routes/knowledge.test.ts > knowledge route documentation > declares the transport errors ...
AssertionError: expected [ ... ] to have a length of 15 but got 16

What changed

  • listSkillFilesRoute spreads transportErrors, like the other knowledge routes. openapi.json and types.gen.ts are regenerated (pnpm run generate) and gain 400 and 429 for GET /api/v1/skills/{name}/files.
  • The convention test no longer asserts an exact route count (it checks that there is at least one operation and that each declares 400 and 429), so the next knowledge route is covered without editing the test.

Behavior changes

None at runtime. The OpenAPI document and generated types gain two statuses on one route.

Verification

Rebased onto main at 4aa238f3c (after #2316 to #2318 landed). On that main, the old test fails with the error above; with this change it passes. Biome, typecheck and the full Studio test suite (server 241, web 1,529) pass, and pnpm generated:check shows no drift.

Not included

A route-level registry for the knowledge routes. The test still finds them by path prefix, so a route under a new prefix would not be covered.

Fully or partially written by an AI agent.

🤖 Generated with Claude Code

@kantord
kantord requested a review from peppescg October 15, 2026 12:32
…ard-coding the route count

main's Studio job has been failing since the skill files route (#2155) landed
next to the knowledge-route convention test (#2313). Each change was fine on
its own: #2313 declared 400 and 429 on the 15 knowledge routes and pinned the
count at 15, and #2155 added a 16th route without them.

- Spread `transportErrors` into `listSkillFilesRoute` like the other knowledge
  routes. The OpenAPI document and generated types gain the two statuses.
- The convention test no longer asserts an exact route count, so the next
  knowledge route is checked without editing the test.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kantord
kantord force-pushed the fix/studio-knowledge-route-statuses branch from 8dc3350 to ff78e9f Compare October 15, 2026 13:04
@kantord
kantord merged commit 4f86205 into main Oct 15, 2026
31 checks passed
@kantord
kantord deleted the fix/studio-knowledge-route-statuses branch October 15, 2026 13:21
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants