Hidden Assumptions in great_expectations

12 assumptions this code never checks · 4 critical · spanning Environment, Resource, Shape, Domain, Contract

Every codebase relies on things it never checks. Most of them are routine. CodeSea looked at great-expectations/great_expectations 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".

Worth your attention first

Runtime error 'Cannot read properties of undefined' when gxCard is not configured in theme config, breaking card rendering

Worth your attention first

formatCompactNumber crashes with TypeError if API returns null/string for counts, or component displays 'NaN' for invalid numeric values

Worth your attention first

Feedback submission fails with 404 or 500 errors if endpoint is missing or expects different data shape, silently failing user feedback

Show everything (9 more)
Resource

GitHub API is accessible and responds within reasonable time without CORS issues

If this fails: Component renders without star/fork counts and setShowGithubBadgeInfo(false) hides badge info, but no visible error to user about network failure

docs/docusaurus/src/components/GithubNavbarItem/index.js:fetch
Shape

Form inputs have 'name' attribute matching formData keys (name, email, selectedValue, description)

If this fails: Form state becomes inconsistent if input name attributes don't match, causing submission to send undefined/old values

docs/docusaurus/src/components/WasThisHelpful/index.js:handleChange
Domain

Intl.NumberFormat with 'compact' notation is supported in all target browsers

If this fails: TypeError in older browsers that don't support compact notation, breaking the entire navbar component

docs/docusaurus/src/components/GithubNavbarItem/index.js:formatCompactNumber
Shape

announcementBar.content is safe HTML string that won't execute malicious scripts

If this fails: XSS vulnerability if content contains malicious JavaScript, allowing arbitrary code execution in user browsers

docs/docusaurus/src/theme/AnnouncementBar/Content/index.js:dangerouslySetInnerHTML
Environment

DOM access is available and buttonElement's parent contains code with 'code-block-hide-line' class elements

If this fails: Copy function falls back to originalCode with potentially sensitive hidden lines visible in clipboard if DOM traversal fails

docs/docusaurus/src/theme/CodeBlock/Buttons/CopyButton/index.js:filterHiddenLines
Contract

The 'to' prop starts with '/' and useVersionedPath hook correctly resolves versioned paths from current page context

If this fails: Navigation links break with incorrect paths if 'to' prop doesn't start with '/' or version context is unavailable

docs/docusaurus/src/components/VersionedLink/index.js:useVersionedPath
Resource

Icon URLs in 'icon' prop are accessible and load successfully

If this fails: Broken image icons display if URLs are invalid, but component continues to function without visual feedback about the failure

docs/docusaurus/src/components/LinkCard/index.js:VersionedLink
Environment

Custom icon components (AlertInfo, CautionIcon, etc.) are properly imported SVG components that can be rendered

If this fails: Admonition rendering fails with module not found errors if SVG imports are broken or files are missing

docs/docusaurus/src/theme/Admonition/index.js:props.icon
Shape

owner and repository props are non-empty strings suitable for GitHub API URL construction

If this fails: Invalid GitHub API requests like '/repos//' if props are empty/undefined, causing 404 errors and hiding GitHub badge

docs/docusaurus/src/components/GithubNavbarItem/index.js:owner and repository props

See the full structural analysis of great_expectations: the pipeline, data models, and system behavior that put these assumptions in context.

Full analysis of great-expectations/great_expectations →

Frequently Asked Questions

What does great_expectations assume that could break in production?

The one most likely to cause trouble: useThemeConfig().gxCard exists and has the structure {title: string, description: string, buttons: {primary: {href: string, label: string}, secondary: {href: string, label: string}}} If this fails, Runtime error 'Cannot read properties of undefined' when gxCard is not configured in theme config, breaking card rendering

How many hidden assumptions does great_expectations have?

CodeSea found 12 assumptions great_expectations relies on but never validates, 4 of them critical, spanning Environment, Resource, Shape, Domain, Contract. 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.