Skip to content

test: PR checks on a broken PR, left broken (do not merge) - #1948

Draft
marcleblanc2 wants to merge 14 commits into
mainfrom
marc/test-pr-checks-broken-2
Draft

test: PR checks on a broken PR, left broken (do not merge)#1948
marcleblanc2 wants to merge 14 commits into
mainfrom
marc/test-pr-checks-broken-2

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Test PR to exercise the spell check, check-links, and check-redirects PR checks on one commit that breaks all three. This PR stays broken; #1921 applies the checks' suggested fixes and then fixes the rest by hand, for a side-by-side comparison.

Built on main plus the check PRs not merged yet, so their latest code runs here: #1880 (check-redirects), #1916 (check-links report format), #1919 (spell check inline-comment updates).

Replaces #1913. Do not merge.

Merge order for the PR-check stack

Trial-merged onto main in this order with no conflicts:

  1. ci: Comment the Vercel build log on PRs whose build fails #1946 Vercel build log comment — independent; first so the other PRs' Vercel failures get a readable log
  2. check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 check-links report format — adds dev/sync-review-comments.sh, which ci/redirects: Add Redirect check for PRs #1935 calls
  3. ci/redirects: Add Redirect check for PRs #1935 redirect check — needs check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 merged first
  4. spell check: update inline comments whose text changed #1947 spell check comment updates — independent
  5. check-links: don't fail the generated-docs sync PR over absolute self-links it can't fix #1944 check-links, generated-docs sync PR — conflicts with check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 on dev/check-links.mjs; rebase after check-links: one suggestion per fix, synced with findings; one fact per line in reports #1916 merges

Squash-merge each, then rebase the next onto main.

#1948 (broken) and #1949 (fixed) are the example PRs that exercise every check; never merge, close them once the stack has landed.

marcleblanc2 and others added 12 commits September 11, 2026 09:08
dev/check-redirects.mjs checks every entry in src/data/redirects.ts:
source shadows a page, source has a #fragment, duplicate source,
/docs prefix, chained redirect, missing destination page or heading.
The workflow compares against the merge base, so only redirects a PR
breaks are reported, grouped by problem with the fix explained under
each heading, and posts one suggested change per fixable entry the PR
added (deleted again once the finding is gone).

Not part of `npm run check`: main has hundreds of pre-existing
findings.

Squash of the check-redirects branch rebased onto main; the check-links
commits it carried are already on main.

Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9
Co-authored-by: Amp <amp@ampcode.com>
… fact per line

- Review comments: one suggested change per finding with a fix, no review
  body. Each starts with a marker so the workflow can delete suggestions
  for findings that are fixed and skip ones already posted.
- Summary comment and review comments list line, link, problem, and fix
  on their own lines.
- Absolute links to this site get their own section instead of Outbound.
- Case-mismatch findings now carry a fix.
- Wording: 'links on this site', 'these other pages', drop
  docs.sourcegraph.com; reproduce command matches package.json.

Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9
Co-authored-by: Amp <amp@ampcode.com>
… update comments whose text changed

Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9
Co-authored-by: Amp <amp@ampcode.com>
Vercel shows build logs only to members of its team, so contributors
saw a red X and a login wall. On vercel.deployment.error this posts the
tail of the build log on the PR; on the next successful build the same
comment is updated to say the failure is fixed. Fork PRs are skipped so
the project-scoped Vercel token is never used on their behalf.
… (do not merge)

Check links: three absolute self-links (one to a moved page) and a dead
external link on one line; a missing page, missing heading, and wrong-case
path on the next; and the "Symbol search" heading renamed to break the
inbound anchor link from search-based-code-navigation.mdx.

Spell check: nine misspellings on one line, five of them block-list words.

Check redirects: one broken entry per category (shadowed page, #fragment
source, /docs prefix, duplicate source, chain, missing page, missing heading).

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9
@vercel

vercel Bot commented Sep 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
sourcegraph-docs Error Error Sep 11, 2026 11:01pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

❌ This PR introduces 8 broken link(s)

