test(buildgen): add incremental output equivalence#798
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 895450980e
ℹ️ 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".
| result.RobotsPath = robotsPath | ||
| reporter.info("seo", "robots_written", "robots.txt written", BuildEvent{Path: eventPath(outputDir, robotsPath)}) | ||
| } | ||
| if err := removeStaleAssetManifestFiles(outputDir, previousAssets, result.CSSArtifacts, result.AssetArtifacts); err != nil { |
There was a problem hiding this comment.
Preserve assets still referenced by unchanged pages
In BuildIncrementalFromValidatedProgram, only pages listed in changedPageSources are re-rendered, but this cleanup removes every previous manifest asset that is not in the current asset set. When a global CSS processor asset such as Tailwind's app stylesheet changes during a single-page incremental rebuild, unchanged pages keep their old hashed stylesheet link while this deletes that old file, turning those pages' CSS URL into a 404; either force all pages that include changed global assets to render or delay deleting stale assets until no unchanged HTML can reference them.
Useful? React with 👍 / 👎.
Summary
Validation
Issue
Refs #686