Hidden Assumptions in taxonomy
11 assumptions this code never checks · 4 critical · spanning Shape, Domain, Ordering, Contract, Temporal, Environment, Scale, Resource
Every codebase relies on things it never checks. Most of them are routine. CodeSea looked at shadcn-ui/taxonomy and picked out the few most likely to cause trouble. The full list is just below.
Most of what this code assumes is routine. These 3 are the ones most likely to cause trouble here. The rest are minor; they're under "Show everything".
If post.content contains malformed JSON or unexpected structure (e.g., from manual database edits or migration issues), Editor.js will fail to initialize and users cannot edit their posts
If a subscription is deleted directly in Stripe dashboard but still referenced in database, Stripe API calls will fail with 404s, breaking billing page and subscription checks
If NextAuth configuration changes or session format differs (e.g., using email as identifier), database lookups will return null causing authentication failures
Show everything (8 more)
Assumes posts are ordered by updatedAt but selects createdAt - expects updatedAt field exists and is maintained by Prisma
If this fails: If updatedAt is null or not automatically updated during edits, posts will be incorrectly ordered or query will fail
app/(dashboard)/dashboard/page.tsx:DashboardPage
Assumes Stripe subscription status fetched in real-time reflects current billing state without caching considerations
If this fails: Rapid subscription status checks could hit Stripe rate limits, and stale data during status transitions (canceled->active) could show wrong billing state
lib/subscription.ts:getUserSubscriptionPlan
Assumes DATABASE_URL environment variable points to accessible PostgreSQL database with correct schema version
If this fails: If database is unreachable, has wrong schema version, or connection string is malformed, all database operations fail silently with Prisma connection errors
lib/db.ts:db
Assumes users will have reasonable number of posts - no pagination or limit on db.post.findMany query
If this fails: Users with hundreds of posts will cause slow page loads and potential memory issues as all posts are loaded into memory
app/(dashboard)/dashboard/page.tsx:DashboardPage
Assumes browser has sufficient memory to handle Editor.js instance with large post content
If this fails: Very large posts with many blocks or embedded media could cause browser crashes or editor freezing on mobile devices
components/editor.tsx:Editor
Assumes postId parameter is always a valid UUID format matching Post.id database field type
If this fails: If postId is not a UUID (e.g., integer, malformed string), Prisma query could fail or behave unexpectedly depending on database constraints
app/(editor)/editor/[postId]/page.tsx:getPostForUser
Assumes MDX frontmatter in content files matches expected schema with required fields like title, description, published
If this fails: If content authors add MDX files with missing or incorrectly typed frontmatter, build will fail or runtime errors occur when accessing undefined properties
contentlayer/generated:allDocs
Assumes NextAuth session and JWT tokens maintain consistent format and don't expire during active user sessions
If this fails: If session format changes between NextAuth versions or tokens expire unexpectedly, users get logged out mid-session and lose unsaved work
lib/auth.ts:authOptions
See the full structural analysis of taxonomy: the pipeline, data models, and system behavior that put these assumptions in context.
Full analysis of shadcn-ui/taxonomy →Frequently Asked Questions
What does taxonomy assume that could break in production?
The one most likely to cause trouble: The Editor component assumes post.content is valid Editor.js JSON format with proper block structure when loading existing posts If this fails, If post.content contains malformed JSON or unexpected structure (e.g., from manual database edits or migration issues), Editor.js will fail to initialize and users cannot edit their posts
How many hidden assumptions does taxonomy have?
CodeSea found 11 assumptions taxonomy relies on but never validates, 4 of them critical, spanning Shape, Domain, Ordering, Contract, Temporal, Environment, Scale, Resource. Most are routine — the analysis flags the two or three most likely to actually bite.
What is a hidden assumption?
Something the code depends on but never checks: a data shape, an ordering, an environment condition, a scale limit, or a contract with another service. It holds until the world it runs in changes, then fails silently.