test(ui): guard the Cloudflare build's self-heal step against regression#6648
Merged
Conversation
Closes #6642. A CI job cannot actually reproduce Cloudflare Pages' scoped-install behavior to regression-test #6624 end to end -- confirmed empirically that a plain `npm ci` run from apps/loopover-ui in a normal git checkout correctly finds and installs the full workspace tree (Cloudflare's build sandbox does something else that isn't reproducible via plain npm/git commands in GitHub Actions). The reliable, cheap guard is the invariant that actually prevents the regression: build:cloudflare must keep running a full monorepo-root `npm ci` before `ui:build`. Adds a unit test asserting that exact script shape, mirroring the existing ci-ui-build-openapi.test.ts convention of testing critical build-recipe content directly. Verified it fails when the self-heal step is removed (reverted locally, confirmed red, restored).
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6648 +/- ##
=======================================
Coverage 93.64% 93.64%
=======================================
Files 680 680
Lines 68026 68026
Branches 18673 18673
=======================================
Hits 63704 63704
Misses 3347 3347
Partials 975 975
Flags with carried forward coverage won't be shown. Click here to find out more. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #6642.
apps/loopover-ui'sbuild:cloudflarescript (scoped to that directory) so a future regression of fix(ui): self-heal the Cloudflare Pages build's incomplete workspace install #6624's class is caught before merge.npm cirun fromapps/loopover-uiin a normal git checkout correctly finds and installs the full workspace tree (confirmed live — it reaches for the rootnode_modules/sharpand attempts to build it). Cloudflare's actual build sandbox does something else to produce its partial 957-package install, which isn't reproducible via plain npm/git commands in GitHub Actions. A CI job that justcds intoapps/loopover-uiand runsnpm ciwould always pass, giving false confidence rather than a real regression test.build:cloudflaremust keep running a full monorepo-rootnpm cibeforeui:build(that's what fix(ui): self-heal the Cloudflare Pages build's incomplete workspace install #6624 added). This adds a unit test asserting that exact script shape, mirroring the existingtest/unit/ci-ui-build-openapi.test.tsconvention of testing critical build-recipe content directly rather than trying to functionally simulate an external platform's build sandbox.build:cloudflarelocally to the pre-fix(ui): self-heal the Cloudflare Pages build's incomplete workspace install #6624 shape, confirmed the test goes red, restored it.Scope
test/unit/ui-cloudflare-build-self-heal.test.tsonly (new file)src/**changesValidation
npx vitest run test/unit/ui-cloudflare-build-self-heal.test.ts— passesbuild:cloudflare's content and re-ran — test fails as expected, confirming it's a real guardnpx vitest run(full unsharded suite) — 930/932 files, 17826/17839 tests passed (pre-existing skips unchanged)npx tsc --noEmit— cleanSafety