Skip to content

fix(jawn): repair empty tsoa operator models in routes.ts (prod filter validation regression) - #5802

Open
chitalian wants to merge 1 commit into
mainfrom
hotfix/tsoa-operator-models
Open

fix(jawn): repair empty tsoa operator models in routes.ts (prod filter validation regression)#5802
chitalian wants to merge 1 commit into
mainfrom
hotfix/tsoa-operator-models

Conversation

@chitalian

Copy link
Copy Markdown
Contributor

Production hotfix — needs 1 approval to merge, then run jawn-deployment.yml.

Since the 04:37Z deploy of #5801, TSOA runtime validation rejects every request filter that uses a text operator (equals/like/contains/…):

Caught Validation Error for /v1/request/query-clickhouse — Could not match the union against any of the items … requestBody.filter … is an excess property

Cause: the experiment removal reshuffled tsoa's type-visit order and it emitted Partial_TextOperators_ as an empty model. The existing fix_swagger_operators.py repaired swagger.json (client types) but not routes.ts, which is what TSOA validates against at runtime with throw-on-extras.

Fix: the repair step now also patches the operator models in routes.ts and fails the build if any remain empty; public/routes.ts regenerated (its Partial_TextOperators_ shape is identical to the pre-regression artifact). Jawn tsc clean. Worker/web untouched. Mirror of Helicone/helicone-private#15.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FQcs9hwBaiE9z1k32zYimo

…wagger

The experiment removal (#12) reshuffled tsoa's type-visit order and it
emitted Partial_TextOperators_ as an empty model. fix_swagger_operators.py
repaired swagger.json (so the web client types stayed correct) but not
routes.ts, which is what TSOA's runtime validation reads. With
noImplicitAdditionalProperties = throw-on-extras, every request filter using
a text operator (equals/like/contains/...) has been rejected since the
2026-08-31 04:37Z deploy:

  Could not match the union against any of the items ... requestBody.filter
  ... "left,operator,right" is an excess property and therefore is not allowed

- fix_swagger_operators.py now also patches the known operator models in
  public/private routes.ts, and exits non-zero if any of them is still empty
  afterwards, so this cannot ship silently again.
- tsoa_run.sh passes both routes.ts files to it.
- Regenerated: public/routes.ts Partial_TextOperators_ carries its six string
  properties again (identical shape to the pre-#12 artifact).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FQcs9hwBaiE9z1k32zYimo
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
helicone Skipped Skipped Aug 31, 2026 5:02am
helicone-bifrost Skipped Skipped Aug 31, 2026 5:02am
helicone-eu Skipped Skipped Aug 31, 2026 5:02am

Request Review

@vercel
vercel Bot temporarily deployed to Preview – helicone-bifrost August 31, 2026 05:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – helicone August 31, 2026 05:02 Inactive
@vercel
vercel Bot temporarily deployed to Preview – helicone-eu August 31, 2026 05:02 Inactive

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Your trial has ended. Reactivate Greptile to resume code reviews.

@claude

claude Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

@supabase

supabase Bot commented Aug 31, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project bolqqmqbrciybnypvklh because there are no changes detected in supbase/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@supabase

supabase Bot commented Aug 31, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project lmahfbbnchpworytrrqk because there are no changes detected in .supabase/supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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.

1 participant