dev: diff a preview deployment against production - #2011
Draft
marcleblanc2 wants to merge 1 commit into
Draft
marcleblanc2 wants to merge 1 commit into
marcleblanc2 wants to merge 1 commit into
Conversation
Fetches every sitemap page from both sites, strips build ids, chunk hashes, the RSC payload and (when they differ) the basePath, and writes a unified diff of the pages that still differ to logs/. Amp-Thread-ID: https://ampcode.com/threads/T-01a0b2e2-a101-7132-b956-da8493ee40b5 Co-authored-by: Amp <amp@ampcode.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Contributor
|
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.
What
Adds
dev/diff-deployments.mjs, a script that fetches every page from a Vercel preview deployment and from production (https://sourcegraph.com/docsby default), normalizes the HTML, and reports which pages differ. Documented inAGENTS.md.How it works
/robots.txt,/sitemap.xml,/api/versions,/api/releases, and a known-404 page.<script>tags (RSC payload),data-dpl-id, Turbopack chunk hashes, the Cloudflarecdn-cgianchor, sitemap<lastmod>. Sitemap<url>blocks are sorted./docsbasePath only when the two sites serve under different basePaths; when both serve under/docs, a missing prefix is a real bug and is reported.diff -u; no new dependencies.logs/diff-deployments-<timestamp>.diffwhen pages differ. Exits 1 on any difference or fetch failure.Worked example
Run against the preview for #1997 (rebased on main + #1977): 504 identical, 3 differ, 0 failed. All three differences come from #1977's root-relative
<img>fix (/sourcegraph-mark.svg→/docs/sourcegraph-mark.svgon/integration/browser-extensionand/self-hosted/deploy;/aws-ami-marketplace.png→/docs/aws-ami-marketplace.pngon/self-hosted/deploy/machine-images/aws-ami). The root-relative paths 404 on prod today and the/docs/ones return 200, so those are fixes. #1997's own commits change nothing in rendered HTML.An earlier run against the pre-rebase preview flagged 501 pages, all explained by the branch lacking #2001 (per-page canonical) and #1975 (lazy-load images), which confirms the normalizer does not hide
<head>or attribute changes.