ci: auto-heal spec-sync PRs by regenerating the models#15
Conversation
Spec-sync PRs update the vendored spec but not the generated client, so the drift check fails on every one until someone regenerates by hand. This adds a workflow that regenerates on chore/sync-v2-spec-* branches and pushes the result back onto the PR, turning it green automatically. Requires a SPEC_SYNC_TOKEN secret (contents:write) so the push re-triggers CI; without it the job fails with a clear message and behavior is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 27 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Warning
|
What
Adds a
Sync spec auto-healworkflow that eliminates the manualgeneratestep on the automated spec-sync PRs.Why
The spec-sync automation opens a PR that updates only the vendored
spec/openapi.yaml, not the generated client. The drift check then fails on every sync PR until a maintainer checks out the branch, regenerates, and commits. This makes that automatic.How
chore/sync-v2-spec-*branches (ordinary PRs untouched).SPEC_SYNC_TOKENsecret (contents:write) instead of the defaultGITHUB_TOKEN, because aGITHUB_TOKENpush does not re-trigger required checks (GitHub's recursive-run guard). Workflow-level permissions staycontents: read.Setup required
Add a
SPEC_SYNC_TOKENrepo secret — a fine-grained PAT (or app token) withcontents:writeon this repo. Until it exists, the job fails fast with an actionable message and nothing else changes.Verified
Hygiene scanner + YAML parse pass. The regen command mirrors the drift check exactly (byte-for-byte), so it produces precisely what the check expects.
🤖 Generated with Claude Code