Outbound

Your PR includes links to pages or anchors that do not exist.

docs/code-search/features.mdx

  • line 154
    • Link: /code-search/no-such-page
    • Problem: Page not found: "/code-search/no-such-page"
  • line 154
    • Link: /code-search/features#no-such-heading
    • Problem: Anchor "no-such-heading" not found in "/code-search/features"
  • line 154
    • Link: /Code-Search/queries
    • Problem: Path case mismatch: works on macOS, 404s on the Linux build
    • Fix: /code-search/queries
  • line 152
    • Link: https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md
    • Problem: External link returns HTTP 404

Absolute links

Write links on this site as relative paths (/admin/config/site-config), not https://sourcegraph.com/docs/…: absolute links leave the preview deployment and local dev server, and hide moved pages behind redirects.

docs/code-search/features.mdx

  • line 152
    • Link: https://sourcegraph.com/docs/admin/config/site-config
    • Problem: Absolute link to this site
    • Fix: /admin/config/site-config
  • line 152
    • Link: //www.sourcegraph.com/docs/code-search/
    • Problem: Absolute link to this site
    • Fix: /code-search
  • line 152
    • Link: http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2
    • Problem: Absolute link to a moved page
    • Fix: /self-hosted/http-https-configuration#sourcegraph-via-docker-compose-caddy-2

Inbound

A change your PR made broke inbound links from these other files. Please fix the inbound links in these other files.

docs/code-navigation/search-based-code-navigation.mdx

  • line 20
    • Link: /code-search/features#symbol-search
    • Problem: Anchor "symbol-search" not found in "/code-search/features"

Reproduce locally with pnpm check links --check-anchors --check-self-links (see dev/check-links.mjs).

Adding a redirect in src/data/redirects.ts does not satisfy this check, because it’s a workaround instead of a fix.

- When viewing a file or directory, press the `y` key to expand the URL to its canonical form (with the full 40-character Git commit SHA).
- To share a link to multi-line range in a file, click on the starting line number and shift-click on the ending line number (in the left-hand gutter).

Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Link: https://sourcegraph.com/docs/admin/config/site-config
Problem: Absolute link to this site
Fix: /admin/config/site-config

Suggested change
Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).
Test links for the check-links workflow (will be reverted): [site config](/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

- When viewing a file or directory, press the `y` key to expand the URL to its canonical form (with the full 40-character Git commit SHA).
- To share a link to multi-line range in a file, click on the starting line number and shift-click on the ending line number (in the left-hand gutter).

Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Link: //www.sourcegraph.com/docs/code-search/
Problem: Absolute link to this site
Fix: /code-search

Suggested change
Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).
Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](/code-search), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

- When viewing a file or directory, press the `y` key to expand the URL to its canonical form (with the full 40-character Git commit SHA).
- To share a link to multi-line range in a file, click on the starting line number and shift-click on the ending line number (in the left-hand gutter).

Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Link: http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2
Problem: Absolute link to a moved page
Fix: /self-hosted/http-https-configuration#sourcegraph-via-docker-compose-caddy-2

Suggested change
Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).
Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](/self-hosted/http-https-configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).


Test links for the check-links workflow (will be reverted): [site config](https://sourcegraph.com/docs/admin/config/site-config), [search](//www.sourcegraph.com/docs/code-search/), [moved page](http://docs.sourcegraph.com/admin/http_https_configuration#sourcegraph-via-docker-compose-caddy-2), [dead external](https://github.com/sourcegraph/docs/blob/main/this-file-does-not-exist.md), [live external](https://github.com/sourcegraph/docs).

More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Link: /Code-Search/queries
Problem: Path case mismatch: works on macOS, 404s on the Linux build
Fix: /code-search/queries

Suggested change
More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).
More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/code-search/queries).

@github-actions

Copy link
Copy Markdown
Contributor

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

Only findings on lines added by this PR are shown.

docs/code-search/features.mdx

src/data/redirects.ts

cspell-allow-list.txt

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.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

indexs is not in the dictionary.

