Repository navigation
issue-triage: raise the turn budget to 40 and tell Claude it has no repo-inspection tools - #570
Merged
Merged
Conversation
…epo-inspection tools The auto-triage bot failed on issue 567 with error_max_turns — 16 turns, 8 permission denials, no labels added and no comment posted. The only prior external issue (2026-07-13, identical config and model) finished in 6 turns with 0 denials, so 15 was sized against a short bug report, not a 600-word design proposal. Root cause is the interaction between the checkout and the tool allow-list. The action needs a repo checkout for its own setup, so the full source tree sits on disk; a dense issue naming real internals (WriteTickFence, DagScheduler, a specific test) invites the model to open those files and verify the claims. But --allowedTools grants four gh prefixes and nothing else, so every such attempt is a denial that costs a turn, and the run starved before reaching its two writes. Nothing in the prompt said the repo was off-limits — absent tools are invisible unless you name them. Three changes. A TOOLING block names the denied tools (Read/Grep/Glob/Edit/Write/WebFetch) and states that verifying an issue's technical claims is the maintainer's job, not this first pass; it sits after SECURITY and before Step 1 so it lands before the model plans its approach. --max-turns goes 15 -> 40: the flag has no documented ceiling, and the 10-minute job timeout remains the real backstop (the failed run spent 54s on 16 turns). And `gh label list` is allow-listed as a read-only safety net — the prompt says the label set is fixed and needs no lookup, but if the model reaches for it anyway the call now succeeds instead of burning a turn. Inert until this reaches main: issues-triggered workflows always resolve from the default branch. Issue 567 itself remains untriaged; a rerun replays the workflow at the original SHA, so it needs a close/reopen or a manual pass afterwards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ULucAGYZ1sFyQd2soLXQbf
nockawa
added a commit
that referenced
this pull request
Jul 29, 2026
…ped, files issues [no-doc] [no-ut] Loïc's argument, which I initially pushed back on and was wrong to: 1. Nothing required the check and nothing blocked on it, so a PR could merge while the review was still running. The findings then landed on a closed PR nobody revisits - the per-PR TIMING bought nothing anyone could act on. 2. Reconciling docs is a different job from writing the feature, and the author is the worst reviewer of prose they wrote ten minutes ago and believe. My earlier objection - "post-merge it degrades into a corpus audit, which Layer 3 already does" - was only true of a WHOLE-CORPUS post-merge run. Scoped to yesterday's merges it keeps the diff-to-page association that is the only thing making Layer 2 worth more than an audit. That is the mistake; this commit fixes it. What changed: - doc-accuracy-review.yml is now nightly (05:00 UTC, an hour before the Monday Layer-3 audit so the weekly sweep dedups against whatever the nightly just filed). It lists the PRs merged in the last 25 h, resolves each one's affected doc pages, reviews them, and FILES [doc-drift] ISSUES rather than commenting on a merged PR. Every issue must carry "Introduced by: #N" - that attribution is precisely what a whole-corpus sweep cannot produce. - Fork PRs are no longer a special case. The old per-PR job had to skip them (no secrets, injection surface); a scheduled job cannot receive one, so fork-introduced drift is now covered like everything else instead of being deferred to Layer 3. - CONTRIB.md: [no-doc] is retired. It existed to break the fix -> re-review -> fix loop, which was a workaround for a cadence that was wrong to begin with. Harmless if anyone still writes it. Two things testing found before this could ship, both real: - Unioning the PRs' file lists resolved to 227 affected pages against a 329-file corpus - a whole-corpus sweep wearing a scoped costume, i.e. exactly what I had just argued against. Now resolved PER PR (measured on the same night: #598 -> 86 pages, #586 -> 226, #570 -> 0), which also keeps the "Introduced by" attribution honest since each page list has one PR behind it. - One big PR can alone resolve to ~230 pages, so a ten-PR night would exhaust the turn budget and produce a shallow skim of everything instead of a real review of something. Capped at the 5 most recent, with a ::warning:: and a line in the prompt naming the overflow - a silently truncated sweep reads exactly like a clean one, which is the failure mode this layer exists to avoid. The remainder falls to Layer 3. Also rejected, and recorded in the workflow header so it is not re-proposed: an opt-in [doc-review] token, and reviewing only when a draft PR is marked ready. Both fail UNSAFE when someone forgets - no review at all, or only commit 1 reviewed. Loïc made this argument against [doc-review] and it applies equally to the draft-based design I had already written. This one has nothing to remember. The scope step was extracted from the YAML and executed against the live repo end to end (PR listing, per-PR diff, docs-affected resolution, output gating) - heredoc-inside-block-scalar is where this class of workflow usually breaks. Layer 1 (scripts/check-doc-links.py, blocking, ~0.5 s) still runs on every push. Layer 3 (weekly whole-corpus) is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Gcg4vW8vJ4QjNyj6NQabHs
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.
What broke
The auto-triage bot silently failed on a new external issue (#567). No labels, no comment — the issue looks like the workflow never ran.
It did run. Run 30271954438 ended in:
It burned all 15 turns and never reached its two writes. Only one other external issue has ever triggered this workflow (2026-07-13) — identical config, identical model, 6 turns, 0 denials, success. So this isn't a regression; 15 was sized against a short bug report and doesn't survive a dense one.
Why
The action needs
actions/checkout@v4for its own setup, so the full source tree is on disk. #567 is a 600-word design proposal naming real internals —WriteTickFence,DagScheduler,UoW.Flush(), a specific test by name — which naturally invites the model to open those files and check the claims.But
--allowedToolsgrants fourghprefixes and nothing else. Every such attempt is a denial, and each denial costs a turn. Nothing in the prompt said the repo was off-limits: absent tools are invisible unless you name them.The 8 denied commands aren't individually visible — the action streams only
initandresultto the log, not tool events. The denial count, the checkout, and the issue's symbol density are the evidence; the specific commands are inference.Changes
TOOLINGblock in the prompt — names the denied tools (Read/Grep/Glob/Edit/Write/WebFetch) and states that verifying an issue's technical claims is the maintainer's job, not this first pass. Placed afterSECURITYand beforeStep 1, so it lands before the model plans its approach.--max-turns15 → 40 — the flag has no documented ceiling ("no limit by default"). The 10-minutetimeout-minutesstays the real backstop; the failed run spent 54 s on 16 turns, so 40 is ~2 min worst case.Bash(gh label list:*)allow-listed — a read-only API call, no extra blast radius. Layered with (1): the prompt says the label set is fixed and needs no lookup, but if the model reaches for it anyway the call succeeds instead of burning a turn.Security model — unchanged
No change to
permissions:, the scopedGITHUB_TOKEN, theauthor_associationgate, or the fourghwrite prefixes. The added tool is read-only. Worst case of a fully-hijacked run is still a wrong label or a stray comment.Notes
issues:-triggered workflows always resolve from the default branch, so this does nothing on a feature branch.gh run rerunreplays the workflow at the original SHA, so it would hit the same wall — it needs a close/reopen after merge, or a manual/triage-issuepass.merge-gate'spaths-filterscopes the heavy suites tosrc/Typhon.Engine/**,test/**andtools/Typhon.Workbench/**, so a workflow-only change doesn't trigger them. No[no-ut]token needed.🤖 Generated with Claude Code
https://claude.ai/code/session_01ULucAGYZ1sFyQd2soLXQbf