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
Automated investigation against the current codebase. A human still needs to confirm before any code change.
Original concern
A PR in elastic/docs-content that renamed a .md file (with redirects correctly set up) still failed the "Comment on removed .md files / detect-removed-markdown" check.
Findings
The failing check was not a docs-builder (or docs-actions) check. It was a standalone workflow that lived in elastic/docs-content: .github/workflows/comment-on-removed-files.yml (job id detect-removed-markdown, display name "Comment on removed .md files"). It used actions/github-script to detect removed/renamed .md files and unconditionally post a PR comment.
Root cause of the failure: the workflow ran on: pull_request with permissions: pull-requests: write and called github.rest.issues.createComment. The triggering PR (docs-content#2136) was a fork PR (isCrossRepository: true). For pull_request events from forks, GITHUB_TOKEN is forced read-only regardless of the permissions: block, so createComment returns 403 Resource not accessible by integration and the job fails almost immediately (the observed ~3s failure). It had nothing to do with whether redirects were configured correctly. (The original run logs are expired — HTTP 410 — so the exact log line could not be re-confirmed, but the workflow shape + fork-PR token behavior account for it.)
The workflow has since been removed. It was deleted from docs-content in PR #2424 "Remove old workflow" (commit 4a7f923f, 2025-08-06), about two weeks after this issue was filed. The file now 404s on main. (It had been added in PR #1339, 2025-05-01.)
Redirect handling is now enforced properly rather than via an advisory comment. The shared docs-build pipeline runs a "Validate redirect rules" step (elastic/docs-actions/.github/workflows/docs-build.yml) backed by this repo's diff-validate action — actions/diff-validate/action.yml:L1-L9 — which invokes docs-builder diff validate.
That command verifies every renamed/removed page has a redirects.yml entry and fails the build otherwise: src/tooling/docs-builder/Commands/DiffCommands.cs:L22-L41.
Verdict
Done
The specific failing check can no longer occur: the workflow that produced it (comment-on-removed-files.yml in docs-content) was deleted in docs-content#2424. The flaky "comment unconditionally, fails on fork PRs" mechanism has been replaced by deterministic redirect validation in the docs-build pipeline (diff-validate → docs-builder diff validate), which checks redirects.yml for every removed/renamed page. Nothing remains to fix in docs-builder; a maintainer can close this as resolved.
Related issues
Part of the link-checks/redirects cluster: meta #949 (open), #1538 "Validate redirects.yml inputs" (open), and #759 "Force creation of redirects" (closed — the redirect-enforcement work that supersedes this issue's concern).
Notes
This issue was filed against docs-builder, but both the failing check and its removal live in elastic/docs-content. There is no corresponding code change in docs-builder to point to.
Activity
karenzone commentedon Jul 24, 2025
cc:/@colleenmcginnis
Remove old workflow (#2424)
cotti commentedon Jun 3, 2026
AI triage
Automated investigation against the current codebase. A human still needs to confirm before any code change.
Original concern
A PR in
elastic/docs-contentthat renamed a.mdfile (with redirects correctly set up) still failed the "Comment on removed .md files / detect-removed-markdown" check.Findings
docs-builder(ordocs-actions) check. It was a standalone workflow that lived inelastic/docs-content:.github/workflows/comment-on-removed-files.yml(job iddetect-removed-markdown, display name "Comment on removed .md files"). It usedactions/github-scriptto detect removed/renamed.mdfiles and unconditionally post a PR comment.on: pull_requestwithpermissions: pull-requests: writeand calledgithub.rest.issues.createComment. The triggering PR (docs-content#2136) was a fork PR (isCrossRepository: true). Forpull_requestevents from forks,GITHUB_TOKENis forced read-only regardless of thepermissions:block, socreateCommentreturns403 Resource not accessible by integrationand the job fails almost immediately (the observed ~3s failure). It had nothing to do with whether redirects were configured correctly. (The original run logs are expired — HTTP 410 — so the exact log line could not be re-confirmed, but the workflow shape + fork-PR token behavior account for it.)docs-contentin PR #2424 "Remove old workflow" (commit4a7f923f, 2025-08-06), about two weeks after this issue was filed. The file now 404s onmain. (It had been added in PR #1339, 2025-05-01.)docs-buildpipeline runs a "Validate redirect rules" step (elastic/docs-actions/.github/workflows/docs-build.yml) backed by this repo'sdiff-validateaction —actions/diff-validate/action.yml:L1-L9— which invokesdocs-builder diff validate.redirects.ymlentry and fails the build otherwise:src/tooling/docs-builder/Commands/DiffCommands.cs:L22-L41.Verdict
Done
The specific failing check can no longer occur: the workflow that produced it (
comment-on-removed-files.ymlindocs-content) was deleted in docs-content#2424. The flaky "comment unconditionally, fails on fork PRs" mechanism has been replaced by deterministic redirect validation in thedocs-buildpipeline (diff-validate→docs-builder diff validate), which checksredirects.ymlfor every removed/renamed page. Nothing remains to fix indocs-builder; a maintainer can close this as resolved.Related issues
Part of the link-checks/redirects cluster: meta #949 (open), #1538 "Validate redirects.yml inputs" (open), and #759 "Force creation of redirects" (closed — the redirect-enforcement work that supersedes this issue's concern).
Notes
docs-builder, but both the failing check and its removal live inelastic/docs-content. There is no corresponding code change indocs-builderto point to.github-actions commentedon Sep 15, 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.