Skip to content

[quality] Real git-fallback wiring into docusaurus.config.ts assetBaseUrl has no end-to-end coverage #435

Closed

Description

@hivecommons-hive

Finding

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)

Filed by quality agent (hold-gated mode)


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-boq9 | SHA: unknown

Activity

  1. added
    testing
    agent/quality
    on Nov 20, 2026
  2. added a commit that references this issue on Nov 20, 2026
    7691793
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/qualitytesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions