Repository navigation
fix(labels): per-issue audit scope, and an issues-disabled class that is not a failure - #319
Conversation
… is not a failure Closes #318 and #315. audit gains --issue owner/repo#N: it narrows to that repo and evaluates ONLY that number, so a form answer is applied by the SAME mapping the full audit uses. label-audit.yml gains an issues (opened, edited, reopened) trigger for it; the org-wide limit (the ruleset activates required workflows on pull_request events only) is stated in the workflow. api_error_class returns class 2 for "has disabled issues"; retire treats it as count=0 and names it ONCE per repo instead of "request failed" per label. Tests: two new arms (the single-issue scope; the issues-disabled property). *Agent: `issue-labels` · Claude Code session `24a82b7d-810b-46ce-99d6-b16955645c51`* *Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)*
Review — PASSHead SHA: Security screen: PASS Tool-limited (read-only, no re-run): Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
fix(labels): per-issue audit scope, and an issues-disabled class that is not a failure
Closes #318 and #315.
#318 — one issue at a time, one parser.
auditgains--issue owner/repo#N: it narrows therepo set to that repo, reads its issues, and evaluates ONLY that number — so a form answer is
applied by the SAME mapping the full audit uses (no second parser), one repo read instead of
446.
label-audit.ymlgains anissues: [opened, edited, reopened]trigger calling it, so anissue in THIS repo is labelled at creation under the same
LABELS_AUDIT_APPLYpolicy.The org-wide limit is now stated in the workflow: the org ruleset activates its required
workflow on pull_request events only, so an
issuestrigger in this repo cannot fire inother repositories. Org-wide the daily full-org audit remains the applier; this repo gets the
immediate path as its own first consumer.
#315 — "has disabled issues" is a property, not a failure.
api_error_classreturns a newclass
2forthe '<repo>' repository has disabled issues(a repository property, not an APIrefusal);
cmd_retiretreats it ascount=0and names it ONCE per repo instead of emittingrequest failedper retired label. Measured on the 2026-11-23 retirement: ninerequest failed: Qwen3-TTSwarnings for one issues-disabled repo, all unactionable.Tests (
scripts/labels-test.sh, now 24 arms):audit --issue opencharly/repo1#10 --applyapplies exactly the issue's form answer andtouches no other issue; a form-less issue is reported and applies nothing; a malformed
--issuedies.retire --dry-runexits 0, names the state ONCE, never printsrequest failed, and still plans the deletion.Head:
eb3009a45518bca1549893e61abbedd79254a54a.Diff: 4 files, 77 insertions, 7 deletions against
origin/main(c5b1a4b).How tested
Change class: code + config/script (one shell tool, its test, one workflow).
Live, against GitHub:
Both arms fail without the change:
--issueis an unknown flag (the audit dies), and anissues-disabled repo still prints
request failed(the negative assertion).Rulebook compliance
api_error_class.request failedpath for this state is removed.git statuswas clean before the work; no destructive action; PR-only.--issuerun is against real GitHub; the mock only covers the refusal classes.Change classification
Tooling + workflow; not breaking (a new optional flag, a new classifier class, a new trigger).
Rollback: revert this commit.
Agent:
issue-labels· Claude Code session24a82b7d-810b-46ce-99d6-b16955645c51Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)