Publish synced llms files as static assets#134
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 25 minutes and 19 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Greptile SummaryThis PR publishes synced
Confidence Score: 4/5The static publishing path can remove generated endpoints, and the new sync test can overwrite workspace state.
scripts/prepare-docs.mjs and scripts/sync-docs.test.mjs Important Files Changed
Reviews (1): Last reviewed commit: "Publish synced llms files as static asse..." | Re-trigger Greptile |
| await fs.rm(targetFile, { force: true }); | ||
| if (!(await exists(sourceFile))) { | ||
| continue; | ||
| } | ||
|
|
||
| await fs.copyFile(sourceFile, targetFile); |
There was a problem hiding this comment.
Missing Source Deletes Endpoint
When content/upstream/static is missing one of the synced llms*.txt files, this removes the existing Docusaurus static file before the missing-source check skips the copy. A standalone prepare:docs run or a partial sync can silently drop a previously generated endpoint from the site build and make /llms-full-pro.txt or the other static paths return 404.
| await fs.rm(targetFile, { force: true }); | |
| if (!(await exists(sourceFile))) { | |
| continue; | |
| } | |
| await fs.copyFile(sourceFile, targetFile); | |
| if (!(await exists(sourceFile))) { | |
| continue; | |
| } | |
| await fs.copyFile(sourceFile, targetFile); |
| await writeFakeUpstream(upstreamRoot); | ||
|
|
||
| const upstreamContent = path.join(workspaceRoot, "content", "upstream"); | ||
| await fs.rm(upstreamContent, { recursive: true, force: true }); |
There was a problem hiding this comment.
This deletes content/upstream in the real checkout, while the temp-dir cleanup only covers the fake source repo. Running this test leaves the workspace populated with fake upstream docs on success, and an interruption or sync failure after this line can remove the developer's generated docs/static/changelog state until they run a full sync again.
|
Cloudflare preview deployed.
|
|
Merging under maintainer authority because this PR is the remaining downstream fix exposed by shakacode/react_on_rails#4219: the upstream repo now dispatches docs-site rebuilds successfully, but the hosted /llms*.txt endpoints stay 404 unless reactonrails.com copies the synced root llms files into Docusaurus static output. Local verification passed (script tests, prepare, install, build with existing warnings), and hosted build/deploy plus Greptile/CodeRabbit are green. |
Summary
llms.txt,llms-full.txt, andllms-full-pro.txtintocontent/upstream/staticstatic/root during prepare so Cloudflare serves/llms*.txtWhy merge
shakacode/react_on_railsnow successfully dispatches docs-site rebuilds after rootllms*changes, but the public endpoints still return 404 because this site never copied those upstream root files into the Docusaurus static output. This PR closes that gap without changing canonical content ownership.Test plan
node --test scripts/sync-docs.test.mjs scripts/prepare-docs.test.mjs scripts/docs-layout.test.mjsgit diff --checknpm run preparenpm run install:sitenpm run build(passes; existing broken-link/anchor warnings remain)prototypes/docusaurus/build/llms.txt,llms-full.txt, andllms-full-pro.txtare present