Repository navigation
Copilot engine 429 on every PR push, and a post-merge docs and index pattern: how to wire this in v0.91.8? #68922
Replies: 1 comment
|
The 429 is a new Copilot engine start on every
Split the jobs:
name: docs-updater-gate
on:
pull_request:
types: [closed]
permissions:
contents: write
jobs:
dispatch:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.body, '## Resolution')
runs-on: ubuntu-latest
steps:
- env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -sS -X POST \
-H "Authorization: Bearer ${GH_TOKEN}" \
-H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches" \
-d "{\"event_type\":\"docs-update\",\"client_payload\":{\"pr_number\":${{ github.event.pull_request.number }}}}"Use the heading the coding session already writes. on:
repository_dispatch:
types: [docs-update]The prompt should read For the indexes, do not push to
From the self-hosted index job, use a fine-grained PAT or a GitHub App token with contents and pull requests write. Push branch Stop the loop on the index workflow: on:
push:
branches: [main]
paths-ignore:
- 'indexes/**'
- 'system-map/**'Merging the index PR only touches those paths, so it does not build again. A docs PR that edits wiki pages still does. On the label gate: a label applied with |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context. All our coding is done by Claude Code: the CLI on our own self-hosted Linux server, the desktop app, and Claude Code cloud and Projects sessions. Those sessions open the issues and PRs in our GitHub repo, and a GitHub Project board tracks them. The repo is a markdown wiki plus the scripts that run our operations, and GitHub is the single source of truth that every machine only pulls from. What we're trying to build is an agentic process-management loop: every PR carries a docs tag and a resolution written by the Claude session that made the change, and after the PR merges, a gh-aw workflow picks that up and keeps the documentation, search indexes and system map current, so the upkeep happens after PRs without anyone running it by hand. We use gh-aw (Copilot engine) for that after-PR step, and a self-hosted runner on the same server for the deterministic parts.
We run gh-aw v0.91.8 with
engine: copilot(Copilot Pro, a user PAT) on a private repo that is a markdown wiki plus scripts. We want change management to run with nobody touching it, and we are stuck in a few places. Any pointers to the intended pattern would help.The goal, in one line
A post-merge process documents every change. A Claude Code session makes the change and writes in the PR what it changed and why, with a docs tag. After the PR merges, a gh-aw workflow reads that tag and resolution and does the upkeep with no person involved: it updates or creates the right wiki page (or decides nothing is needed, or flags it), then the search indexes and the system map are rebuilt on GitHub and committed, and every machine just pulls the result.
What "done" looks like:
Who is working on it
We have assigned a team of Claude Code Projects sessions to take on this plan and start the approach. We are open to all help: answers to the questions below, a pointer to an existing pattern, an example repo, or a better way to reach this goal than the one we drew. Thank you.
Setup today
docs-updater.mdruns onpull_request(opened, synchronize, reopened, ready_for_review). A deterministicdocs_scancustom job on a self-hosted runner labels the PRdocs: needed,docs: no pageordocs: ok. When needed, the Copilot agent (onubuntu-latest) writes or updates wiki pages and pushes them into the PR via safe outputs, with threat detection on.docs-auditor.mdruns daily and files doc issues.pr-checks.ymlon the self-hosted runner is the required check (checks) in a ruleset on the default branch. Auto-merge is currently turned off by us until this works end to end.Where we are stuck
429 Too Many Requestson every harness attempt (isCAPIQuotaExceededError=false); a re-run 7 minutes later also got 429. The fix for copilot_harness: "Failed to get response from the AI model … Last error: 429 Too Many Requests" misclassified as partial_execution → retries with --continue until timeout #53554 is in v0.91.8, but our logs still show retry attempts 1 to 4, so our message may be a different form. What is the recommended way to run the agent once per PR instead of per push:label_command, droppingsynchronize, oruser-rate-limit?GITHUB_TOKENcannot bypass it, and a PAT push re-triggers workflows. Is "open a PR with a PAT and auto-merge it" the recommended route, or is there a gh-aw-native way?docs: updated,docs: newordocs: retired) is present. Labels set byGITHUB_TOKENdo not re-firechecks. What is the clean way to make the required check fail closed until the docs label is final?What does what
claude-code-actionon@claudepr-checks.ymlon a self-hosted runner, rulesetchecks: changelog, page lint, docs gatedocs-updater.md(scan job self-hosted, agent onubuntu-latest),docs-auditor.mddailyThe flow we are aiming for
graph TD O1[Issue opened<br>by a coding session or a workflow] --> T[Issue template<br>tag, resolution, page<br>not built] T --> P7[Project board auto-add] P7 --> A[Coding session makes the change] A --> PR[PR: Closes #n + docs tag + resolution<br>fields not built] PR --> B[Required check: needs tag and resolution<br>not built] B --> C[Auto-merge<br>off today] C --> CL[Issue closes via Closes #n] C --> D[gh-aw docs agent, Copilot engine<br>reads tag and resolution, runs on its own time] D --> E[BM25 search over committed index] E --> F{Match?} F -->|moderate| G[Copy or patch into page] F -->|high + overwrite| H[Replace page] F -->|none / new item| X[New page + tag] F -->|no action| I[docs: ok] F -->|conflict| J[Flag: new issue] X --> G G --> K[Docs PR merges] H --> K K --> R[After-merge build: indexes + map<br>committed to default branch<br>not built] R --> M[Default branch] M --> S1[Server pulls] M --> S2[Cloud clones] M --> S3[Desktop pulls]Thanks for any guidance, especially on 1 and 3.
All reactions