Repository navigation
fix(docs): compile the examples in package READMEs, which nothing read - #1825
Conversation
A README is the first code a user copies, and it was the only documentation no gate had an opinion about: `check-docs-compile` reads `docs/`, this gate read `docs/`, and 43 TypeScript examples across 29 package and template READMEs were compiled by nothing at all. Three of them could not work as written. Widened rather than duplicated. The READMEs join the SAME collector, so they pass through the same extraction, the same reader-owned classification, the same continuation handling and the same ratchet. A second checker would need its own copy of all four, and a second baseline is a second thing that goes stale, which this repository has already been red over once. One line of the walk changed; everything downstream was already path-agnostic. The three the gate found on its first run: - `module-specifiers` called `readFileSync(file, ...)` with neither imported nor declared, so its only usage example could not run. - `builder` listed entry points by importing `rectToHost` from the root AND from `/geometry` in one block. Both exports are real, so the snippet was correct about the API and uncompilable as a paste; it names a distinct symbol now. - `plugin-page-builder`'s `defineBlock` example omitted `example`, which is REQUIRED. The block API gained the field and the documentation did not follow. The four left are reader placeholders — `myPosts`, `router`, `getPostBySlug`, an implicitly-typed `params` — and they are recorded in the baseline, which only shrinks. `--allow-new-findings` was needed to record them, which is the gate refusing to absorb findings quietly; widening the population is the deliberate act that flag exists for. Verified in both directions: breaking a README example turns the gate red, and narrowing the collector back to `docs/` alone fails two of the new tests.
|
Warning Review limit reachedNext included review available in 45 minutes. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (6)
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. Comment |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
@nextlyhq/adapter-drizzle
@nextlyhq/adapter-mysql
@nextlyhq/adapter-postgres
@nextlyhq/adapter-sqlite
@nextlyhq/admin
@nextlyhq/admin-css
@nextlyhq/blocks-engine
@nextlyhq/blocks-react
@nextlyhq/builder
create-nextly-app
@nextlyhq/eslint-plugin
nextly
@nextlyhq/plugin-form-builder
@nextlyhq/plugin-page-builder
@nextlyhq/plugin-sdk
@nextlyhq/plugin-seo
@nextlyhq/storage-s3
@nextlyhq/storage-uploadthing
@nextlyhq/storage-vercel-blob
@nextlyhq/ui
commit: |
The gap
A README is the first code a user copies, and it was the only documentation no
gate had an opinion about.
check-docs-compilereadsdocs/. This gate readdocs/. Measured onmain: 43 TypeScript examples across 29 package andtemplate READMEs, compiled by nothing at all.
Three of them could not work as written, and the gate found all three on its
first run.
What was broken
packages/module-specifierscalledreadFileSync(file, "utf8")withneither
readFileSyncimported norfiledeclared. Its only usage examplewas unrunnable.
packages/builderillustrated its entry points by importingrectToHostfrom the root package AND from
/geometryin one block. Both exports arereal, so the snippet was correct about the API and uncompilable as a paste. It
names a distinct symbol from
/geometrynow, so it still makes its point.packages/plugin-page-builder'sdefineBlockexample omittedexample,which is REQUIRED by
BlockDefinition. The block API gained a required fieldand the documentation did not follow — the drift nothing was watching for.
Why this widens the existing gate instead of adding one
The READMEs join the SAME collector, so they pass through the same extraction,
the same reader-owned classification, the same continuation handling and the
same ratchet. Exactly one line assumed
docs/; everything downstream wasalready path-agnostic.
A separate checker would need its own copy of all four, and a second baseline
is a second thing that goes stale — this repository was red on the existing
one earlier today, until #1810 regenerated it. One population, one baseline, one
place to keep honest.
What is left, and why it is recorded rather than fixed
Four findings remain, all reader placeholders:
myPosts,router,getPostBySlug, and an implicitly-typedparams. They are in the baseline,which only shrinks.
Recording them required
--allow-new-findings. That is the gate refusing toabsorb findings quietly, and widening the population is precisely the deliberate
act the flag exists for — worth noting rather than passing silently.
Evidence
check:doc-samplesexits 0. Coverage moves from 51 pages / 345 samples to69 pages / 388 samples, 244 compiled.
export that does not exist) fails the gate; narrowing the collector back to
docs/alone fails two of the new tests. Four new tests pin the population byNAME rather than by count, including one that the docs pages must still be
there, so a collector rewritten to return only READMEs cannot pass.
pnpm test:scripts1348 passed;check:docs-compile, comment convention andfallow:auditall green, zero introduced findings.