Skip to content

Handle GitHub API quota exhaustion in daily-AIC accounting, run-info metadata and AWF detection setup - #76583

Merged
SivaKesava1 merged 8 commits into
mainfrom
copilot/handle-api-quota-exhaustion
Nov 11, 2026
Merged

SivaKesava1 merged 8 commits into
mainfrom
copilot/handle-api-quota-exhaustion

Conversation

Copilot AI commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

ADR: docs/adr/76583-handle-github-api-quota-exhaustion.md

When the shared GitHub REST quota runs out (HTTP 403/429 with remaining=0 or Retry-After), three setup steps currently crash with generic errors. Two are in activation (daily-AIC restore/accounting and "Generate agentic run info"). The third is detection's AWF install, where the failing call is gh attestation verify, not the asset download. With this PR, each of these waits until the server's own reset when that fits a bounded budget. Otherwise it stops with an explicit "GitHub API quota exhausted" outcome. AIC enforcement, release attestation and fail-closed detection are not bypassed.

The incident evidence and hourly consumer measurements are in the issue. Schedule, frequency and credential-attribution follow-ups are out of scope here.

Shared JS helper: actions/setup/js/github_api_quota.cjs

  • getGitHubAPIQuotaExhaustion(error): returns quota metadata only when remaining=0 or Retry-After is present. It returns null for 401s, permission 403s, reserve stops (remaining>0) and header-less secondary limits, which keep their existing handling.
  • withGitHubAPIQuotaWait(op, { maxWaitMs = 10min }): waits once until the later of reset and Retry-After (+1s), then retries once. The deadline comes from the failed response, so there is no early retry and no cap that shortens it. Blocked reasons are unknown_reset, reset_exceeds_budget, renewed_exhaustion and wait_ended_before_reset.
  • writeGitHubAPIQuotaSummary: writes a resource / limit / remaining / used / reset table.

Daily-AIC restore and accounting (activation)

  • The existing 10-minute, original-attempt-only recovery is unchanged.
  • When restore can't recover, it no longer throws. It writes the summary, exports GH_AW_DAILY_AIC_QUOTA_BLOCKED, and sets github_api_quota_blocked=true.
  • The guardrail reads that env before creating any API client and reports daily_ai_credits_guardrail_status=quota_blocked. exceeded stays false, total stays empty (never a false zero), and setFailed is not called. A quota error from the guardrail's own calls gets the same mapping.
  • Compiler: the agent job and "Create steering issue" now also require guardrail_status != 'quota_blocked'. This clause is added only in enforce mode, so continue-on-error warn mode stays fail-open.
    if: needs.activation.outputs.daily_ai_credits_exceeded != 'true' &&
        needs.activation.outputs.daily_ai_credits_guardrail_status != 'quota_blocked'
  • quota_blocked is added to the unified-session type and the regenerated schema.

Run-info metadata (activation)

  • markdown_metadata.cjs first reads <sha>:<lock path> from the local git object database. The read uses git --no-replace-objects cat-file blob, GIT_NO_LAZY_FETCH=1 and a ceiling dir, and never falls back to the worktree file. This makes zero Contents API calls when the exact executing revision is present.
  • The remote read is wrapped in withGitHubAPIQuotaWait. The existing bounded retries now exclude quota errors.
  • On an unrecovered quota error, generate_aw_info writes the summary and fails activation with ERR_SYSTEM: GitHub API quota exhausted; activation blocked until at least <reset>. There is no empty-manifest fallback.

AWF install in detection (release_integrity.sh, install_awf_binary.sh)

  • verify_release_attestation makes up to three verify attempts. A failure only counts as quota exhaustion if the gh output mentions a rate limit and an extra probe request (gh api --include to the same endpoint with the same token) returns 403/429 with remaining=0 or Retry-After. This extra call is needed because gh doesn't expose response headers. Any other failure keeps its original exit status.
  • Within GH_AW_GITHUB_API_QUOTA_MAX_WAIT_SECONDS (default 300, cumulative across the installer; the detection job has a 10-minute timeout), it sleeps until the reset and verifies again.
  • Otherwise it exits 75. Before exiting it writes the summary and appends GH_AW_GITHUB_API_QUOTA_BLOCKED=resource=…; limit=…; remaining=…; used=…; reset=…; reason=… to GITHUB_ENV. Nothing is installed, and a failed bundle verification never falls back to the platform binary.
  • Checksum pins, digest checks, release identity and the signer-workflow/issuer policy are unchanged.
  • release_integrity.sh is SHA-pinned by the TLA+ workflows, so their pins (shared/tla-plus.md, daily-work-queue-formal-verification.md) are updated.

