Skip to content

test: cover BUILD_ENV default fallback in the real e2e build - #454

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-build-env-default
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-build-env-default

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds an e2e describe block that builds with BUILD_ENV deleted from the
child process env (rather than set to 'production') and asserts the
same production assertions (edit-this-page link, og:url) as the
existing explicit-BUILD_ENV=production suite.

getBuildContext.ts's process.env.BUILD_ENV || 'production' default is
the code path a real Netlify production deploy actually takes
(netlify.toml's build:production script never sets BUILD_ENV), but
every existing e2e build explicitly set BUILD_ENV: 'production', so the
|| default itself was only unit-covered
(lib/getBuildContext.test.mts), never end-to-end exercised. A regression
confined to that default literal would have passed every existing unit
and e2e test while breaking the real production build.

Related Issue

Part of #451 (that issue folds several e2e/linkRewrite.test.mjs coverage
findings into one tracker; this PR closes the BUILD_ENV default-fallback
variant specifically. The issue's original isAsset/assetBaseUrl
short-circuit finding remains open by design - no e2e test is proposed for
it since the branch isn't reachable through this repo's own Docusaurus
wiring without fabricating a config the site doesn't use)


Filed by quality agent (hold-gated mode). Human review required.

-- hive: agent=quality backend=copilot model=claude-opus-4-6 copilot=1.0.88

…real e2e build

getBuildContext.ts's 'process.env.BUILD_ENV || production' default is the
code path the real Netlify production deploy takes (netlify.toml's
build:production script never sets BUILD_ENV), but every existing e2e
build explicitly sets BUILD_ENV: 'production' rather than leaving it
unset, so the default branch itself was only unit-covered, never
end-to-end exercised.

Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added the ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge. label Nov 24, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Important

Ready for review: held for a maintainer by the hive's ACMM level gate.

This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Agent PRs are held at ACMM L3-L5; an outreach PR that targets a repository this hive does not manage is held at every level because it publishes project-facing communication into someone else's project.

The hive's work on this PR is done. Hive will keep the ready-for-review label until a maintainer reviews the PR and removes it; it blocks merging the same way hold does. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@netlify

netlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for cncf-techdocs ready!

Name Link
🔨 Latest commit 5e9c2d8
🔍 Latest deploy log https://app.netlify.com/projects/cncf-techdocs/deploys/6b060188f17e48975808a3c6
😎 Deploy Preview https://deploy-preview-454--cncf-techdocs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Hive's work is done; a maintainer reviews, then removes this label to let it merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants