You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting a page and replacing with an xref evades the "deleted page" check #1920
both of them deleted a page, but added an equivalent xref in the sidebar. CI passed cleanly. when the PRs were merged, the pages 404'd
note: the crosslinks within the repo were already cleaned up. does the deleted page logic still trip if there are no incoming links? I want to test this but want to log this bug asap
Expected behavior
you can't run or hide from the "deleted page with no redirect" error
Triage update — still reproducible on main (xref hypothesis was a red herring)
The "deleted page → no redirect" check does not read toc.yml or any incoming-link state. Replacing a file: entry with a crosslink: does not satisfy or suppress the redirect requirement.
The actual bypass is a path-prefix bug in CI mode for repos where the docset lives at the repo root (e.g. elastic/docs-content):
When the docset is at the repo root, LocalChangesService passes lookupPath = ".", which becomes "./". PR paths in DELETED_FILES look like deploy-manage/foo.md — they don't start with "./", so every entry is filtered out. ValidateRedirects sees zero deletions and exits cleanly. Local runs (LocalGitRepositoryTracker) use real git diff and aren't affected by the prefix bug.
A fix already exists on the unmerged branch fix/diff-validate-docset-at-root (fc84db91, f6be1ea5, 223d560c) with a NormalizeLookupPath and tests including the docs-content regression case (troubleshoot/deployments/serverless.md).
Proposed plan
Merge the existing fix branch (after re-checking it still applies cleanly).
Tighten missing-redirects.yml policy: if DELETED_FILES contains .md deletions and redirects.yml is absent, fail with a clear diagnostic instead of returning success.
Fix local rename emission in LocalGitRepositoryTracker.GetCommitChanges (lines 58–62): emit RenamedGitChange, not bare GitChange, so authors see rename-without-redirect failures locally.
Add E2E regression test simulating the docs-content layout: docset at root, deleted .md, no redirect, unrelated crosslink: added to nav.
Docs: add a note to docs/contribute/redirects.md clarifying that swapping file: → crosslink: does not remove the need for a redirect for the old URL.
Open questions
Should the lenient missing-redirects.yml behavior from Ensure diff validate returns no error if redirects.yml is not found #1940 stay or revert? Lenient mode helps initial onboarding of a repo; strict mode prevents this exact bug class. A "strict if any deletions detected" middle-ground seems right but I'd like a maintainer call.
Writers/docs-team: is replacing a local page with an xref ever a legitimate alternative to a redirect (e.g., content moved to another repo)? Today, no — the old URL still 404s. If yes, the validator would need to recognize this transition.
Activity
natasha-moore-elastic commentedon Oct 6, 2025
Another PR where a file was renamed without redirects but CI checks passed: elastic/docs-content#3318
shainaraskas commentedon May 13, 2026
elastic/docs-content#5212
This PR deleted a page without a redirect, resulting in a 404, with no errors
https://www.elastic.co/docs/solutions/observability/incident-management/create-manage-cases
shainaraskas commentedon May 20, 2026
the actual cause is that we are not doing redirect checks at the root of docs-content
being fixed in #3316
cotti commentedon May 26, 2026
Triage update — still reproducible on
main(xref hypothesis was a red herring)The "deleted page → no redirect" check does not read
toc.ymlor any incoming-link state. Replacing afile:entry with acrosslink:does not satisfy or suppress the redirect requirement.The actual bypass is a path-prefix bug in CI mode for repos where the docset lives at the repo root (e.g. elastic/docs-content):
When the docset is at the repo root,
LocalChangesServicepasseslookupPath = ".", which becomes"./". PR paths inDELETED_FILESlook likedeploy-manage/foo.md— they don't start with"./", so every entry is filtered out.ValidateRedirectssees zero deletions and exits cleanly. Local runs (LocalGitRepositoryTracker) use realgit diffand aren't affected by the prefix bug.Other relevant code
src/authoring/Elastic.Documentation.Refactor/Tracking/LocalChangesService.cslines 64–87redirects.yml→ success (Ensure diff validate returns no error if redirects.yml is not found #1940): same file, lines 29–33IsExcludedskip (Skip redirect validation for docset-excluded paths #3095): lines 75 areaactions/diff-validate/action.ymlExisting fix
A fix already exists on the unmerged branch
fix/diff-validate-docset-at-root(fc84db91,f6be1ea5,223d560c) with aNormalizeLookupPathand tests including the docs-content regression case (troubleshoot/deployments/serverless.md).Proposed plan
redirects.ymlpolicy: ifDELETED_FILEScontains.mddeletions andredirects.ymlis absent, fail with a clear diagnostic instead of returning success.LocalGitRepositoryTracker.GetCommitChanges(lines 58–62): emitRenamedGitChange, not bareGitChange, so authors see rename-without-redirect failures locally..md, no redirect, unrelatedcrosslink:added to nav.docs/contribute/redirects.mdclarifying that swappingfile:→crosslink:does not remove the need for a redirect for the old URL.Open questions
redirects.ymlbehavior from Ensure diff validate returns no error if redirects.yml is not found #1940 stay or revert? Lenient mode helps initial onboarding of a repo; strict mode prevents this exact bug class. A "strict if any deletions detected" middle-ground seems right but I'd like a maintainer call.AI-assisted analysis from current
main.github-actions commentedon Aug 28, 2026
This issue is stale because it has been open 90 days with no activity. Remove the
stalelabel, or leave a comment, or this will be closed in 14 days.shainaraskas commentedon Aug 28, 2026
still a bug