Repository navigation
docs-quality-sweep: replace uses: orchestrator with gh workflow run master - #6271
Merged
Merged
Conversation
…n` master Refactors the docs-quality-sweep installation to work around [github/gh-aw#30338](github/gh-aw#30338) — the gh-aw compiler 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 a single run. As a result, all seven sub-workflows uploaded and downloaded the same `<prefix>-activation.zip` and `<prefix>-agent.zip`. Last activation won the race; every agent loaded the same prompt; three of the seven fix-issues from the first end-to-end run came back with frontmatter-audit findings regardless of which sweep ran them (#6266 / #6267 / #6268). Until upstream fixes that, dispatch each sweep as its own GH workflow run. New layout: - `docs-quality-sweep.yml` (master) — kept the user-facing name. Now triggers on `workflow_dispatch` and uses `gh workflow run` to dispatch each selected sub-workflow. Each sub-run is a separate GH Actions run, with its own `github.run_id` and `github.workflow`, so artifact names no longer collide. - `docs-{frontmatter,applies-to,openings,style,typos,staleness,coherence}-sweep.yml` (seven new files) — each is a thin trigger template that calls the corresponding `elastic/docs-actions/.github/workflows/gh-aw-docs-<name>-sweep.lock.yml@v1` via `workflow_call`. Identical to what the orchestrator job blocks used to do, except now they're independent dispatchable workflows. UX: - `gh workflow run docs-quality-sweep.yml -f sweeps=all` still works. It prints "→ dispatching docs-<name>-sweep.yml" for each selected sweep and exits in seconds. The sub-runs appear separately in the Actions tab. - `gh workflow run docs-quality-sweep.yml -f sweeps=frontmatter,typos` still filters. - Individual sub-workflows can also be dispatched directly without going through the master, e.g. for retrying just one sweep (`gh workflow run docs-style-sweep.yml`) without re-running everything. Permissions: the master needs `actions: write` to dispatch sibling workflows; sub-workflows keep `actions: read` and only need `issues: write` for fix-issue creation. `GITHUB_TOKEN` is sufficient to fan out via `gh workflow run` because `workflow_dispatch` is an explicit exception to the "GITHUB_TOKEN can't trigger workflows" rule (per GitHub Actions 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. |
3 tasks
theletterf
added a commit
that referenced
this pull request
May 5, 2026
## Summary The master dispatcher introduced in #6271 fails on the first `gh workflow run` invocation: \`\`\` → dispatching docs-frontmatter-sweep.yml failed to run git: fatal: not a git repository (or any of the parent directories): .git ##[error]Process completed with exit code 1. \`\`\` Failing run: https://github.com/elastic/docs-content/actions/runs/25373495676/job/74402614432 ## Cause `gh workflow run` resolves the target repository from the local git remote when no `--repo` flag is given. The master skips `actions/checkout` deliberately — it's a thin dispatcher that doesn't need the source tree — so there's no `.git` directory and the command exits 1 before doing anything. ## Fix Add `--repo "${{ github.repository }}"` to all four `gh workflow run` invocations (the `fire_with_default_inputs` helper plus the typos / staleness / coherence blocks). The runtime expression `${{ github.repository }}` resolves to `elastic/docs-content`, so gh CLI skips the local-remote inference entirely. Same effect as adding `actions/checkout@v6` to the step but cheaper — no clone, no filesystem I/O for what's a sub-second dispatch script. ## Test plan - [ ] Merge. - [ ] Dispatch `docs-quality-sweep.yml` with `sweeps=typos`. Expect: - master finishes in seconds with `→ dispatching docs-typos-sweep.yml` printed (no "fatal: not a git repository"); - a separate `Docs typos sweep` run appears in the Actions tab. - [ ] Dispatch with `sweeps=all`. Expect seven sub-runs in the Actions tab, each independent. 🤖 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
Refactors the docs-quality-sweep installation to work around github/gh-aw#30338.
The current orchestrator (merged via #6255) uses
workflow_callto fan out to seven gh-aw reusable workflows in parallel. gh-aw v0.71.x derives a single artifact prefix per orchestrator run fromgithub.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.zipand<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
docs-quality-sweep.yml(modified)workflow_dispatch. One job that usesgh workflow runto fire each selected sub-workflow. Exits in seconds.docs-frontmatter-sweep.yml(new)elastic/docs-actions/.github/workflows/gh-aw-docs-frontmatter-sweep.lock.yml@v1.docs-applies-to-sweep.yml(new)docs-openings-sweep.yml(new)docs-style-sweep.yml(new)docs-typos-sweep.yml(new)docs-staleness-sweep.yml(new)docs-coherence-sweep.yml(new)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=allstill works as the single dispatch point. The master prints `→ dispatching docs--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
The 8-file footprint is the only real regression and it's bounded — they're trigger templates, not maintained logic.
Test plan
Related
🤖 Generated with Claude Code