Back to KB
Difficulty
Intermediate
Read Time
4 min

On 21 April I audited trpc/trpc, the TypeScript library for building end-to-end type-safe APIs. Scor

By Codcompass TeamΒ·Β·4 min read

Auditing trpc/trpc: When Naming Conventions Trigger AI Governance False Positives

Current Situation Analysis

Automated AI governance scanners are increasingly deployed to evaluate TypeScript codebases against regulatory frameworks like the EU AI Act. However, a critical failure mode emerges when these tools rely exclusively on lexical pattern matching and literal framework interpretation without architectural context. In the audit of trpc/trpc, an initial scan yielded a Healthy score of 80. A subsequent re-audit with a corrected product description plummeted the score to 47.6 (Critical Risk), introducing three High findings under AI Governance.

The root cause is a semantic collision: tRPC's transformer components are data serialization utilities that handle encoding/decoding across the client-server boundary. The terminology predates modern AI by decades. Yet, automated governance agents process code chunks against the EU AI Act's broad definition of "AI system," flagging any component sharing nomenclature with transformer architectures. Traditional code-only analysis fails because it cannot distinguish between:

  • Lexical similarity: Shared terminology (transformer, model, pipeline)
  • Architectural intent: Actual data transformation vs. neural network inference
  • Framework literalism: Automated LLM evaluators applying risk classifications without human contextual override

This creates contradictory audit outputs within the same report: a confirmed finding of "No AI/ML Components Detected β€” EU AI Act Classification: Not Applicable" coexists with a High-Risk AI classification. Severity weighting rules prioritize the violation, artificially inflating risk scores and masking the true

πŸŽ‰ Mid-Year Sale β€” Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register β€” Start Free Trial

7-day free trial Β· Cancel anytime Β· 30-day money-back