Repository navigation
Add docs-quality-sweep workflow - #6255
Merged
Merged
Conversation
Installs the seven-sweep orchestrator from elastic/docs-actions@v1 (release 1.15.2). Triggered manually via workflow_dispatch — runs all seven sweeps (frontmatter, applies-to, openings, style, typos, staleness, coherence) in parallel, or any subset via the `sweeps` input. The default `source-repo` is empty, so the sweeps audit this repo when run from here. Fix-issues are filed in this repo (calling repo) via the auto-provided GITHUB_TOKEN. Only `COPILOT_GITHUB_TOKEN` is needed (already configured here for the existing docs-issue-scope / docs-triage / docs-ai-menu installs). Companion install in elastic/docs-content-internal already exists (elastic/docs-content-internal#1136). That one runs the sweeps against this repo and files findings privately. This install runs the sweeps against this repo and files findings here, in public — useful when the team wants the audit + fix-issue trail visible to contributors. Pre-flight before first run: 1. The eight `docs-quality-sweep` and `docs-fix:*` labels need to exist in this repo. Created in a separate step. 2. `COPILOT_GITHUB_TOKEN` already configured. See agentic-workflows/docs-quality-sweep/README.md in elastic/docs-actions for full input docs. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
6 tasks
theletterf
added a commit
that referenced
this pull request
May 5, 2026
…n` master (#6271) ## Summary Refactors the docs-quality-sweep installation to work around [github/gh-aw#30338](github/gh-aw#30338). The current orchestrator (merged via #6255) uses `workflow_call` to fan out to seven gh-aw reusable workflows in parallel. gh-aw v0.71.x derives a single artifact prefix per orchestrator run from `github.workflow + github.run_id`, both of which are identical for every reusable workflow_call invocation in one run. Result: all seven sub-workflows upload and download the **same** `<prefix>-activation.zip` and `<prefix>-agent.zip`. Last activation wins the race; every agent loads the same prompt. Three of the seven fix-issues from the first run came back with frontmatter-audit findings regardless of which sweep was supposed to run (#6266 / #6267 / #6268). Until upstream lands a fix, this PR dispatches each sweep as its own independent workflow run. ## New layout | File | Role | |---|---| | `docs-quality-sweep.yml` (modified) | Master dispatcher. Triggers on `workflow_dispatch`. One job that uses `gh workflow run` to fire each selected sub-workflow. Exits in seconds. | | `docs-frontmatter-sweep.yml` (new) | Calls `elastic/docs-actions/.github/workflows/gh-aw-docs-frontmatter-sweep.lock.yml@v1`. | | `docs-applies-to-sweep.yml` (new) | Calls the applies-to reusable. | | `docs-openings-sweep.yml` (new) | Calls the openings reusable. | | `docs-style-sweep.yml` (new) | Calls the style reusable. | | `docs-typos-sweep.yml` (new) | Calls the typos reusable. | | `docs-staleness-sweep.yml` (new) | Calls the staleness reusable. | | `docs-coherence-sweep.yml` (new) | Calls the coherence reusable. | Each sub-workflow has its own \`github.workflow\` and its own \`github.run_id\`, so the artifact prefix gh-aw computes is now distinct per sweep — no collision. ## UX `gh workflow run docs-quality-sweep.yml -f sweeps=all` still works as the single dispatch point. The master prints \`→ dispatching docs-<name>-sweep.yml\` for each selected sweep and exits in a few seconds; the sub-runs appear separately in the Actions tab. Selective dispatch still works via the \`sweeps\` input: \`\`\`bash gh workflow run docs-quality-sweep.yml -f sweeps=frontmatter,typos \`\`\` Sub-workflows can also be dispatched directly without going through the master, e.g. for retrying just one sweep: \`\`\`bash gh workflow run docs-style-sweep.yml \`\`\` That wasn't possible with the previous \`workflow_call\` orchestrator. ## Why \`GITHUB_TOKEN\` is enough \`workflow_dispatch\` and \`repository_dispatch\` are explicit exceptions to the "GITHUB_TOKEN can't trigger workflows" rule (per the GitHub Actions docs). The master uses the auto-provided token; no PAT or App token needed. The master itself only needs \`actions: write\`; the sub-workflows retain \`actions: read\` + \`issues: write\` for fix-issue creation. ## Trade-offs vs. the old orchestrator | | old (\`uses:\`) | new (\`gh workflow run\`) | |---|---|---| | Single dispatch point | ✓ | ✓ | | Artifact-name isolation | ❌ collides (gh-aw#30338) | ✓ each sub-run independent | | Visible as one workflow run | ✓ | master + 7 separate sub-runs | | Per-sweep retry without re-running everything | ❌ | ✓ | | \`sweeps=…\` filter | ✓ | ✓ | | Number of files in this repo | 1 | 8 | The 8-file footprint is the only real regression and it's bounded — they're trigger templates, not maintained logic. ## Test plan - [ ] Merge this PR. - [ ] Dispatch \`docs-quality-sweep.yml\` with \`sweeps=typos\` (cheapest, no APM). Confirm the master run finishes in under a minute and a separate \`Docs typos sweep\` run appears in the Actions tab. - [ ] Confirm the new typos issue lands here (no longer capped at 20 — should reflect ~all codespell findings once docs-actions PR #132 ships). - [ ] Dispatch with \`sweeps=frontmatter,style\`. Confirm two separate sub-runs appear, each with distinct artifact names (\`<unique-prefix-A>-activation.zip\` for frontmatter, \`<unique-prefix-B>-activation.zip\` for style — verify in the agent step logs). - [ ] Confirm the resulting two fix-issues have **distinct** content — frontmatter findings in the frontmatter issue, style findings in the style issue. This is the regression we're trying to fix. - [ ] Once happy, dispatch with \`sweeps=all\` and confirm seven sub-runs each produce a category-correct fix-issue. ## Related - gh-aw issue: [github/gh-aw#30338](github/gh-aw#30338) - docs-actions PR adding the underlying sweep prompts: [elastic/docs-actions#132](elastic/docs-actions#132) (open) — improves the per-sweep output once the agent prompts are no longer cross-contaminating. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Installs the seven-sweep orchestrator from elastic/docs-actions@v1 (release 1.15.2). Triggered manually via
workflow_dispatch. Runs all seven sweeps in parallel by default, or any subset via thesweepsinput.Seven jobs run in parallel; each opens its own labeled fix-issue in this repo (or
noopif the slice is clean):frontmatterdocs-fix:frontmatterapplies-todocs-fix:applies-toapplies_tocorrectnessopeningsdocs-fix:openingsstyledocs-fix:styletyposdocs-fix:typosstalenessdocs-fix:stalenesscoherencedocs-fix:coherenceAll issues also carry the parent label
docs-quality-sweep. Each sweep auto-closes its prior fix-issue (close-older-issues: true).Where the issues land
Issues from this install are filed in this repo (public). A companion install in elastic/docs-content-internal#1136 runs the same sweeps against this repo's content but files its findings privately.
You'd typically use one or the other, not both — running both means each scan generates two parallel issues per finding. Possible setups:
typos,staleness); internal install runs the rest. Subset selectable viasweepsinput on each side.Worth deciding before merging.
Pre-flight (already done)
docs-quality-sweep,docs-fix:frontmatter,docs-fix:applies-to,docs-fix:openings,docs-fix:style,docs-fix:typos,docs-fix:staleness,docs-fix:coherence).COPILOT_GITHUB_TOKENalready configured for existing agentic workflows (docs-issue-scope, docs-triage, docs-ai-menu).Known upstream blocker
The four sweeps that import skills from
elastic/elastic-docs-skills(frontmatter,applies-to,openings,style) currently fail at the agent step's APM bundle unpack — see github/gh-aw#30252 (open, no fix yet). Affects gh-aw's own CI as well; we've added our repro in a comment there.The three deterministic / MCP-only sweeps (
typos,staleness,coherence) work today. So this PR is mergeable now and immediately useful for those three; the four APM ones will start working once #30252 is fixed upstream and a new gh-aw release lands.Test plan
sweeps=typosfirst — full-repo codespell scan, fast feedback. Confirm adocs-fix:typosissue lands here (ornoopif no findings).sweeps=typos,staleness,coherence— confirms the three working sweeps in parallel.sweeps=allafter #30252 is fixed and a new gh-aw release advancesv1. Confirm all seven sweeps land their fix-issues here.schedule:trigger.🤖 Generated with Claude Code