You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[quality] Real git-fallback wiring into docusaurus.config.ts assetBaseUrl has no end-to-end coverage #435
getCurrentBranch()'s git branch --show-current fallback and getGitHubRepoUrl()'s git remote get-url origin fallback are 100%
unit-covered in isolation (lib/getCurrentBranch.test.mts, lib/getGitHubRepoUrl.test.mts). Every integration test that exercises docusaurus.config.ts's deploy-preview wiring of their output into assetBaseUrl (lib/docusaurusConfigBuildContext.test.mts, e2e/linkRewrite.test.mjs) pins HEAD/BRANCH/GITHUB_HEAD_REF/ GITHUB_REF_NAME/REPOSITORY_URL explicitly for determinism, so none
of them ever let the real git fallback run. A regression that stopped
passing getCurrentBranch()/getGitHubRepoUrl()'s return values
through to assetBaseUrl in a real build with none of those env vars
set (for example a bare netlify build run outside CI, or a local
deploy-preview build) would pass every existing test.
Unit evidence: npm run test:coverage at commit efa17c7 (main),
100% lines/branches/functions/statements across lib/ and scripts/,
verified locally 2026-11-20.
Recommendation
Addressed in the attached PR: one new case in lib/docusaurusConfigBuildContext.test.mts that clears all five env
vars and asserts assetBaseUrl equals the real getCurrentBranch()/getGitHubRepoUrl() output composed the same
way getBuildContext.ts composes it - proving the wiring without
re-testing (or duplicating the logic of) the helpers' own
already-unit-tested git-fallback correctness.
Priority
Impact: medium (unit-covered but not asserted end-to-end; Priority 2
per this agent's coverage-evidence policy)
Effort: low (one new test case, no production code change)
Activity
test: cover real git branch/remote fallback wiring in docusaurus.conf…