Detection gating and reporting

  • The external-detector AWF install step gets id: detection_awf_install. Execution now also requires steps.detection_awf_install.outcome == 'success', so a missing or unverified AWF binary is never run.
  • conclude_threat_detection.sh checks AWF_INSTALL_OUTCOME before the threat-detect install outcome, because a failed AWF install skips that later step and its outcome would hide the real cause.
    • Quota blocked: reason=github_api_quota_exhausted and conclusion=failure, even in warn mode. The summary says this is not a security pass.
    • Any other failure: the existing detector-unavailable path.
  • The detection job still fails, so safe_outputs stays gated while agent artifacts are kept. A new conclusion step, "Report quota-blocked threat detection", adds the outcome to the final summary without any API calls.
  • The new reason is recognized in threat_detection_warning.cjs (not a tooling failure, so warn mode can't downgrade it), handle_detection_runs.cjs (detection_deferred), the usage-summary allow-list and the CLI audit parser.

Review notes

  • The conclusion job doesn't react to activation's quota_blocked, because it would need the same exhausted quota. That outcome shows in the activation summary, warnings and outputs instead.
  • The inline (non-feature-flag) detection path only gets the installer behaviour; the step-level gating applies to the external-detector path.
  • Not yet done: the quota_blocked wording in ai-credits-specification.md, a CodeQL run and make agent-finish.

Copilot AI and others added 2 commits November 10, 2026 19:19
…d run-info metadata

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
…d detection

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
Copilot AI changed the title [WIP] Handle shared GitHub API quota exhaustion in activation and AWF detection setup Handle GitHub API quota exhaustion in daily-AIC accounting, run-info metadata and AWF detection setup Nov 10, 2026
Copilot AI requested a review from SivaKesava1 November 10, 2026 19:45
@SivaKesava1
SivaKesava1 marked this pull request as ready for review November 10, 2026 20:20
Copilot AI dynamic review requested due to automatic review settings November 10, 2026 20:20
@github-actions

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

Generated by PR Specification Reviewer for #76583

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: haiku55 xhigh · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

This comment has been minimized.

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · routed: gpt61 medium · ~9 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 181 · ◷

Generated by Ponytail Reviewer for #76583

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed PR head 21a95212535c342226ac35ed570c3d0d49c53e99 against AI Credits Specification v1.5.2, §§9.13–9.14 and T-AIC-DG-022.

Blocking finding: the intentional quota_blocked guardrail result changes the normative contract: it leaves totals empty, sets daily_ai_credits_exceeded=false, and avoids core.setFailed, whereas the current specification requires quota/reserve stops to report transient_error and call core.setFailed while blocking startup. The implementation preserves fail-closed startup, but the observable status and failure semantics are undocumented.

Please synchronize docs/src/content/docs/specs/ai-credits-specification.md (version/change log and a conformance test covering quota_blocked, empty accounting outputs, exceeded=false, no core.setFailed, and startup gating), while retaining the prohibition on treating it as under_budget. An inline comment with the requirement and evidence was added. No other applicable normative specification changes were identified; generated files and tests were reviewed as evidence only, not executed.

Generated by PR Specification Reviewer for #76583 · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR makes significant changes to core business logic (238 new lines in business logic directories, above the 100-line threshold) but does not have a linked Architecture Decision Record (ADR).

📄 Draft ADR committed: docs/adr/76583-handle-github-api-quota-exhaustion.md. Review and complete it before merging.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR. It was generated from the PR description, the new github_api_quota.cjs helper, and the changed-file list. The decision and alternatives are inferred and should be confirmed.

  2. Complete the open points: the Deciders field (marked [TODO: verify]), the alternatives you actually considered, and the trade-off where warn mode leaves the AIC guardrail fail-open during quota exhaustion.

  3. Reference the ADR in this PR body, for example:

    ADR: ADR-76583: Bounded Wait and Explicit Blocked Outcome for GitHub API Quota Exhaustion (link unavailable: invalid HTTPS URL)

Once an ADR is linked in the PR body, this gate re-runs and verifies that the implementation matches the decision.

📋 Michael Nygard ADR Format Reference

An ADR must contain four sections: Context, Decision, Alternatives Considered, and Consequences. ADR filenames use the PR number as a prefix, matching existing files in docs/adr/.

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 8.5K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one blocking correctness issue: quota-deferred threat detection always exits non-zero, overriding the configured warn-mode behavior. The inline comment explains the impact and required fix.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~10 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Quota-exhaustion handling remains incomplete: retries can skip an allowed reset wait, compaction can discard blocked outcomes, audits obscure the cause, and downstream API steps can turn a handled block into an activation failure.

4 open issues
What changed in this PR

This PR adds explicit GitHub API quota-exhaustion handling to gh-aw’s activation and threat-detection setup, addressing #76581 while preserving AIC enforcement and required release verification.

Changes:

  • Propagates quota-blocked accounting outcomes through activation gates, session types, and schemas.
  • Reports run-info and detection quota failures explicitly, and requires verified AWF installation before external detection executes.
  • Updates outcome consumers, tests, generated workflows, golden fixtures, and TLA+ integrity pins.
File Description
pkg/​workflow/​threat_detection_isolation_test.go Tests AWF installation gating.
pkg/​workflow/​threat_detection_external.go Gates execution and passes AWF outcomes.
pkg/​workflow/​threat_detection_engine_env_test.go Tests quota-blocked conclusion reporting.
pkg/​workflow/​testdata/​TestWasmGolden_CompileFixtures/​with-imports.golden Updates expected quota gate.
pkg/​workflow/​testdata/​TestWasmGolden_CompileFixtures/​playwright-cli-mode.golden Updates expected quota gate.
pkg/​workflow/​testdata/​TestWasmGolden_CompileFixtures/​basic-copilot.golden Updates expected quota gate.
pkg/​workflow/​testdata/​TestWasmGolden_AllEngines/​pi.golden Updates expected agent condition.
pkg/​workflow/​testdata/​TestWasmGolden_AllEngines/​gemini.golden Updates expected agent condition.
pkg/​workflow/​testdata/​TestWasmGolden_AllEngines/​copilot.golden Updates expected agent condition.
pkg/​workflow/​testdata/​TestWasmGolden_AllEngines/​codex.golden Updates expected agent condition.
pkg/​workflow/​testdata/​TestWasmGolden_AllEngines/​claude.golden Updates expected agent condition.
pkg/​workflow/​notify_comment_conclusion_helpers.go Adds API-free quota-blocked summary.
pkg/​workflow/​daily_aic_workflow_guardrail_test.go Tests quota-blocked agent suppression.
pkg/​workflow/​compiler_steering_issue.go Suppresses steering creation when quota-blocked.
pkg/​workflow/​compiler_steering_issue_test.go Tests steering quota condition.
pkg/​workflow/​compiler_main_job_helpers.go Adds enforce-mode quota gate.
pkg/​workflow/​compiler_main_job_helpers_test.go Tests enforce and warn conditions.
pkg/​cli/​audit_threat_detection_logs.go Accepts the detection quota reason.
docs/​public/​schemas/​unified-session.schema.json Adds quota_blocked status.
actions/​setup/​sh/​install_awf_binary.sh Preserves quota exit status without fallback.
actions/​setup/​sh/​conclude_threat_detection.sh Reports AWF quota failures explicitly.
actions/​setup/​js/​unified_session.cjs Collects quota-blocked accounting status.
actions/​setup/​js/​types/​unified_session.d.ts Extends daily-AIC status type.
actions/​setup/​js/​threat_detection_warning.test.cjs Tests quota warning semantics.
actions/​setup/​js/​threat_detection_warning.cjs Describes quota-deferred detection.
actions/​setup/​js/​restore_aic_scan_cache.cjs Exports handled quota-blocked outcomes.
actions/​setup/​js/​handle_detection_runs.test.cjs Tests deferred-detection classification.
actions/​setup/​js/​handle_detection_runs.cjs Classifies quota exhaustion as deferred.
actions/​setup/​js/​generate_usage_activity_summary.cjs Preserves the detection quota reason.
actions/​setup/​js/​generate_aw_info.cjs Reports quota-blocked metadata failures.
actions/​setup/​js/​daily_aic_spec_conformance.test.cjs Updates quota outcome expectations.
actions/​setup/​js/​daily_aic_api_budget.cjs Exposes the restore quota marker.
.github/​workflows/​workflow-generator.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​windows.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​video-analyzer.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​typist.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​super-linter.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​static-analysis-report.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​squad.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​squad-plan.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​spec-librarian.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​smoke-workflow-call.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-workflow-call-with-inputs.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-work-queue.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-work-queue-worker.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-work-queue-dispatcher.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-update-cross-repo-pr.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-test-tools.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-temporary-id.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-service-ports.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-repo-memory-ledger.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-pydantic.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-project.lock.yml Gates steering and agent; adds summary.
.github/​workflows/​smoke-pi.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-pi-sub-agents.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-pi-routed.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-pi-routed-claude.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-pi-auto.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-otel-backends.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-opencode.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-multi-pr.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-kiro.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-goose.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-github-codex.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-factory.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-drive.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-deepseek-harness.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-cursor.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-crush.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-create-cross-repo-pr.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-sub-agents.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-small.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-sdk.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-sdk-routed.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-sdk-routed-claude.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-routed-steering.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-routed-claude.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-mai.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-dynamic-workflow.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-auto.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-arm.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-aoai-entra.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-copilot-aoai-apikey.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-codex.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-codex-routed.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-codex-routed-openai.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-codex-bare-auto.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-codex-auto.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-claude.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-claude-sub-agents.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-claude-routed.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-claude-routed-anthropic.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-claude-copilot.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-claude-copilot-auto.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-claude-auto.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-ci.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-checkout-pr-dispatch.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-call-workflow.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-builtin-ledgers.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-azure-pi.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-azure-codex.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-atomic.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-aider.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-agy.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​smoke-agent-scoped-approved.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-agent-public-none.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-agent-public-approved.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-agent-all-none.lock.yml Updates agent gate and quota summary.
.github/​workflows/​smoke-agent-all-merged.lock.yml Updates agent gate and quota summary.
.github/​workflows/​skillet.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​shared/​tla-plus.md Refreshes release-integrity checksum pin.
.github/​workflows/​sergo.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​security-review.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​security-compliance.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​scout.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​research.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​release.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​pr-sous-chef.lock.yml Adds AWF gate and quota reporting.
.github/​workflows/​pr-finisher.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​plan.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​pdf-summary.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​org-health-report.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​notion-issue-summary.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​mergefest.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​jsweep.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​hippo-embed.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​gpclean.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​firewall.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​example-permissions-warning.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-pydantic-ai.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-pi.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-opencode.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-mini-swe-agent.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-kiro.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-goose.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-gemini.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-factory.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-deepseek-harness.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-cursor.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-crush.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-copilot.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-codex.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-claude.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-atomic.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-aider.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​engine-conformance-agy.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​dev.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​delight.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​daily-work-queue-formal-verification.md Refreshes release-integrity checksum pin.
.github/​workflows/​daily-max-ai-credits-test.lock.yml Adds AWF gate and quota reporting.
.github/​workflows/​daily-malicious-code-scan.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​daily-harness-experiment-proposer.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​daily-github-docs-seo-optimizer.lock.yml Updates agent gate and quota summary.
.github/​workflows/​craft.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​codex-github-remote-mcp-test.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​bot-detection.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​archie.lock.yml Regenerates quota gates and reporting.
.github/​workflows/​ai-moderator.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​agy-conformance-reusable.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​agentic-token-optimizer.lock.yml Adds quota-blocked agent gate.
.github/​workflows/​ace-editor.lock.yml Adds quota-blocked agent gate.

Review effort: Max (auto)

Comment thread actions/setup/js/unified_session.cjs Resolved
Comment thread actions/setup/sh/release_integrity.sh Resolved
Comment thread pkg/cli/audit_threat_detection_logs.go Resolved
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/check_daily_aic_workflow_guardrail.cjs:705): address unresolved feedback - Review comment
  3. Review (actions/setup/sh/conclude_threat_detection.sh:66): address unresolved feedback - Review comment

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "11bf8ce6371c8c7b3c3050b9c3a7713452bbaf27",
  "kind": "requested",
  "schema_version": "1",
  "state": "a580aae0e12b2f87d7a23559d7fb29ade4b364f55e89cc3de467a458fc98dfb0",
  "work": [
    "84dbcb36ef80b7d3d9c5df01b6e5d828cf4c3bd79b5d5a01fed7e5c5e186e971",
    "bb8f76cbc05cc4aa5018f59f216325f5405326242c042ceaf910fadd2512ad2d"
  ],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~3 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits November 10, 2026 21:13
