fix: reject duplicate tRPC procedure names - #1760
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthrough라우터 생성 시 동일한 tRPC 도메인과 프로시저 이름의 중복 등록을 거부합니다. 오류는 기존 라우트와 충돌 라우트의 메타데이터와 소스 위치를 포함합니다. 문제 레지스트리, 복구 메타데이터, 테스트, changeset을 갱신합니다. Changes중복 tRPC 프로시저 처리
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant RouteIR
participant createTrpcRouter
participant TrpcDuplicateProcedureProblem
RouteIR->>createTrpcRouter: 라우트 메타데이터 제공
createTrpcRouter->>createTrpcRouter: 도메인별 프로시저 이름 추적
createTrpcRouter->>TrpcDuplicateProcedureProblem: 중복 라우트 진단 정보 전달
TrpcDuplicateProcedureProblem-->>createTrpcRouter: 중복 등록 오류 반환
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-08-08T07:30:37.100Z · Commit: fdf68c0 |
e824717 to
c7a3ec8
Compare
c7a3ec8 to
9d9326a
Compare
|
Current-head validate failed only at dependency-audit-policy because the newly published nanoid advisory GHSA-2v37-7h3g-55p8 produced six blocking findings. The failure reproduces on a clean archive of exact base 6795b4d, while this PR changes neither pnpm-lock.yaml nor dependency manifests. Tracked as base CI regression #1782: #1782. All other selected verification checks, the 207 passing Vitest evidence records, companion, benchmark, docs, and real-resource checks passed. This unrelated dependency-policy fix should not be folded into #1760. |
Outcome
Routes that resolve to the same tRPC domain and procedure name now fail during router construction instead of silently overwriting the earlier procedure. The stable configuration Problem identifies the collision key and both controller routes, including decorator source locations when available.
Unique procedures keep their existing query, mutation, schema, and execution behavior. The generated Problem registry marks the configuration failure as non-retryable, and patch changesets cover protocols-trpc and the generated problems-core code union.
Fixes #1678
Verification
Review gates
Residual risk
None identified within the issue scope.
Summary by CodeRabbit
새로운 기능
문서
버그 수정