Skip to content

test(ui): guard the Cloudflare build's self-heal step against regression#6648

Merged
JSONbored merged 1 commit into
mainfrom
test/cf-build-self-heal-invariant
Jul 16, 2026
Merged

test(ui): guard the Cloudflare build's self-heal step against regression#6648
JSONbored merged 1 commit into
mainfrom
test/cf-build-self-heal-invariant

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

Closes #6642.

Scope

  • test/unit/ui-cloudflare-build-self-heal.test.ts only (new file)
  • No src/** changes

Validation

  • npx vitest run test/unit/ui-cloudflare-build-self-heal.test.ts — passes
  • Manually reverted build:cloudflare's content and re-ran — test fails as expected, confirming it's a real guard
  • npx vitest run (full unsharded suite) — 930/932 files, 17826/17839 tests passed (pre-existing skips unchanged)
  • npx tsc --noEmit — clean

Safety

  • No secrets touched

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).
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jul 16, 2026
@JSONbored
JSONbored merged commit 268b528 into main Jul 16, 2026
5 checks passed
@JSONbored
JSONbored deleted the test/cf-build-self-heal-invariant branch July 16, 2026 17:04
@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.64%. Comparing base (a47d1c3) to head (db8f3ae).
⚠️ Report is 9 commits behind head on main.
✅ All tests successful. No failed tests found.

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           
Flag Coverage Δ
shard-1 43.93% <ø> (-0.09%) ⬇️
shard-2 36.99% <ø> (+0.21%) ⬆️
shard-3 32.41% <ø> (-0.01%) ⬇️
shard-4 33.76% <ø> (-1.01%) ⬇️
shard-5 31.62% <ø> (+0.64%) ⬆️
shard-6 45.78% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI's UI build step doesn't reproduce Cloudflare Pages' actual build invocation

1 participant