…ota-exhaustion

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI requested a review from gh-aw-bot November 10, 2026 21:37
@SivaKesava1
SivaKesava1 dismissed stale reviews from github-actions[bot] and github-actions[bot] November 10, 2026 21:42

Addressed in 21326bc: the AI Credits specification is now v1.5.3 with quota_blocked semantics and conformance tests, and quota-deferred detection follows GH_AW_DETECTION_CONTINUE_ON_ERROR (warning and exit 0 in warn mode, failure in enforce mode).

Co-authored-by: SivaKesava1 <11771739+SivaKesava1@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Category: bug | Risk: high | Score: 82 (impact 42 + urgency 25 + quality 15) | Action: fast_track | Batch: pr-batch:eligible-copilot

Generated by 🔧 PR Triage Agent · copilot · mai11 · ~5 AIC · ⌖ ~1 AIC · ⊞ 14.9K · ◷

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.

Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering.

Structured data
{
  "completed_task": 0,
  "head": "61e3cb3a732e5da7e046eedce1e2efe8b4d0c038",
  "kind": "requested",
  "schema_version": "1",
  "state": "72820ea29fb9d6d33637863a665ec38b49f763783faef207de2bc37e57ee71d0",
  "work": [],
  "workflow": "pr-sous-chef"
}

Generated by 👨🍳 PR Sous Chef · pi · routed: haiku55 xhigh · ~2 AIC · ⌖ ~2 AIC · ⊞ 6.9K · ◷
Comment /souschef to run again

…ota-exhaustion

# Conflicts:
#	.github/workflows/daily-formal-spec-verifier.lock.yml

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor Author

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged the latest main in 2479ea5; build and workflow recompilation succeeded.

@copilot

🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:...

Merged the latest main in 2479ea5. The two linked review items were already implemented in 21326bc and their threads are resolved. The targeted timed-out test passed on rerun; the final gate still reports two custom Go-linter findings in pkg/cli/audit_threat_detection.go, and CodeQL timed out.

@SivaKesava1

Copy link
Copy Markdown
Collaborator

Verification for #76581 at 2479ea5 (after the review rounds):

  • Review findings: both bot reviews were fixed in 21326bc: AI Credits spec v1.5.3 documents quota_blocked, and quota-deferred detection follows GH_AW_DETECTION_CONTINUE_ON_ERROR. All four Copilot review findings were fixed in 61e3cb3: the attempt-2 wait, the audit label, gating activation API steps in enforce mode, and compaction. All threads are resolved; the ADR is linked in the body.
  • Tests (run locally in WSL at the PR head): install_awf_binary_test.sh 29/29; JS compact_unified_session, github_api_quota, check_daily_aic_workflow_guardrail and restore_aic_scan_cache 110/110; pkg/cli audit and threat-detection tests pass; pkg/workflow daily-AIC, guardrail, activation, threat-detection and Wasm golden tests pass except TestConcludeThreatDetectionScript_ThreatKinds, which fails the same way on main (dd77f72).
  • Scope: 365 locks are recompiled for the new activation and detection steps. The two .md workflow edits only update the pinned SHA-256 of the changed release_integrity.sh. No schedule, API-usage or routing changes.
  • Known limits (documented in the ADR): a full 300 s attestation wait leaves about 5 minutes of the 10-minute detection job. On quota_blocked in enforce mode the conclusion job doesn't run, so the reason appears only in the activation summary.

@pelikhan ready for your review.

@SivaKesava1
SivaKesava1 requested a review from pelikhan November 11, 2026 02:13
@SivaKesava1
SivaKesava1 merged commit 7fb0168 into main Nov 11, 2026
106 checks passed
@SivaKesava1
SivaKesava1 deleted the copilot/handle-api-quota-exhaustion branch November 11, 2026 05:48
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle shared GitHub API quota exhaustion in activation and AWF detection setup

4 participants