Skip to content

fix(root): the scheduled metadata check loads nothing an install would provide - #1879

Merged
mobeenabdullah merged 1 commit into
mainfrom
fix/the-metadata-check-loads-without-an-install
Sep 13, 2026
Merged

mobeenabdullah merged 1 commit into
mainfrom
fix/the-metadata-check-loads-without-an-install

Conversation

@mobeenabdullah

Copy link
Copy Markdown
Collaborator

main has shown a red About line and topics check on every scheduled run since 2026-09-11 (tracking issue #1799). The About line and the topics were never wrong. The job crashes before it examines either.

Root cause

repo-metadata.yml runs straight after checkout with no install, on purpose — its own comment says both scripts import only Node builtins. check-repo-metadata.mjs imported the retired-category patterns from check-docs-claims.mjs. #1767 gave that module an import { compile } from "@mdx-js/mdx", and its own import of check-docs-compile.mjs brings js-yaml as well. ES imports evaluate eagerly, so importing two regexes loaded an MDX compiler the job cannot resolve:

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@mdx-js/mdx'
Evidence Result
Workflow history 5 successes through 2026-09-10, then a failure on every run — a clean cutover, not a rate limit
git log -S'@mdx-js/mdx' introduced by #1767, merged 2026-09-11 11:11; first failure 12:11
CI log (2026-09-12 run) ERR_MODULE_NOT_FOUND from packageResolve
Faithful repro — whole scripts/, no node_modules in the directory or any ancestor, GITHUB_EVENT_NAME=schedule exit 1 on main, exit 0 on this branch
Ruled out About line equals the package description at every recent commit; all required topics present; the check passes with CI's exact environment once it can load

Why #1767 merged green: this job runs on a schedule only, never on a pull request, and pull-request CI installs dependencies first. The invariant lived in a YAML comment nothing enforced, in a different file from the code that broke it.

Fix

The patterns and their classifier move verbatim into scripts/retired-category.mjs, which imports nothing. The metadata check imports it directly. check-docs-claims.mjs imports and re-exports it, so there is still exactly one definition — the metadata script's docblock explicitly forbids restating it — and every existing importer keeps its path.

Rejected: adding an install to the job (reintroduces the fragility its author removed on purpose, and #1391 owns that workflow file); a lazy import() of the compiler (leaves the coupling, and the next top-level import silently re-breaks it).

Verification

Check Result
Reproduction on main: the job's scripts/ and the one file it reads, copied where no package resolves (a control confirmed nothing resolves), run with GITHUB_EVENT_NAME=schedule exit=1 ERR_MODULE_NOT_FOUND lines=3
The same reproduction on this branch exit=0 ERR_MODULE_NOT_FOUND lines=0
test:scripts exit 0, 1371 passed (1371)
lint:scripts · check:comments · check:docs-claims · check:docs-compile exit 0 · exit 0 · exit 0 · exit 0
fallow audit, new-only pass: 3 changed files, introduced dead code 0, complexity 0, duplication 0

Why this is its own pull request

#1864 carried this fix together with a pull-request guard that keeps every job without an install to builtin imports. That guard is still in review. This fix has not drawn a finding in any round, and main's scheduled job keeps failing every day until it lands, so it ships on its own. #1864 keeps the guard.

No changeset: root tooling only, no published package changes.

Addresses #1799. I'll close that issue once a scheduled or dispatched run passes after merge, not on merge.

…d provide

scripts/check-repo-metadata.mjs runs in repo-metadata.yml, a scheduled job
that installs nothing. It imported the retired-category patterns from
check-docs-claims.mjs, which imports @mdx-js/mdx and, through
check-docs-compile.mjs, js-yaml. Every scheduled run since 2026-09-11 has
died with ERR_MODULE_NOT_FOUND before checking anything.

The patterns and their classifier move verbatim into
scripts/retired-category.mjs, which imports nothing. check-repo-metadata.mjs
imports it directly; check-docs-claims.mjs imports and re-exports it, so
there is still one definition and every existing importer keeps its path.
@mobeenabdullah

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-13T17:23:17.191276Z b40a758 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 5 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: deb202a8-50a0-4283-8a8d-9f8aa5131b04

📥 Commits

Reviewing files that changed from the base of the PR and between 44fec3d and b40a758.

📒 Files selected for processing (3)
  • scripts/check-docs-claims.mjs
  • scripts/check-repo-metadata.mjs
  • scripts/retired-category.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: b40a758d4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

Copy link
Copy Markdown
Contributor

Whole-Repository Code Hygiene Summary

Full dead-code, duplication, and complexity report for the PR branch as it stands now. Playground is excluded. Quality gate enforcement on introduced issues is performed by the Changed files job.

🌿 Fallow

Warning

Review needed

⚠️ 73 code issues · ⚠️ 677 clone groups · ⚠️ 1036 health findings

See inline review comments for per-finding details.

Code issues (73)
Category Count
Unused files 2
Unused exports 5
Unused dependencies 19
Unused devDependencies 6
Unresolved imports 2
Unlisted dependencies 1
Circular dependencies 38
Duplication (677 groups · 28396 lines · 3.9%)
Locations Lines Tokens
schemas/_dialect-bundles/mysql.relations.ts:40-134
schemas/_dialect-bundles/postgres.relations.ts:40-134
schemas/_dialect-bundles/sqlite.relations.ts:40-134
95 593
cli/commands/db-sync-demote.ts:70-75
cli/commands/db-sync-promote.ts:38-43
cli/commands/dev-build.ts:100-105
cli/commands/dev-build.ts:179-184
cli/commands/dev-build.ts:299-304
cli/commands/dev-build.ts:411-416
cli/commands/dev-build.ts:552-557
cli/commands/dev-server.ts:575-580
cli/commands/dev-server.ts:840-845
cli/commands/dev-server.ts:1143-1148
cli/commands/migrate-field-groups.ts:110-115
6 70
entries/EntryList/EntryTableSkeleton.tsx:74-98
collection/components/CollectionTableSkeleton.tsx:94-118
field-group/components/FieldGroupTableSkeleton.tsx:90-114
plugins/components/PluginsTableSkeleton.tsx:86-110
singles/components/SinglesTableSkeleton.tsx:77-101
src/components/table-skeleton.tsx:100-124
25 89
collections/config/validate-config.ts:380-433
field-groups/config/validate-field-group.ts:185-238
singles/config/validate-single.ts:190-243
54 152
dispatcher/handlers/collection-dispatcher.ts:925-967
field-groups/services/field-group-table-provisioning.ts:186-236
singles/services/reconcile-single-companion.ts:110-160
51 149

… and 672 more groups.

Across 425 files.

Complexity (1036 functions above threshold)
File Function Severity Cyclomatic Cognitive CRAP Lines
singles/services/single-mutation-service.ts:966 <arrow> critical 246 ! 308 ! 13317.5 ! 1650
collections/services/collection-mutation-service.ts:6355 <arrow> critical 168 ! 155 ! 6264.4 ! 1296
src/init/reload-config.ts:1417 applyReload critical 143 ! 211 ! 4560 ! 1470
shared/lib/entry-validation.ts:245 validateFieldValue critical 109 ! 157 ! 2675.3 ! 432
dynamic-collections/services/dynamic-collection-schema-service.ts:1050 generateAlterTableMigration critical 104 ! 221 ! 2440.3 ! 782

5131 files, 79887 functions analyzed (thresholds: cyclomatic > 20, cognitive > 15, CRAP >= 30)

Codebase health

Metric Value
Maintainability 91.7 / 100
Avg complexity 1.8

Tip

Run fallow fix --dry-run to preview auto-fixes.
Add /** @public */ above exports to preserve them.

@pkg-pr-new

pkg-pr-new Bot commented Sep 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nextlyhq/adapter-drizzle

npm i https://pkg.pr.new/@nextlyhq/adapter-drizzle@b40a758

@nextlyhq/adapter-mysql

npm i https://pkg.pr.new/@nextlyhq/adapter-mysql@b40a758

@nextlyhq/adapter-postgres

npm i https://pkg.pr.new/@nextlyhq/adapter-postgres@b40a758

@nextlyhq/adapter-sqlite

npm i https://pkg.pr.new/@nextlyhq/adapter-sqlite@b40a758

@nextlyhq/admin

npm i https://pkg.pr.new/@nextlyhq/admin@b40a758

@nextlyhq/admin-css

npm i https://pkg.pr.new/@nextlyhq/admin-css@b40a758

@nextlyhq/blocks-engine

npm i https://pkg.pr.new/@nextlyhq/blocks-engine@b40a758

@nextlyhq/blocks-react

npm i https://pkg.pr.new/@nextlyhq/blocks-react@b40a758

@nextlyhq/builder

npm i https://pkg.pr.new/@nextlyhq/builder@b40a758

create-nextly-app

npm i https://pkg.pr.new/create-nextly-app@b40a758

@nextlyhq/eslint-plugin

npm i https://pkg.pr.new/@nextlyhq/eslint-plugin@b40a758

nextly

npm i https://pkg.pr.new/nextly@b40a758

@nextlyhq/plugin-form-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-form-builder@b40a758

@nextlyhq/plugin-mcp

npm i https://pkg.pr.new/@nextlyhq/plugin-mcp@b40a758

@nextlyhq/plugin-page-builder

npm i https://pkg.pr.new/@nextlyhq/plugin-page-builder@b40a758

@nextlyhq/plugin-sdk

npm i https://pkg.pr.new/@nextlyhq/plugin-sdk@b40a758

@nextlyhq/plugin-seo

npm i https://pkg.pr.new/@nextlyhq/plugin-seo@b40a758

@nextlyhq/storage-s3

npm i https://pkg.pr.new/@nextlyhq/storage-s3@b40a758

@nextlyhq/storage-uploadthing

npm i https://pkg.pr.new/@nextlyhq/storage-uploadthing@b40a758

@nextlyhq/storage-vercel-blob

npm i https://pkg.pr.new/@nextlyhq/storage-vercel-blob@b40a758

@nextlyhq/ui

npm i https://pkg.pr.new/@nextlyhq/ui@b40a758

commit: b40a758

@mobeenabdullah
mobeenabdullah merged commit 82beef1 into main Sep 13, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant