From b7f5bd351672b118363ed1ede0ae26184fc565cc Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:13:33 -0600 Subject: [PATCH 01/14] ci: fail PRs that break redirects, with suggested fixes 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 --- .github/workflows/check-redirects.yml | 133 +++++++ AGENTS.md | 1 + dev/check-redirects.mjs | 492 ++++++++++++++++++++++++++ 3 files changed, 626 insertions(+) create mode 100644 .github/workflows/check-redirects.yml create mode 100644 dev/check-redirects.mjs diff --git a/.github/workflows/check-redirects.yml b/.github/workflows/check-redirects.yml new file mode 100644 index 000000000..634678aa0 --- /dev/null +++ b/.github/workflows/check-redirects.yml @@ -0,0 +1,133 @@ +name: Check redirects + +# Reports redirects in src/data/redirects.ts that this PR breaks, compared with +# the merge base: destinations that no longer exist, #fragments whose heading +# was renamed, and new redirects that shadow an existing page. Pre-existing +# broken redirects on the base branch are ignored. + +on: + pull_request: + +# A new push supersedes the run for the previous one +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +permissions: + contents: read + pull-requests: write + +jobs: + check-redirects: + name: Broken redirects introduced by this PR + runs-on: ubuntu-latest + steps: + - name: Check out pull request head + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 + + - name: Install github-slugger, the only dependency of dev/check-redirects.mjs + # Into a scratch prefix, not the repo: `npm install ` next to + # package.json would install every dependency of the site + run: | + npm install --prefix "$RUNNER_TEMP/deps" --no-package-lock --no-audit --no-fund \ + "github-slugger@$(node -p 'require("./package.json").dependencies["github-slugger"]')" + ln -s "$RUNNER_TEMP/deps/node_modules" node_modules + + - name: Check out merge base + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + run: | + merge_base=$(git merge-base "$BASE_SHA" HEAD) + git worktree add "$RUNNER_TEMP/base" "$merge_base" + git diff -U0 "$merge_base" HEAD -- src/data/redirects.ts > "$RUNNER_TEMP/changes.diff" + + - name: Record broken redirects already present on the base branch + # Exit 1 means findings, which is expected here + run: | + node dev/check-redirects.mjs --format json \ + --root "$RUNNER_TEMP/base" > "$RUNNER_TEMP/base-redirects.json" \ + || [ $? -eq 1 ] + + - name: Find redirects broken by this PR + id: check + env: + # Line links in the report open redirects.ts on the PR branch + LINK_BASE: ${{ github.event.pull_request.head.repo.html_url }}/blob/${{ github.event.pull_request.head.ref }} + run: | + if node dev/check-redirects.mjs --format markdown \ + --baseline "$RUNNER_TEMP/base-redirects.json" \ + --diff "$RUNNER_TEMP/changes.diff" \ + --review "$RUNNER_TEMP/review.json" \ + --link-base "$LINK_BASE" > "$RUNNER_TEMP/report.md"; then + echo "broken=false" >> "$GITHUB_OUTPUT" + else + echo "broken=true" >> "$GITHUB_OUTPUT" + fi + cat "$RUNNER_TEMP/report.md" + + - name: Comment on the pull request + # Fork PRs get a read-only token; the report is still in the job log + if: github.event.pull_request.head.repo.full_name == github.repository + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + BROKEN: ${{ steps.check.outputs.broken }} + run: | + marker='' + existing_comment=$(gh api "repos/$GITHUB_REPOSITORY/issues/$PR_NUMBER/comments" \ + --paginate --jq ".[] | select(.body | startswith(\"$marker\")) | .id" | head -n 1) + + # Comment only when there is something to report, or an earlier report to resolve + if [ "$BROKEN" = true ]; then + { echo "$marker"; cat "$RUNNER_TEMP/report.md"; } > "$RUNNER_TEMP/comment.md" + elif [ -n "$existing_comment" ]; then + printf '%s\n### ✅ The redirects an earlier revision of this PR broke are fixed\n' \ + "$marker" > "$RUNNER_TEMP/comment.md" + else + exit 0 + fi + + if [ -n "$existing_comment" ]; then + gh api --method PATCH "repos/$GITHUB_REPOSITORY/issues/comments/$existing_comment" \ + --field body=@"$RUNNER_TEMP/comment.md" + else + gh pr comment "$PR_NUMBER" --body-file "$RUNNER_TEMP/comment.md" + fi + + - name: Suggest fixes as review comments + # One suggested change per fixable entry this PR added. Suggestions + # already on the PR (same lines and entry) are not posted again; + # suggestions for findings that are gone are deleted. GitHub sets line + # to null on comments it could not carry to the new revision, so those + # are deleted too. + if: github.event.pull_request.head.repo.full_name == github.repository + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + run: | + key='(.path + ":" + (.line | tostring) + ":" + (.body | split("\n")[0]))' + gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/comments" --paginate \ + --jq ".[] | select(.body | startswith(\"`, + `Problem: ${problem}`, + `Fix: ${describeFix(finding)}`, + '````suggestion', + ...entry, + '````' + ]; + return { + path: REDIRECTS_PATH, + ...(startLine !== endLine && {start_line: startLine, start_side: 'RIGHT'}), + line: endLine, + side: 'RIGHT', + body: body.join('\n') + }; + }); + return {event: 'COMMENT', body: '', comments}; +} + +const FORMATTERS = { + text: formatText, + json: findings => JSON.stringify(findings, null, '\t') + '\n', + markdown: formatMarkdown +}; + +function main() { + const format = FORMATTERS[FORMAT]; + if (!format) { + throw new Error( + `Unknown --format "${FORMAT}"; use text, json, or markdown` + ); + } + + let findings = findBrokenRedirects(loadRedirects(), buildHeadingsByRoute()); + if (BASELINE_FILE) { + findings = withoutBaseline(findings, BASELINE_FILE); + } + + if (REVIEW_FILE) { + const added = DIFF_FILE ? addedLines(DIFF_FILE) : new Set(); + fs.writeFileSync( + REVIEW_FILE, + JSON.stringify(reviewRequest(findings, added), null, '\t') + '\n' + ); + } + + // Not process.exit(): that can truncate stdout when it is a pipe + process.stdout.write(format(findings)); + process.exitCode = findings.length === 0 ? 0 : 1; +} + +main(); From b2f29c2576034b177e379bf719291a8a40aeda9b Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:26:15 -0600 Subject: [PATCH 02/14] check-redirects: don't repeat the final destination the Fix line already names Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- dev/check-redirects.mjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dev/check-redirects.mjs b/dev/check-redirects.mjs index 6317eacc8..f13831db8 100644 --- a/dev/check-redirects.mjs +++ b/dev/check-redirects.mjs @@ -232,11 +232,15 @@ function findBrokenRedirects(redirects, headingsByRoute) { const destination = splitUrl(redirect.destination); if (isRedirect(destination.pathname)) { + // The fix names the final destination; only a loop needs `detail` const final = finalDestination(destination.pathname); - report(redirect, PROBLEM.chained, { - detail: final ?? 'none, redirect loop', - fix: final && {source: redirect.source, destination: final} - }); + report( + redirect, + PROBLEM.chained, + final + ? {fix: {source: redirect.source, destination: final}} + : {detail: 'none, redirect loop'} + ); continue; } const headings = headingsByRoute.get(destination.pathname); From 1508206a48760cac8b0bc328908459e03d0b75a3 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 09:06:08 -0600 Subject: [PATCH 03/14] check-redirects: sync review comments with dev/sync-review-comments.sh (from the check-links PR) Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- .github/workflows/check-redirects.yml | 28 +++------------------------ 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/.github/workflows/check-redirects.yml b/.github/workflows/check-redirects.yml index 634678aa0..706bd254e 100644 --- a/.github/workflows/check-redirects.yml +++ b/.github/workflows/check-redirects.yml @@ -98,35 +98,13 @@ jobs: fi - name: Suggest fixes as review comments - # One suggested change per fixable entry this PR added. Suggestions - # already on the PR (same lines and entry) are not posted again; - # suggestions for findings that are gone are deleted. GitHub sets line - # to null on comments it could not carry to the new revision, so those - # are deleted too. + # One suggested change per fixable entry this PR added, kept in sync + # with the findings; see dev/sync-review-comments.sh if: github.event.pull_request.head.repo.full_name == github.repository env: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - key='(.path + ":" + (.line | tostring) + ":" + (.body | split("\n")[0]))' - gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/comments" --paginate \ - --jq ".[] | select(.body | startswith(\"`, + `Link: \`${url}\``, + `Problem: ${error}`, + `Fix: \`${fix}\``, + '````suggestion', + source.split(url).join(fix), + '````' + ]; + return { path: file, line, side: 'RIGHT', body: body.join('\n') }; }); - return { - event: 'COMMENT', - body: 'Suggested fixes for the links this PR adds; details in the check-links comment.', - comments - }; + return { event: 'COMMENT', body: '', comments }; } const FORMATTERS = { From e2f24a2390e93d74b297d48b92d3db63df1ffbe2 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:07:03 -0600 Subject: [PATCH 05/14] cspell: allow tostring, a jq builtin used in the workflows Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- cspell-allow-list.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/cspell-allow-list.txt b/cspell-allow-list.txt index 9b26c3c7c..3411345cc 100644 --- a/cspell-allow-list.txt +++ b/cspell-allow-list.txt @@ -545,6 +545,7 @@ toolcall topk topsecretorg topsecretproject +tostring # jq builtin transactionally transformchanges transformchangesgroup From f92288605a4b78de0b6315b79ed35c173e3676f6 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:27:35 -0600 Subject: [PATCH 06/14] check-links: don't repeat the link and fix inside the case-mismatch problem Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- dev/check-links.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/check-links.mjs b/dev/check-links.mjs index 5eab267b9..8ad57213f 100644 --- a/dev/check-links.mjs +++ b/dev/check-links.mjs @@ -414,7 +414,7 @@ function validateLink(link, currentFile, maps) { resolvedPath.replace(/\/$/, '').toLowerCase() ); if (realPath) { - return { error: `Case mismatch: "${resolvedPath}" should be "${realPath}"`, fix: anchor ? `${realPath}#${anchor}` : realPath }; + return { error: 'Path case mismatch: works on macOS, 404s on the Linux build', fix: anchor ? `${realPath}#${anchor}` : realPath }; } // Check if it's a file with extension (like .png, .pdf) From 41aae0f7383aff44608b7113456b2ab0efbcfdfd Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:32:30 -0600 Subject: [PATCH 07/14] check-links: inbound section wording Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- dev/check-links.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/check-links.mjs b/dev/check-links.mjs index 8ad57213f..3bb48936e 100644 --- a/dev/check-links.mjs +++ b/dev/check-links.mjs @@ -606,7 +606,7 @@ function formatMarkdown(findings) { section('Absolute links', ABSOLUTE_LINKS_ADVICE, absolute); section( 'Inbound', - 'A change your PR made broke inbound links from elsewhere. Please fix the inbound links on these other pages.', + 'A change your PR made broke inbound links from these other files. Please fix the inbound links in these other files.', inbound ); } else { From 2407a719dc650b6f319925e8d6edce2187f51be5 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 09:05:38 -0600 Subject: [PATCH 08/14] check-links: move review-comment sync to dev/sync-review-comments.sh; update comments whose text changed Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- .github/workflows/check-links.yml | 27 +++------------------ dev/sync-review-comments.sh | 40 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 24 deletions(-) create mode 100755 dev/sync-review-comments.sh diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 98063e9d6..c5e4d7503 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -97,34 +97,13 @@ jobs: fi - name: Suggest fixes as review comments - # One suggested change per finding with a fix. Suggestions already on the - # PR (same file, line, and link) are not posted again; suggestions for - # findings that are gone are deleted. GitHub sets line to null on comments - # it could not carry to the new revision, so those are deleted too. + # One suggested change per finding with a fix, kept in sync with the + # findings; see dev/sync-review-comments.sh if: github.event.pull_request.head.repo.full_name == github.repository env: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.pull_request.number }} - run: | - key='(.path + ":" + (.line | tostring) + ":" + (.body | split("\n")[0]))' - gh api "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/comments" --paginate \ - --jq ".[] | select(.body | startswith(\"". +# +# Usage: dev/sync-review-comments.sh ''; + +async function fetchJson(url, headers) { + const response = await fetch(url, {headers}); + if (!response.ok) { + throw new Error( + `GET ${url} failed: ${response.status} ${await response.text()}` + ); + } + return response.json(); +} + +async function github(method, route, body) { + const response = await fetch(`${API_URL}${route}`, { + method, + headers: { + authorization: `Bearer ${process.env.GH_TOKEN}`, + accept: 'application/vnd.github+json', + 'x-github-api-version': '2022-11-28', + ...(body && {'content-type': 'application/json'}) + }, + body: body && JSON.stringify(body) + }); + if (!response.ok) { + throw new Error( + `${method} ${route} failed: ${response.status} ${await response.text()}` + ); + } + return response.json(); +} + +async function githubList(route) { + const items = []; + for (let page = 1; ; page++) { + const batch = await github('GET', `${route}?per_page=100&page=${page}`); + items.push(...batch); + if (batch.length < 100) { + return items; + } + } +} + +// The dispatch payload has no PR number; look it up from the commit. A stale +// event for a commit the PR has moved past is ignored. Fork PRs are ignored +// too, so the Vercel token is only ever used for commits by people who can +// already push to this repository. +async function findPullRequest() { + const pulls = await github( + 'GET', + `/repos/${REPOSITORY}/commits/${COMMIT_SHA}/pulls` + ); + const pull = pulls.find( + pull => pull.state === 'open' && pull.head.sha === COMMIT_SHA + ); + if (pull && pull.head.repo.full_name !== REPOSITORY) { + console.log(`PR #${pull.number} is from a fork; not reporting`); + return undefined; + } + return pull; +} + +// Build log lines, oldest first. Vercel keeps them as events; only the ones +// with text are log lines. +async function fetchBuildLog() { + const url = new URL( + `https://api.vercel.com/v3/deployments/${DEPLOYMENT_ID}/events` + ); + url.searchParams.set('limit', '-1'); + url.searchParams.set('direction', 'forward'); + if (process.env.VERCEL_TEAM_ID) { + url.searchParams.set('teamId', process.env.VERCEL_TEAM_ID); + } + const events = await fetchJson(url, { + authorization: `Bearer ${process.env.VERCEL_TOKEN}` + }); + return events + .map(event => event.payload?.text ?? event.text) + .filter(text => typeof text === 'string') + .flatMap(text => text.replace(/\n$/, '').split('\n')); +} + +// The failure is at the end of the log; keep the tail within GitHub's comment +// size limit. A four-backtick fence so lines containing ``` cannot break out. +function failureBody(logLines) { + let tail = logLines.slice(-MAX_LOG_LINES); + while (tail.length > 1 && tail.join('\n').length > MAX_LOG_CHARS) { + tail = tail.slice(1); + } + const omitted = logLines.length - tail.length; + return [ + MARKER, + '### ❌ The Vercel build failed for this PR', + '', + 'Vercel only shows build logs to members of its team, so here is the end of the log.', + 'Run `npm run build` locally to reproduce.', + '', + '
', + `Build log${omitted > 0 ? ` (last ${tail.length} of ${logLines.length} lines)` : ''}`, + '', + '````', + ...tail, + '````', + '', + '
', + '' + ].join('\n'); +} + +async function main() { + for (const name of [ + 'DEPLOYMENT_ID', + 'DEPLOYMENT_STATE', + 'COMMIT_SHA', + 'GH_TOKEN', + 'GITHUB_REPOSITORY' + ]) { + if (!process.env[name]) { + throw new Error(`Missing required environment variable ${name}`); + } + } + if (!['error', 'success'].includes(DEPLOYMENT_STATE)) { + throw new Error(`Unexpected DEPLOYMENT_STATE ${DEPLOYMENT_STATE}`); + } + + const pull = await findPullRequest(); + if (!pull) { + console.log(`No open PR with head ${COMMIT_SHA}; nothing to do`); + return; + } + + const comments = await githubList( + `/repos/${REPOSITORY}/issues/${pull.number}/comments` + ); + const existing = comments.find(comment => comment.body.startsWith(MARKER)); + + // Comment only when the build failed, or an earlier failure is resolved + let body; + if (DEPLOYMENT_STATE === 'error') { + if (!process.env.VERCEL_TOKEN) { + throw new Error('VERCEL_TOKEN is required to read the build log'); + } + body = failureBody(await fetchBuildLog()); + } else if (existing) { + body = `${MARKER}\n### ✅ The Vercel build that failed on an earlier revision of this PR passes\n`; + } else { + console.log(`PR #${pull.number} has no failed build to resolve`); + return; + } + + if (DRY_RUN) { + console.log( + `[dry-run] would ${existing ? 'update' : 'create'} comment on PR #${pull.number}:\n` + ); + console.log(body); + } else if (existing) { + console.log(`Updating comment ${existing.id} on PR #${pull.number}`); + await github( + 'PATCH', + `/repos/${REPOSITORY}/issues/comments/${existing.id}`, + {body} + ); + } else { + console.log(`Commenting on PR #${pull.number}`); + await github( + 'POST', + `/repos/${REPOSITORY}/issues/${pull.number}/comments`, + {body} + ); + } +} + +main().catch(error => { + console.error(error); + process.exit(2); +}); From 7333b3f00d5ab92b6a7465850e208efb60110026 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 04:11:15 -0600 Subject: [PATCH 12/14] test: break links, spelling, and redirects to exercise every PR check (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-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 --- cspell-allow-list.txt | 1 + docs/admin/markdown.mdx | 3 --- docs/admin/tls_ssl.mdx | 5 +++++ docs/batch-changes/server-side.mdx | 2 +- docs/code-search/features.mdx | 8 +++++++- src/data/redirects.ts | 20 ++++++++++++++++++++ 6 files changed, 34 insertions(+), 5 deletions(-) delete mode 100644 docs/admin/markdown.mdx create mode 100644 docs/admin/tls_ssl.mdx diff --git a/cspell-allow-list.txt b/cspell-allow-list.txt index 4df15e327..c4ec98dda 100644 --- a/cspell-allow-list.txt +++ b/cspell-allow-list.txt @@ -599,3 +599,4 @@ YOURUSERNAME Zaporizhzhia Zoekt zoomable +aardvark # test entry for the sorted-list check (will be reverted) diff --git a/docs/admin/markdown.mdx b/docs/admin/markdown.mdx deleted file mode 100644 index 3308e167f..000000000 --- a/docs/admin/markdown.mdx +++ /dev/null @@ -1,3 +0,0 @@ -# Sourcegraph-flavored Markdown - -Sourcegraph uses [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/) anywhere Markdown is rendered. We like this [Markdown cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for reference. diff --git a/docs/admin/tls_ssl.mdx b/docs/admin/tls_ssl.mdx new file mode 100644 index 000000000..11c9a2c37 --- /dev/null +++ b/docs/admin/tls_ssl.mdx @@ -0,0 +1,5 @@ +--- +title: TLS test page +--- + +# TLS test page diff --git a/docs/batch-changes/server-side.mdx b/docs/batch-changes/server-side.mdx index c301fa1d8..537b21f59 100644 --- a/docs/batch-changes/server-side.mdx +++ b/docs/batch-changes/server-side.mdx @@ -37,7 +37,7 @@ Running batch changes server-side has been tested to run a simple **45K changese By default, docker on mac will build docker images for `linux/arm64`, which will result in errors when running server-side because executors provide `linux/amd64` hosts. If you're creating your own images to run in batch changes, this can be a problem. Use the `--platform linux/amd64` flag with `docker build` to build images compatible with the server-side host. -## Using file mounts with server-side execution +## Using file mounts with SSBC Running a batch spec server-side with file mounts is currently only diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index b86a4d8f3..7a1b47dd5 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -45,7 +45,7 @@ Searching over commit messages is supported in Sourcegraph by adding `type:commi See our [query syntax](/code-search/queries#diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters. -## Symbol search +## Symbol lookup Searching for symbols makes it easier to find specific functions, variables, and more. Use the `type:symbol` filter to search for symbol results. Symbol results also appear in typeahead suggestions, so you can jump directly to symbols by name. When on an [indexed](/admin/search#indexed-search) commit, it uses Zoekt. Otherwise it uses the [symbols service](/code-search/types/symbol) @@ -148,3 +148,9 @@ This file picker is useful when comparing branches with thousands of changed fil - 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). + +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. diff --git a/src/data/redirects.ts b/src/data/redirects.ts index c1a548241..2652334e0 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -1,6 +1,22 @@ import {TECHNICAL_CHANGELOG_RSS_URL} from './constants'; const redirectsData = [ + { + source: "/docs/old-prefixed", + destination: "/code-ownership" + }, + { + source: "/old-chain", + destination: "/admin/http_https_configuration" + }, + { + source: "/old-ownership", + destination: "/code-ownershp" + }, + { + source: "/old-ownership#anchor", + destination: "/code-ownership" + }, { source: '/integration/img/disable_extension.png', destination: '/integration/img/disable-extension.png' @@ -5896,6 +5912,10 @@ const redirectsData = [ source: '/code-search/how-to/create-search-context-graphql', destination: '/api' }, + { + source: "/admin/http_https_configuration", + destination: "/self-hosted/http-https-configuration" + } ]; const updatedRedirectsData = redirectsData.map(redirect => { From 402e125af8621ff0d98eef800378ca8cc138d2d3 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:21:03 -0600 Subject: [PATCH 13/14] test: apply the fixes the PR checks suggested Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- docs/code-search/features.mdx | 6 +++--- src/data/redirects.ts | 16 ++++------------ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 7a1b47dd5..5e546876b 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -149,8 +149,8 @@ This file picker is useful when comparing branches with thousands of changed fil - 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). +Test links for the check-links workflow (will be reverted): [site config](/admin/config/site-config), [search](/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). -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). -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 repository arcos your organization, so search results are always fresh. It keeps compatibility with the database layer, and the executor runs each batch spec in its own container. diff --git a/src/data/redirects.ts b/src/data/redirects.ts index 2652334e0..fde6ff628 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -2,19 +2,15 @@ import {TECHNICAL_CHANGELOG_RSS_URL} from './constants'; const redirectsData = [ { - source: "/docs/old-prefixed", - destination: "/code-ownership" + source: '/old-prefixed', + destination: '/code-ownership' }, { - source: "/old-chain", - destination: "/admin/http_https_configuration" + source: '/old-chain', + destination: '/self-hosted/http-https-configuration' }, { source: "/old-ownership", - destination: "/code-ownershp" - }, - { - source: "/old-ownership#anchor", destination: "/code-ownership" }, { @@ -5912,10 +5908,6 @@ const redirectsData = [ source: '/code-search/how-to/create-search-context-graphql', destination: '/api' }, - { - source: "/admin/http_https_configuration", - destination: "/self-hosted/http-https-configuration" - } ]; const updatedRedirectsData = redirectsData.map(redirect => { From 406a779472b8010923ead04906540df6f85781b5 Mon Sep 17 00:00:00 2001 From: Marc LeBlanc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 11 Sep 2026 05:22:32 -0600 Subject: [PATCH 14/14] test: fix what the checks could only report Restore the deleted page, the shadowed redirect page, and both renamed headings; point the dead links at real targets; fix the one misspelling CSpell guessed wrong (across, not arcos); drop the unsorted allow-list entry. Amp-Thread-ID: https://ampcode.com/threads/T-01a08fee-74b4-76dc-aaf9-d1245d68fdc9 Co-authored-by: Amp --- cspell-allow-list.txt | 1 - docs/admin/markdown.mdx | 3 +++ docs/admin/tls_ssl.mdx | 5 ----- docs/batch-changes/server-side.mdx | 2 +- docs/code-search/features.mdx | 8 ++++---- 5 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 docs/admin/markdown.mdx delete mode 100644 docs/admin/tls_ssl.mdx diff --git a/cspell-allow-list.txt b/cspell-allow-list.txt index c4ec98dda..4df15e327 100644 --- a/cspell-allow-list.txt +++ b/cspell-allow-list.txt @@ -599,4 +599,3 @@ YOURUSERNAME Zaporizhzhia Zoekt zoomable -aardvark # test entry for the sorted-list check (will be reverted) diff --git a/docs/admin/markdown.mdx b/docs/admin/markdown.mdx new file mode 100644 index 000000000..3308e167f --- /dev/null +++ b/docs/admin/markdown.mdx @@ -0,0 +1,3 @@ +# Sourcegraph-flavored Markdown + +Sourcegraph uses [GitHub Flavored Markdown (GFM)](https://github.github.com/gfm/) anywhere Markdown is rendered. We like this [Markdown cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) for reference. diff --git a/docs/admin/tls_ssl.mdx b/docs/admin/tls_ssl.mdx deleted file mode 100644 index 11c9a2c37..000000000 --- a/docs/admin/tls_ssl.mdx +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: TLS test page ---- - -# TLS test page diff --git a/docs/batch-changes/server-side.mdx b/docs/batch-changes/server-side.mdx index 537b21f59..c301fa1d8 100644 --- a/docs/batch-changes/server-side.mdx +++ b/docs/batch-changes/server-side.mdx @@ -37,7 +37,7 @@ Running batch changes server-side has been tested to run a simple **45K changese By default, docker on mac will build docker images for `linux/arm64`, which will result in errors when running server-side because executors provide `linux/amd64` hosts. If you're creating your own images to run in batch changes, this can be a problem. Use the `--platform linux/amd64` flag with `docker build` to build images compatible with the server-side host. -## Using file mounts with SSBC +## Using file mounts with server-side execution Running a batch spec server-side with file mounts is currently only diff --git a/docs/code-search/features.mdx b/docs/code-search/features.mdx index 5e546876b..3f3655bf2 100644 --- a/docs/code-search/features.mdx +++ b/docs/code-search/features.mdx @@ -45,7 +45,7 @@ Searching over commit messages is supported in Sourcegraph by adding `type:commi See our [query syntax](/code-search/queries#diff-and-commit-searches-only) documentation for a comprehensive list of supported parameters. -## Symbol lookup +## Symbol search Searching for symbols makes it easier to find specific functions, variables, and more. Use the `type:symbol` filter to search for symbol results. Symbol results also appear in typeahead suggestions, so you can jump directly to symbols by name. When on an [indexed](/admin/search#indexed-search) commit, it uses Zoekt. Otherwise it uses the [symbols service](/code-search/types/symbol) @@ -149,8 +149,8 @@ This file picker is useful when comparing branches with thousands of changed fil - 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](/admin/config/site-config), [search](/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](/admin/config/site-config), [search](/code-search), [moved page](/self-hosted/http-https-configuration#sourcegraph-via-docker-compose-caddy-2), [live external](https://github.com/sourcegraph/docs/blob/main/README.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). +More test links, none of which the check can fix for you: [page](/code-search/queries), [heading](/code-search/features#symbol-search), [right case](/code-search/queries). -Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexes every repository arcos your organization, so search results are always fresh. It keeps compatibility with the database layer, and the executor runs each batch spec in its own container. +Test paragraph for the spell check workflow (will be reverted): Sourcegraph indexes every repository across your organization, so search results are always fresh. It keeps compatibility with the database layer, and the executor runs each batch spec in its own container.