fix(instructions-janitor): pin model, bound git history, add early exit to reduce 40% failure rate - #48990
Merged
pelikhan merged 2 commits intoJul 29, 2026
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Reduce failure rate and wasted retries in Instructions Janitor
fix(instructions-janitor): pin model, bound git history, add early exit to reduce 40% failure rate
Jul 29, 2026
pelikhan
marked this pull request as ready for review
July 29, 2026 22:21
Contributor
There was a problem hiding this comment.
Pull request overview
Pins the Instructions Janitor model and reduces unnecessary audit work.
Changes:
- Pins
claude-sonnet-5. - Adds bounded history inspection commands.
- Adds an early no-op exit.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/instructions-janitor.md |
Updates model and audit instructions. |
.github/workflows/instructions-janitor.lock.yml |
Regenerates the compiled workflow. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Medium
|
|
||
| ## Edge Cases | ||
|
|
||
| - if the Release/Change audit finds no relevant docs or `.github/aw/` changes **and** the Size audit confirms all files are under their limits, exit immediately without running the Duplication or Accuracy audits |
| ``` | ||
| - if there are relevant changes, run one batched diff to review all affected content at once: | ||
| ```bash | ||
| git diff <release-tag>..HEAD -- docs/ .github/aw/ |
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.
The Instructions Janitor workflow had a 40% failure rate over the last 10 runs: 3 runs crashed due to unpriced model routing and 1 timed out after 20 minutes with zero output.
Changes
Pin model to
claude-sonnet-5Three failures hit
API Error: 400 Model "claude-opus-5" has no AI credits pricing. The bareengine: claudewith no explicit model was being opportunistically routed onto an unpriced model, triggering 3 retries per failure and burning tokens with no artifact.Bound git-history exploration
The most recent run timed out at 20 min while chaining unbounded
git log, per-commitgit show --stat, and repeatedgit log --sincecalls. The Release/Change audit now specifies:git log --since=<date> --name-onlypassgit diff <tag>..HEAD -- docs/ .github/aw/Two new bash allowlist entries (
git diff *..HEAD -- docs/ .github/aw/andgit show --stat *) support this pattern.Early no-op short-circuit
The no-op exit was only reachable after all four audits completed. A new Edge Case allows exiting immediately after the Release/Change + Size audits when no relevant changes exist and all files are within limits, skipping the Duplication and Accuracy passes.