Did you mean indexes?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexes every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

repositry is not in the dictionary.

Did you mean repository?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repository acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

acros is not in the dictionary.

Did you mean arcos?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry arcos your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

seach is not in the dictionary.

Did you mean search?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so search results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

alwasy is not in the dictionary.

Did you mean always?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are always fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

databse is not in the dictionary.

Did you mean database?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the database layer, and the exector runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

exector is not in the dictionary.

Did you mean executor?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the executor runs each batch spec in its own contiainer.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.


More test links, none of which the check can fix for you: [missing page](/code-search/no-such-page), [missing heading](/code-search/features#no-such-heading), [wrong case](/Code-Search/queries).

Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

contiainer is not in the dictionary.

Did you mean container?

Suggested change
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own contiainer.
Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexs every repositry acros your organization, so seach results are alwasy fresh. It keeps compatability with the databse layer, and the exector runs each batch spec in its own container.

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.

Comment thread src/data/redirects.ts
},
{
source: "/old-ownership",
destination: "/code-ownershp"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ownershp is not in the dictionary.

Did you mean ownership?

Suggested change
destination: "/code-ownershp"
destination: "/code-ownership"

Please correct the spelling, or add the word to cspell-allow-list.txt if it is correct.

Comment thread cspell-allow-list.txt
Zaporizhzhia
Zoekt
zoomable
aardvark # test entry for the sorted-list check (will be reverted)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

aardvark is out of alphabetical order: move it above acmeco on line 26.

@github-actions

Copy link
Copy Markdown
Contributor

❌ This PR breaks 8 redirect(s)

Redirects are used so inbound traffic from external sources (links inside old versions of our product, bookmarks, search results, etc.) to old doc pages still reaches a relevant page.

A correct entry maps the old page path, exactly as the browser requests it, straight to a page that exists today, with an optional #heading that exists on the destination page:

{
	source: '/old/section/page',
	destination: '/new/section/page#heading-slug'
},

Each section below explains how to fix the entries listed under it.

Do not use redirects for broken internal links, internal links must be fixed properly to tame the tech debt snowball no one wants to deal with; the "Check links" PR check comment lists the links this PR broke, if any.

src/data/redirects.ts

Source overshadows a docs page that exists

Redirects take precedence over pages, so visitors to that page's URL are redirected away from it. Update or remove the redirect or the page to remove the conflict.

  • line 25
    source: '/admin/tls_ssl',
    destination: '/self-hosted/http-https-configuration'

Source has a #fragment, so this redirect can never match

Use the page path alone as the source. #fragments are processed in the browser, so browsers never send them to web servers.

If the redirect destination has a #fragment, it takes precedence, otherwise if the customer clicked a link which has a #fragment, it'll be kept and tried on the destination page.

  • line 17
    source: '/old-ownership#anchor',
    destination: '/code-ownership'
    Fix: remove this entry

Source or destination starts with /docs

Write paths without the /docs prefix. The site removes /docs from the requested URL before matching sources, and adds it back in front of the destination, so a /docs/... source never matches and a /docs/... destination lands on /docs/docs/....

  • line 5
    source: '/docs/old-prefixed',
    destination: '/code-ownership'
    Fix: change the source to /old-prefixed

Source already has an earlier entry, so this one is never used

Only the first entry for a source matches. Update that entry instead of adding another.

  • line 5916
    source: '/admin/http_https_configuration',
    destination: '/self-hosted/http-https-configuration'
    Fix: remove this entry

Destination is another redirect

Chained redirects cost the customer's browser a round trip, slow down their page load time, and frustrate them. They also make the redirects file impossible to maintain, and make it too easy to create redirect loops. Change the rule's destination to the final destination.

  • line 9
    source: '/old-chain',
    destination: '/admin/http_https_configuration'
    Fix: change the destination to /self-hosted/http-https-configuration

Destination page does not exist

Set the redirect destination to the page that replaced it, or remove the rule if there is no replacement page; visitors then get our fancy 404 page, with links they can click to find where they're trying to go, and the search bar.

  • line 13
    source: '/old-ownership',
    destination: '/code-ownershp'
  • line 715
    source: '/user/markdown',
    destination: '/admin/markdown'

Destination heading does not exist

Use the heading's correct anchor, or drop the #fragment to land the customer at the top of the page.

  • line 2647
    source: '/batch_changes/how-tos/server_side_file_mounts',
    destination: '/batch-changes/server-side#using-file-mounts-with-server-side-execution'
    Fix: change the destination to /batch-changes/server-side

Reproduce locally with node dev/check-redirects.mjs

Comment thread src/data/redirects.ts
Comment on lines +4 to +7
{
source: "/docs/old-prefixed",
destination: "/code-ownership"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem: Source or destination starts with /docs
Fix: change the source to /old-prefixed

Suggested change
{
source: "/docs/old-prefixed",
destination: "/code-ownership"
},
{
source: '/old-prefixed',
destination: '/code-ownership'
},

Comment thread src/data/redirects.ts
Comment on lines +8 to +11
{
source: "/old-chain",
destination: "/admin/http_https_configuration"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem: Destination is another redirect
Fix: change the destination to /self-hosted/http-https-configuration

Suggested change
{
source: "/old-chain",
destination: "/admin/http_https_configuration"
},
{
source: '/old-chain',
destination: '/self-hosted/http-https-configuration'
},

Comment thread src/data/redirects.ts
Comment on lines +16 to +19
{
source: "/old-ownership#anchor",
destination: "/code-ownership"
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem: Source has a #fragment, so this redirect can never match
Fix: remove this entry

Suggested change
{
source: "/old-ownership#anchor",
destination: "/code-ownership"
},

Comment thread src/data/redirects.ts
Comment on lines +5915 to +5918
{
source: "/admin/http_https_configuration",
destination: "/self-hosted/http-https-configuration"
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Problem: Source already has an earlier entry, so this one is never used
Fix: remove this entry

Suggested change
{
source: "/admin/http_https_configuration",
destination: "/self-hosted/http-https-configuration"
}

@marcleblanc2

Copy link
Copy Markdown
Contributor Author

❌ The Vercel build failed for this PR

Vercel paywalls build logs to authorized users in its web UI, so here is the build log.

Build log
+ @algolia/autocomplete-core 1.19.5
+ @algolia/client-search 4.25.3
+ @docsearch/react 3.9.0
+ @headlessui/react 1.7.19
+ @heroicons/react 2.2.0
+ @iconify-json/logos 1.2.10
+ @iconify/types 2.0.0
+ @mdx-js/mdx 3.1.1
+ @radix-ui/react-hover-card 1.1.15
+ @radix-ui/react-select 2.2.6
+ @radix-ui/react-slot 1.2.4
+ @tailwindcss/typography 0.5.19
+ @types/node 20.4.9
+ @types/react 18.2.20
+ @types/react-dom 18.2.7
+ @types/react-highlight-words 0.16.7
+ algoliasearch 4.25.3
+ autoprefixer 10.4.24
+ class-variance-authority 0.7.1
+ clsx 1.2.1
+ contentlayer 0.3.4
+ date-fns 2.30.0
+ fast-glob 3.3.3
+ feed 4.2.2
+ github-slugger 2.0.0
+ kbar 0.1.0-beta.44
+ lucide-react 0.372.0
+ mdx 0.3.1
+ mermaid 11.17.2
+ next 14.2.35
+ next-contentlayer 0.3.4
+ next-themes 0.2.1
+ prism-react-renderer 2.4.1
+ react 18.3.1
+ react-dom 18.3.1
+ react-highlight-words 0.20.0
+ react-syntax-highlighter 15.6.6
+ rehype-autolink-headings 7.1.0
+ rehype-pretty-code 0.10.2
+ rehype-slug 6.0.0
+ rehype-toc 3.0.2
+ remark-gfm 3.0.1
+ shiki 0.14.7
+ simple-functional-loader 1.2.1
+ svg-pan-zoom 3.6.2
+ tailwind-merge 2.6.1
+ tailwindcss 3.4.19
+ tailwindcss-animate 1.0.7
+ typescript 5.1.6
+ unist-util-visit 5.1.0

devDependencies:
+ dotenv 16.6.1
+ eslint 8.45.0
+ eslint-config-next 13.4.16
+ glob 11.1.0
+ prettier 3.8.1
+ prettier-plugin-tailwindcss 0.5.14
+ sharp 0.35.4

╭ Warning ─────────────────────────────────────────────────────────────────────╮
│                                                                              │
│   Ignored build scripts: contentlayer@0.3.4, esbuild@0.18.20,                │
│   protobufjs@7.6.6, unrs-resolver@1.11.1.                                    │
│   Run "pnpm approve-builds" to pick which dependencies should be allowed     │
│   to run scripts.                                                            │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯
Done in 14.7s using pnpm v10.25.0
Detected Next.js version: 14.2.35
Running "pnpm run build"

> sourcegraph-docs@0.1.0 build /vercel/path0
> node dev/checks.mjs && node dev/generate-mermaid-icons.mjs && next build

🔍 Checking for dead links in MDX files...

❌ Found 2 dead link(s) in 1 file(s):


📄 docs/code-search/features.mdx
   Line 154: /code-search/no-such-page
   └─ Page not found: "/code-search/no-such-page"
   Line 154: /Code-Search/queries
   └─ Path case mismatch: works on macOS, 404s on the Linux build; use /code-search/queries
🔍 Checking for underscores in docs filenames...

❌ Found 1 path(s) with underscores:

   docs/admin/tls_ssl.mdx

   Please use hyphens (-) instead of underscores (_) in file and folder names.

🔍 Checking for raw <img> tags in MDX files...

✅ No raw <img> tags found in MDX files!

❌ Failed checks: links, filenames
 ELIFECYCLE  Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1

marcleblanc2 added a commit that referenced this pull request Sep 11, 2026
…er line in reports (#1916)

Follow-ups from testing the PR checks on #1913 / #1914.

- Review comments: one suggested change per finding (not one per line),
no review body. Each comment starts with an HTML marker; the workflow
deletes suggestions whose finding is gone (or that GitHub could no
longer place, `line: null`) and skips ones already posted, so resolved
suggestions disappear like the spell check's do.
- Summary comment and review comments put line, link, problem, and fix
each on their own line.
- Absolute links to this site get their own **Absolute links** section
instead of being lumped into Outbound.
- Case-mismatch findings now come with a fix (`/Code-Search/queries` →
`/code-search/queries`).
- Wording: "Write links on this site as relative paths", "fix the
inbound links on these other pages", dropped
`https://docs.sourcegraph.com/…`; reproduce command matches
`package.json` (`pnpm check links …`).

Tested locally against the `test-pr-checks-broken` branch with the CI
recipe (baseline from `origin/main`, `--diff`, `--review`); build-mode
run (`node dev/check-links.mjs`) still clean.

Trade-off: when several fixes sit on one line, applying one suggestion
outdates the others until the next run re-posts them, because GitHub
will not batch overlapping suggestions.

<!-- pr-stack-merge-order -->
## Merge order for the PR-check stack

Trial-merged onto `main` in this order with no conflicts:

1. #1946 Vercel build log comment — independent; first so the other PRs'
Vercel failures get a readable log
2. #1916 check-links report format — adds `dev/sync-review-comments.sh`,
which #1935 calls
3. #1935 redirect check — needs #1916 merged first
4. #1947 spell check comment updates — independent
5. #1944 check-links, generated-docs sync PR — conflicts with #1916 on
`dev/check-links.mjs`; rebase after #1916 merges

Squash-merge each, then rebase the next onto `main`.

#1948 (broken) and #1949 (fixed) are the example PRs that exercise every
check; never merge, close them once the stack has landed.

---------

Co-authored-by: Amp <amp@ampcode.com>
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