Skip to content

fix(ci): regenerate fumadocs collections unconditionally in validate-code - #6375

Merged
JSONbored merged 1 commit into
mainfrom
fix/ci-ui-docs-collections-cache-miss
Jul 16, 2026
Merged

fix(ci): regenerate fumadocs collections unconditionally in validate-code#6375
JSONbored merged 1 commit into
mainfrom
fix/ci-ui-docs-collections-cache-miss

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • The push-to-main CI workflow's `validate-code` job has been intermittently failing on `UI typecheck` with `Cannot find module 'collections/browser'`/`'collections/server'` -- confirmed present on every recent commit to main, unrelated to any specific PR's own diff.
  • Root cause: `apps/loopover-ui`'s fumadocs-mdx virtual modules are generated by its own `postinstall` hook (`fumadocs-mdx`), which only runs as part of `npm ci`. The `Restore node_modules cache` step skips `npm ci` entirely on a cache hit -- but the cached paths cover only `node_modules`, not the gitignored `apps/loopover-ui/.source` output -- so a warm-cache CI run reaches UI lint/typecheck/tests/build with the collections output completely missing.
  • Adds an unconditional `Generate docs content collections` step (same class of fix as the existing `Build UI-kit package` step, which solves an identical gitignored-artifact gap for a different package), so cache hit or miss makes no difference.

Test plan

  • Reproduced locally: moved `apps/loopover-ui/.source` aside (simulating a cache-hit CI run with no postinstall), confirmed `ui:typecheck` fails with the exact reported error
  • Ran the fix command (`npm run postinstall --workspace @loopover/ui`) and confirmed `ui:typecheck` passes
  • `npm run actionlint` clean
  • Full `npm run test:ci` gate green

…code

The Restore/Install-dependencies step skips npm ci (and its postinstall
hook, which runs fumadocs-mdx) whenever the node_modules cache hits --
but the cache only covers node_modules, not apps/loopover-ui/.source, so
a cache-hit run reaches UI lint/typecheck/tests/build with no
collections/browser or collections/server module at all and fails with
"Cannot find module 'collections/browser'". Adds an unconditional
regeneration step, same rationale as the existing "Build UI-kit package"
step for the same class of gitignored-required-artifact gap.
@superagent-security

Copy link
Copy Markdown
Contributor

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

@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 95.60%. Comparing base (2352da4) to head (9c90da7).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6375   +/-   ##
=======================================
  Coverage   95.60%   95.60%           
=======================================
  Files         599      599           
  Lines       47235    47235           
  Branches    15031    15031           
=======================================
  Hits        45157    45157           
  Misses       1291     1291           
  Partials      787      787           
Flag Coverage Δ
shard-1 44.17% <ø> (ø)
shard-2 36.39% <ø> (ø)
shard-3 32.52% <ø> (ø)
shard-4 34.62% <ø> (ø)
shard-5 31.59% <ø> (ø)
shard-6 44.87% <ø> (ø)

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

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
@loopover-orb

loopover-orb Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Warning

⏸️ LoopOver review result - manual review recommended

Review updated: 2026-07-16 05:23:25 UTC

1 file · 1 AI reviewer · 2 blockers · CI green · clean

⏸️ Suggested Action - Manual Review

Review summary
Adds an unconditional 'Generate docs content collections' step to ci.yml's validate-code job, running `npm run postinstall --workspace @​loopover/ui` before UI lint/typecheck to regenerate gitignored fumadocs-mdx virtual modules that are otherwise skipped when the node_modules cache hits. The fix mirrors the existing unconditional 'Build UI-kit package' step pattern for the same class of gitignored-artifact gap, is narrowly scoped to CI config, and the PR's own test plan documents reproducing the failure and confirming the fix locally. CI on this commit is fully green, consistent with the claimed fix.

Nits — 2 non-blocking
  • The inline comment on .github/workflows/ci.yml is quite long (6 lines) for a single step; could be trimmed to the root-cause summary with detail left to the PR description.
  • Consider whether the new step should also gate on a `docs` or similar path filter in addition to `needs.changes.outputs.ui` if fumadocs content lives outside the ui change-detection path, to avoid unnecessary runs.

Concerns raised — review before merging

  • No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.
  • Maintainer requires a linked issue — Link the relevant issue (for example Closes #123) before opening the PR.
📋 Copy for AI agents — paste into your coding agent
Fix the following blocker(s) from this PR review:

1. No linked issue detected — If this PR is intended to solve an issue, link it explicitly in the PR body.

2. Maintainer requires a linked issue — Link the relevant issue (for example `Closes #123`) before opening the PR.

Decision drivers

  • ❌ Code review — 2 blockers (1 reviewer)
  • ❌ Gate result — Blocking (Repo-configured hard blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ⚠️ Missing No linked issue or no-issue rationale found.
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (no linked issue context).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 42 registered-repo PR(s), 34 merged, 408 issue(s).
Contributor context ✅ Confirmed Gittensor contributor JSONbored; Gittensor profile; 42 PR(s), 408 issue(s).
Improvement ℹ️ Insufficient signal risk: clean · value: insufficient-signal
Review context
  • Author: JSONbored
  • Role context: owner (maintainer lane)
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: not available
  • Official Gittensor activity: 42 PR(s), 408 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Start here: Treat this as maintainer-lane context rather than normal contributor-lane activity.
  • Then work through the remaining 3 steps in the Signals table above.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.

  • @loopover ask &lt;question&gt; answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat &lt;question&gt; answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed


💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →.

Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.

  • Re-run LoopOver review

@loopover-orb loopover-orb Bot added the manual-review Gittensor contributor context label Jul 16, 2026
@JSONbored
JSONbored merged commit b41b957 into main Jul 16, 2026
17 checks passed
@JSONbored
JSONbored deleted the fix/ci-ui-docs-collections-cache-miss branch July 16, 2026 05:24
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. manual-review Gittensor contributor context

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant