Archetype Metadata
archetype: workflow
evidence_tier: idea
linked_policy:
- docs/maintainer_values.md
- docs/dev/agents/relocated-agents-guidance.md
Goal / Problem
Make the autonomous issue audit quota-aware when GitHub core REST capacity is exhausted. On
2026-09-02, the bounded command below returned a partial plan with 208 open issues but exited
fail-closed after the first closed-PR request and many issue-timeline requests hit HTTP 403 core API
rate limits. The artifact correctly withheld label mutations, but the audit spent its budget on
per-issue historical coverage and did not produce a useful complete queue result.
Observed command:
uv run python scripts/dev/issue_audit_core.py plan --mode autonomous --include-comments \
--max-closed-pr-pages 50 --max-wall-seconds 420 --output <artifact>.json
Observed artifact: output/issue_audit_plan-20260902-after-8298.json at
origin/main=31704e5a110e77298390bc53d3f70077991d9d67.
Scope
- Add a quota-aware preflight and bounded fallback/skip path for closed-PR and issue-timeline
enrichment.
- Preserve explicit
inventory_uncertainties/incomplete coverage and fail-closed mutation behavior
when the required inventory cannot be read.
- Add deterministic tests for exhausted, low, and recovered core quota responses, including the
stable exit/report contract.
- Document the retry boundary or reset-aware next action in the audit output.
Out of scope: bypassing GitHub rate limits, mutating issue labels from incomplete evidence, changing
issue classification policy, or treating a partial audit as complete queue evidence.
Inputs
scripts/dev/issue_audit_core.py and its existing inventory helpers.
scripts/dev/github_quota.py and the repository GitHub transport policy.
- Existing issue-audit and GitHub transport tests.
- GitHub core-rate-limit response fields and reset timestamp when available.
Definition of Done
Success Metrics
- No audit run spends unbounded requests on historical enrichment after core capacity is known to be
unavailable.
- Partial inventory is never reported as complete or used to promote an issue.
- The next retry time/reason is visible in the JSON artifact and concise CLI output.
Validation / Testing
- Run the focused issue-audit and GitHub-quota test modules with
uv run pytest.
- Exercise the audit command with a mocked exhausted-core response and inspect the JSON schema.
- Run Ruff, format,
git diff --check, and PR_READY_MODE=final in a fresh linked worktree.
Risk / Rollback
The change is workflow-control-plane code. The primary risk is suppressing useful enrichment too
early; retain a conservative fallback that keeps ordinary audit behavior when quota is healthy.
Rollback is a single commit revert. No scientific, benchmark, model, or paper-facing claim is made.
Related Work
Project Metadata
- Priority: triage required.
- Effort (h): 4.
- Reviewed: no.
Archetype Metadata
Goal / Problem
Make the autonomous issue audit quota-aware when GitHub core REST capacity is exhausted. On
2026-09-02, the bounded command below returned a partial plan with 208 open issues but exited
fail-closed after the first closed-PR request and many issue-timeline requests hit HTTP 403 core API
rate limits. The artifact correctly withheld label mutations, but the audit spent its budget on
per-issue historical coverage and did not produce a useful complete queue result.
Observed command:
Observed artifact:
output/issue_audit_plan-20260902-after-8298.jsonatorigin/main=31704e5a110e77298390bc53d3f70077991d9d67.Scope
enrichment.
inventory_uncertainties/incomplete coverage and fail-closed mutation behaviorwhen the required inventory cannot be read.
stable exit/report contract.
Out of scope: bypassing GitHub rate limits, mutating issue labels from incomplete evidence, changing
issue classification policy, or treating a partial audit as complete queue evidence.
Inputs
scripts/dev/issue_audit_core.pyand its existing inventory helpers.scripts/dev/github_quota.pyand the repository GitHub transport policy.Definition of Done
requests under the configured budget.
reset-aware next action and zero unsafe mutations.
later run.
label write is planned from incomplete evidence.
Success Metrics
unavailable.
Validation / Testing
uv run pytest.git diff --check, andPR_READY_MODE=finalin a fresh linked worktree.Risk / Rollback
The change is workflow-control-plane code. The primary risk is suppressing useful enrichment too
early; retain a conservative fallback that keeps ordinary audit behavior when quota is healthy.
Rollback is a single commit revert. No scientific, benchmark, model, or paper-facing claim is made.
Related Work
during current closed-PR/timeline enrichment.
Project Metadata