Skip to content

[meta] Link checks & Redirects #949

Open
5 of 7 issues completed
Open

Description

@bmorelli25

Related issues

RFC

In progress here.

Sub-issues

Sub-issues

5 of 7 Issues completed
Loading 7 sub-issues

Activity

  1. cotti commented on May 7, 2025

    @cotti
    Contributor

    Product-specific redirect discussion has been moved to a new RFC here

  2. changed the title [-][meta] Redirect strategy[/-] [+][meta] Link checks & Redirects[/+] on Jul 11, 2025
  3. KOTungseth commented on May 14, 2026

    @KOTungseth
    Contributor

    @cotti where did we leave off with this?

  4. cotti commented on Jun 3, 2026

    @cotti
    Contributor

    AI triage

    Automated investigation against the current codebase. A human still needs to confirm before any code change.

    Original concern

    Umbrella tracker for the link-checking and redirects effort in docs-builder — covering cross-repo redirects, forced redirect creation on page moves/deletes, anchor-level redirects, and product/API link validation.

    Findings

    Of the seven sub-items this meta tracks, four have shipped and three remain open. Evidence in the current tree:

    • Cross-repo redirects ([Feature Request]: Allow redirects across repos #847, closed) — shipped. src/Elastic.Documentation.Links/CrossLinks/CrossLinkResolver.cs:L197-L240 (FinalizeRedirect) resolves redirect targets that point at another repository's scheme, validating the target exists in that repo's links.json. Landed in PR #1227 (commit 1fa284a1, 2025-06-02).
    • Anchor-level redirects ([Feature Request]: A way to redirect from one page to another just for specific anchors #670, closed) — shipped. src/Elastic.Documentation.Configuration/Builder/RedirectFile.cs:L91-L168 parses per-anchor (anchors:) and many: sub-rules; CrossLinkResolver.cs:L146-L195 (ResolveRedirect) maps individual anchors (incl. the catch-all !). Same PR #1227. Authoring tests: tests/authoring/Inline/CrossLinkRedirectAnchors.fs, tests/authoring/Inline/CrossLinksRedirects.fs.
    • Forced redirect creation ([Feature Request]: Force creation of redirects #759, closed) — shipped. src/authoring/Elastic.Documentation.Refactor/Tracking/LocalChangesService.cs:L23-L96 (ValidateRedirects) walks git-deleted/renamed .md files and errors if any lacks a redirects.yml entry; exposed as the docs-builder diff command in src/tooling/docs-builder/Commands/DiffCommands.cs:L22-L41. Landed in PR #1340 ("Redirect health check", commit 469c8258, 2025-06-16).
    • Product/Kibana link checking (Add support for Kibana link checking #123, closed) — capability exists. src/Elastic.Documentation.Links/InboundLinks/LinkIndexLinkChecker.cs:L36-L111 validates inbound cross-links by repository (CheckRepository(from,to)) and against a locally built links.json (CheckWithLocalLinksJson); surfaced via src/tooling/docs-builder/Commands/InboundLinkCommands.cs:L29-L66 (inbound-links validate). The issue was closed 2026-01-28 without an obviously-attributable merge commit, so I can't cite a single closing PR — the validation machinery is in LinkIndexService.
    • Runtime redirect delivery — shipped. src/services/Elastic.Documentation.Assembler/Deploying/DeployUpdateRedirectsService.cs:L19-L49 pushes the assembled redirect map into the CloudFront KeyValueStore, so authored redirects actually serve.
    • Still open: API-docs link checking (#974), product-URL removal checking ([Feature Request]: Add error-checking for removal of files/URLs used by product #736), and absolute-URL/forced-docs-link handling (Improve handling of absolute URL path references in docs #1181) have no implementation backing them in the tree.

    Verdict

    Partially done

    The core redirect and link-validation infrastructure listed in this tracker is built and tested: cross-repo + anchor redirects (PR #1227), the forced-redirect "diff" health check (PR #1340), inbound/product link validation (LinkIndexService), and CloudFront redirect deployment. Three of the seven tracked sub-issues remain open (#736, elastic/docs-eng-team#997, #1181), the RFC referenced in the body is still in progress, and the thread's last question ("where did we leave off?") confirms the umbrella needs an owner to re-scope rather than a code fix. As a meta tracker this is the expected mixed state — the right next action is stakeholder coordination on what remains in scope, not a single PR.

    Proposal

    Remaining workstreams, grouped by who needs to weigh in:

    Suggested housekeeping (for a human to confirm, not done here): update the checklist in the issue body to mark #847/#759/#670/#123 done and link the PRs above, so the tracker reflects reality.

    Related issues

    Open members of this link/redirect cluster beyond the tracked sub-items: #1920 (xref evades deleted-page check), #1538 (validate redirects.yml inputs), #1609 (detect-removed-markdown check), #45 (canonical URLs). Tracked sub-items still open: #736, elastic/docs-eng-team#997, #1181 (open); #847, #759, #670, #123 (closed). A maintainer may want a cluster:redirects label across these to plan a coherent close-out.

    Notes

  5. added
    ai-triaged
    ai:eng-question
    ai:product-question
    ai:writer-question
    on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ai-triagedai:eng-questionai:product-questionai:writer-question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions