Repository navigation
chore(web): regenerate the SEO lastmod manifest on main, not in PRs - #713
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
blove
temporarily deployed
to
vercel-preview
September 17, 2026 20:34 — with
GitHub Actions
Inactive
Every docs branch had to run the generator to satisfy a freshness assertion, so two branches touching any page conflicted inside a generated artifact. That cost five rebases on one PR in a single day. - New SEO lastmod workflow regenerates and commits the manifest after a content change reaches main, serialized against itself and scoped to the paths the manifest derives from so it cannot retrigger itself. - The freshness tests now assert the generator's own round trip instead of asserting the committed file is current, so a stale timestamp no longer fails a PR. - A new --check-routes mode keeps the half a PR must still own: a route the manifest has never seen has no timestamp at all, and requireValidLastModified throws during the build. Adding or removing a page still fails until the author regenerates. The file stays committed deliberately. It is the only record of when each route last changed, and the sitemap imports it statically, so generating it from scratch during a build would stamp every route with the build clock and destroy the signal. Co-Authored-By: Claude Opus 5 <[email protected]>
The workflow contracts pin every workflow's executable entrypoints in two allowlists, so a new workflow file is rejected until both describe it. The audit reports a mismatch without a diff, deliberately, so these entries are the descriptor it computes: the three pinned actions, the three run steps, and the job's contents: write permission. Pinning the push step's exact shell text is the point — changing it later has to be a deliberate, re-audited edit. Co-Authored-By: Claude Opus 5 <[email protected]>
blove
force-pushed
the
chore/seo-lastmod-ci
branch
from
September 18, 2026 00:45
af796ee to
89d91af
Compare
blove
enabled auto-merge (squash)
September 18, 2026 00:45
blove
temporarily deployed
to
vercel-preview
September 18, 2026 00:45 — with
GitHub Actions
Inactive
…main rule #712 landed a bullet telling contributors to regenerate the SEO manifest in the same commit or CI goes red. This branch's own bullet, a few lines above, says the opposite — do NOT regenerate for an ordinary content edit — because the workflow now does it on main. Leaving both made the standards doc contradict itself on the one point it was added to settle. Removes the older bullet and keeps the half of it that is still true and not covered by the new one: what to do when the manifest does conflict, which a route add or removal can still cause. Co-Authored-By: Claude Opus 5 <[email protected]>
Biome reports the fixture this branch adds as unformatted, which is an error rather than a warning, so `pnpm lint` exits non-zero and reds source-validate and the required validate check. Formatting only. `pnpm test:release-integrity` and the workflow-contracts digest snapshot both still pass, so no pinned digest moved. Co-Authored-By: Claude Opus 5 <[email protected]>
blove
temporarily deployed
to
vercel-preview
September 18, 2026 01:05 — with
GitHub Actions
Inactive
This was referenced Sep 18, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
apps/web/app/seo/lastmod.generated.jsonis a generated artifact that every docs branch had to regenerate, because a test asserted the committed file was current. Two branches touching any page therefore conflicted inside that artifact. On #691 that cost five rebases in one day, four of which conflicted only on this file.What this does
SEO lastmodworkflow regenerates and commits the manifest on main, after a content change lands. It is scoped to the paths the manifest derives from, and its own commit touches only the manifest, so it cannot retrigger itself. It is serialized with a non-cancelling concurrency group, refuses to push if the run dirtied anything other than the manifest, and rebases rather than forces if it loses a race.--check-routesmode keeps the half a PR must still own. A stale timestamp is harmless and gets corrected on main. A route the manifest has never seen has no timestamp at all, andrequireValidLastModifiedthrows during the build, so adding or removing a page still fails the PR until the author regenerates.A side benefit: the recorded timestamp is now when the content reached main, rather than whenever the author happened to run the script, which is what the sitemap is actually claiming.
Why the file is still committed
I did not remove it, and I think removing it would be wrong:
apps/web/app/seo/lastmod.ts, so it must exist on disk for typecheck andnext build.Generating it from scratch during a build would stamp every route with the build's own clock, so every deploy would claim every page had just changed. That is a worse outcome than the conflicts it would fix.
Verification
apps/websuite passes, 636 tests. That is the case that used to fail.--check-routesfails and names the route. That is the case that must still fail.apps/websuite, the docs completeness checker, and Biome all pass.Reviewer note
This grants the workflow
contents: writeand pushes one generated file to main. Branch protection allows it today,required_pull_request_reviewsis not enabled. That is the one policy decision in here and worth your explicit yes.🤖 Generated with Claude Code