GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — dev: diff a preview deployment against production by marcleblanc2 · Pull Request #2011 · sourcegraph/docs

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

What

Adds dev/diff-deployments.mjs, a script that fetches every page from a Vercel preview deployment and from production (https://sourcegraph.com/docs by default), normalizes the HTML, and reports which pages differ. Documented in AGENTS.md.

node dev/diff-deployments.mjs --site https://<preview>.vercel.app/docs
node dev/diff-deployments.mjs --site <url> --pages /admin,/cli --limit 50 --concurrency 6

How it works

  • Enumerates the union of both sitemaps, plus /robots.txt, /sitemap.xml, /api/versions, /api/releases, and a known-404 page.
  • Strips noise that differs between any two deployments: <script> tags (RSC payload), data-dpl-id, Turbopack chunk hashes, the Cloudflare cdn-cgi anchor, sitemap <lastmod>. Sitemap <url> blocks are sorted.
  • Strips the /docs basePath only when the two sites serve under different basePaths; when both serve under /docs, a missing prefix is a real bug and is reported.
  • Node builtins + OS diff -u; no new dependencies.
  • Prints a summary; writes the combined unified diff to logs/diff-deployments-<timestamp>.diff when 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.svg on /integration/browser-extension and /self-hosted/deploy; /aws-ami-marketplace.png → /docs/aws-ami-marketplace.png on /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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@marcleblanc2 @ampagent
dev: diff a preview deployment against production
de0d012
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 <[email protected]>
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 18, 2026 5:21am UTC

Request Review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Open the Diff Tour for this PR in Sourcegraph

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions

github-actions Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

⚠️ Spell check found 1 issue(s) in this PR

Only findings on lines added by this PR, and in its title and description, are shown.

Pull request description

  • line 13, column 171
    • lastmod → lsmod

Please correct the spelling, or add words which are correct to cspell-allow-list.txt.

Run npx cspell@10 --no-progress --dot '**/*' locally to check the full repository.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This branch was successfully deployed

1 active deployment
Preview — de0d0125 Deployed Sep 18, 2026 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@marcleblanc2
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.