Skip to content

fix: heal poisoned docs build assets - #742

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/fix-docs-asset-cache
Aug 29, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/fix-docs-asset-cache

Conversation

@danny-avila

@danny-avila danny-avila commented Aug 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • identify real Vercel production events by the deployment-status creator so automatic purges no longer skip
  • choose baselines only from deployment-specific successful purge markers, while caching status lookups by commit
  • after the Vercel alias settles, collect exact current /_next/static assets from fresh page shells and the Webpack lazy-chunk map, then purge those URLs globally
  • keep manual broad recovery usable when live discovery is unhealthy, while automatic deploys still fail closed

Root cause

Discussion #15331 reports a webpack chunk returning 404. The ordinary URL is a roughly six-day-old Cloudflare cache hit, while the same asset with a fresh cache key returns 200 from Vercel. The negative entry is edge-location-specific.

The existing automatic purge workflow was also skipped for every production deployment because it checked deployment.creator.login == vercel[bot]; Vercel attributes the deployment to the initiating human and posts the successful deployment status as vercel[bot].

Purging the bounded set of current build assets by exact URL clears poisoned entries in every Cloudflare location without evicting the entire /_next/static namespace.

Validation

  • pnpm lint:prettier
  • pnpm lint
  • pnpm typecheck
  • pnpm test (381 tests)
  • workflow YAML parse and git diff --check
  • branch workflow dry run: collected 96 current build assets from 21 page templates and their Webpack runtime, including the reported webpack URL and a lazy CSS asset; no Cloudflare purge was issued

@vercel

vercel Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
librechat-ai Ready Ready Preview Aug 29, 2026 2:05pm

Request Review

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 1f941eb. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 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-08-29T14:04:41.353462Z 84e5821 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.

@danny-avila
danny-avila force-pushed the danny-avila/fix-docs-asset-cache branch from 1f941eb to c4687f8 Compare August 29, 2026 13:13
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head c4687f8. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4687f85ec

ℹ️ 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".

Comment thread scripts/cache-build-assets.mjs Outdated
@danny-avila
danny-avila force-pushed the danny-avila/fix-docs-asset-cache branch from c4687f8 to 7d65728 Compare August 29, 2026 13:17
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 7d65728. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7d65728d26

ℹ️ 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".

Comment thread scripts/cache-build-assets.mjs Outdated
@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head c568eeb. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c568eeb8dc

ℹ️ 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".

Comment thread scripts/cache-build-assets.mjs
Comment thread .github/workflows/cache-purge.yml Outdated
@danny-avila
danny-avila force-pushed the danny-avila/fix-docs-asset-cache branch from c568eeb to a8159e7 Compare August 29, 2026 13:41
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head a8159e7. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8159e7289

ℹ️ 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".

Comment thread scripts/cache-build-assets.mjs
@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@danny-avila
danny-avila force-pushed the danny-avila/fix-docs-asset-cache branch from a8159e7 to d9dad4f Compare August 29, 2026 13:48
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head d9dad4f. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d9dad4f379

ℹ️ 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".

Comment thread scripts/cache-build-assets.mjs
@danny-avila
danny-avila force-pushed the danny-avila/fix-docs-asset-cache branch from d9dad4f to 84e5821 Compare August 29, 2026 14:00
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 84e5821. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 84e5821385

ℹ️ 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

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@danny-avila
danny-avila merged commit e161206 into main Aug 29, 2026
7 checks passed
@danny-avila
danny-avila deleted the danny-avila/fix-docs-asset-cache branch August 29, 2026 14:52

This branch was successfully deployed

1 active deployment
Preview — 84e58213 Deployed Aug 29, 2026 by vercel[bot]
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