Skip to content

improvement(repo): consolidation of boundary helpers + better unknown usage#4352

Merged
icecrasher321 merged 2 commits intodevfrom
improvement/chore-followups-consul
Apr 30, 2026
Merged

improvement(repo): consolidation of boundary helpers + better unknown usage#4352
icecrasher321 merged 2 commits intodevfrom
improvement/chore-followups-consul

Conversation

@icecrasher321
Copy link
Copy Markdown
Collaborator

  • Tighten z.unknown() wherever possible
  • Add CI checks
  • Consolidate helper pattern

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 30, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Apr 30, 2026 3:23am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 30, 2026

PR Summary

Medium Risk
Touches many API endpoints’ request parsing and validation/error responses; behavior should be equivalent but could subtly change 400 handling or JSON parse failures across auth/billing/copilot routes.

Overview
Standardizes API route boundary validation by migrating many handlers from ad-hoc request.json() + safeParse/validateSchema/try-catch patterns to contract-bound parseRequest(...) with explicit context handling and per-route overrides for validation and invalid-JSON responses.

Updates boundary-policy docs (AGENTS.md, CLAUDE.md, .cursor/rules) to reflect parseRequest’s discriminated-union return and adds two new strict-mode annotation types (boundary-raw-json, untyped-response). Several routes also switch client/landing schemas (contact + demo request) to shared contract modules, tweak tests/mocks to use NextRequest/nextUrl, and harden workflow-checkpoint state cleanup by typing/narrowing unknown JSON before reconstruction.

Reviewed by Cursor Bugbot for commit e37e9f2. Configure here.

Comment thread apps/sim/app/api/copilot/chat/resources/route.ts
@icecrasher321
Copy link
Copy Markdown
Collaborator Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e37e9f2. Configure here.

@icecrasher321 icecrasher321 merged commit 86a10fd into dev Apr 30, 2026
14 checks passed
icecrasher321 added a commit that referenced this pull request Apr 30, 2026
* improvement(repo): centralized zod contracts (#4336)

* improvement(repo): zod schema contracts

* type checks

* fix(notion): correctly register tool (#4337)

* fix func blokc

* more improvements

* fix tests

* type check

* remove v3 refs

* minor type improvements

* address comments

* update jira contract

* remove validateJsonBody

* improvement(repo): consolidation of boundary helpers + better unknown usage (#4352)

* improvement(repo): consolidation of boundary helpers + better unknown usage

* address comments

* improve file transfer error messaging

* fix docs listing schema drift

* fix inocrrect type casting

* address council comments

* remove prefix
@waleedlatif1 waleedlatif1 deleted the improvement/chore-followups-consul branch April 30, 2026 21:50
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