ci: narrow ui-preview scope, dedupe fumadocs/ui-kit rebuilds, fix TS buildinfo collision#7332
Merged
Merged
Conversation
…buildinfo collision and vacuous whitespace check Five independently-verified fixes from a CI resource-usage audit, each adversarially reviewed before landing (two other proposed fixes from the same audit were rejected after adversarial review found they'd break real CI paths -- see conversation): - ui-preview.yml's path filter matched the whole packages/** workspace, triggering a pointless UI preview build+deploy (~101s) on every miner/mcp/engine/discovery-index-only PR. Narrowed to packages/loopover-ui-kit/**, the only package apps/loopover-ui actually depends on. - ci.yml had two independent, unaware-of-each-other steps regenerating the same fumadocs content collections -- one unconditional, one correctly gated on push||ui==true. Removed the unconditional duplicate. - ci.yml's UI lint/typecheck/test steps each triggered ui:kit:build's full aggregate script, redundantly rebuilding ui-kit a package "Build UI-kit package" already built once earlier in the same job. Scoped to call the underlying workspace subcommands directly instead -- package.json's ui:lint/ui:typecheck/ui:test themselves are left untouched, since ui-deploy.yml and CONTRIBUTING.md's documented local gate sequence both call them directly with no prior ui-kit build and depend on that self-sufficiency. - packages/loopover-engine/tsconfig.json inherited the root config's tsBuildInfoFile unresolved, so its build silently wrote to the same .tsbuildinfo the root Typecheck step caches -- masked today only by step order, a landmine for the next reorder. Given its own path, mirroring the identical fix already applied to packages/loopover-miner/tsconfig.json. - The `changes` job's whitespace check ran bare `git diff --check` against a fresh checkout, comparing the working tree to the index -- always identical right after checkout, so it silently passed regardless of the PR's actual diff. Now diffs against the real comparison SHA.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
loopover-ui | f158305 | Commit Preview URL Branch Preview URL |
Jul 19 2026, 06:00 PM |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7332 +/- ##
==========================================
- Coverage 91.03% 91.03% -0.01%
==========================================
Files 714 714
Lines 72118 72118
Branches 19232 19232
==========================================
- Hits 65652 65651 -1
- Misses 5426 5427 +1
Partials 1040 1040
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
Five independently-verified CI resource/correctness fixes, following an exhaustive audit + adversarial review of
.github/workflows/ci.ymland its siblings (two other proposed fixes from the same audit were investigated and rejected after adversarial review found they'd break real CI paths — see Notes).ui-preview.yml's path filter matched the wholepackages/**workspace (not just whatapps/loopover-uidepends on), triggering a pointless UI preview build+deploy (~101s, confirmed on 5 real recent runs) on every miner/mcp/engine/discovery-index-only PR. Narrowed topackages/loopover-ui-kit/**, the only package the UI app actually imports (confirmed via dependency grep — zero hits for the excluded packages).ci.ymlhad two independent, unaware-of-each-other steps regenerating the same fumadocs content collections — one unconditional, one already correctly gated onpush||ui==true, added by two different commits ~2 hours apart. Removed the unconditional duplicate; confirmed nothing between the two runs on it.ci.yml's UI lint/typecheck/test steps each re-triggeredui:kit:build's full aggregate, redundantly rebuildingui-kita package a dedicated "Build UI-kit package" step already built once earlier in the same job. Scoped the three steps to call the underlying workspace subcommands directly instead (mirroring the same fix already applied to "UI build"). Deliberately did not touchpackage.json'sui:lint/ui:typecheck/ui:testscripts themselves —ui-deploy.ymlandCONTRIBUTING.md's documented local gate sequence both call them directly with no prior ui-kit build and depend on that self-sufficiency (verified by reproducing a realTS2307failure when that self-sufficiency is removed).packages/loopover-engine/tsconfig.jsoninherited the root config'stsBuildInfoFileunresolved, silently writing its incremental build state to the same.tsbuildinfothe rootTypecheckstep caches — masked today only by step order (a landmine for the next reorder). Fixed the same waypackages/loopover-miner/tsconfig.jsonalready documents and fixes this exact collision. Verified locally: engine build goes cold→2.7s, warm→1.0s, and stays warm after a full root typecheck run (previously would have gone cold again).changesjob's whitespace check ran baregit diff --checkagainst a fresh checkout — comparing the working tree to the index, which are always identical immediately after checkout, so it silently passed regardless of the PR's actual diff content. Now fetches the real comparison SHA and diffs against that. Verified in an isolated scratch clone that this correctly detects a real trailing-whitespace violation that the old form would have missed.Config/workflow-only change; no application source touched.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typecheck(clean, after building@loopover/engine)npm run test:coveragelocally — not run in full (nosrc/**change, no patch-coverage obligation). Instead ran the specific test files that reference the modified steps/scripts (ci-ui-build-openapi,codecov-policy,ci-generated-artifact-drift-checks,ci-cf-typegen-check,ci-dependency-cache,ci-skip-draft-prs,observability-ci,coding-agent-miner,path-matchers— 141 tests, all passing) plus targeted manual verification of each change (see Summary) including a livenpm --workspace @loopover/ui run lint/typecheckrun against a real prebuiltui-kit, and a real cold/warm/warm-after-typecheck timing check of the engine buildinfo fix.npm run test:workers— not run; untouched by this change.npm run build:mcp/npm run test:mcp-pack— not run; nopackages/loopover-mcpchange.npm run ui:openapi:check— not run; no OpenAPI-affecting change.npm run ui:lint/ui:typecheck/ui:build— the underlying workspace commands were run directly and verified (see above); the aggregatenpm runwrapper scripts themselves are unchanged.npm audit --audit-level=moderate— not run; no dependency change.If any required check was skipped, explain why:
Safety
UI Evidencesection — N/A, no visible/UI change.Notes
build:miner's internal@loopover/enginerebuild — reproduced a realTS2307failure this would cause on miner-only PRs that don't also touchpackage-lock.json; and (2) collapsingvalidate-code's ~13 independent drift checks into one backgrounded step — breaks 3 existing meta-tests that assert exact step names/conditions, for a real but modest gain (measured ~2.5s, not the full max-of-times claimed, due to CPU contention). A third, larger optimization (scoping the 6-shard test suite to just the changed package for miner/mcp/engine/discovery-index-only PRs) was also investigated and found to need a real design — not a same-session patch — since it silently breaks Codecov'safter_n_builds: 6gate andvitest --changeddemonstrably misses regressions reached throughpackages/loopover-engine's gitignoreddist/..github/workflows/**(a guarded path), so it'll be held for manual owner review rather than auto-merged, which is expected here.