Repository navigation
Fix daily credit accounting for advisory Decisions failures - #74317
Conversation
Preserve known component usage when run-bound judge failure evidence qualifies for the existing failed-evaluations accounting policy. Skip steering issue creation for daily-credit-blocked runs. Add regression coverage and document the billing caveat. Co-authored-by: Copilot App <[email protected]>
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Design Decision Gate 🏗️Outcome: 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.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
There was a problem hiding this comment.
Review summary
No actionable blocking issues found in the changed lines. The Decisions failure fallback is identity-bound, preserves accounting precedence, and the steering issue condition is emitted after the guardrail step in the activation job. Specialist pass completed; its speculative concerns were not actionable from the diff.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved documentation issues leave the marker’s reason_code field unclear and normative steering-issue requirements inconsistent with the new guardrail exception.
2 open issues
What changed in this PR
Updates gh-aw’s daily credit guardrail to preserve recorded usage when verified advisory Decisions failures leave no evaluation accounting. This is the standalone accounting/steering alternative to #74292; evaluation state persistence is unchanged.
Changes:
- Accept strict run- and attempt-bound failure evidence under the existing zero-accounting policy, preserving usage precedence and fail-closed handling.
- Suppress steering issues when the credit guardrail blocks startup and regenerate 53 workflow locks.
- Add regression tests and document the fallback, steering behavior, and unverified provider-billing caveat.
| File | Description |
|---|---|
pkg/workflow/compiler_steering_issue.go |
Emit the credit-block condition for steering creation. |
pkg/workflow/compiler_steering_issue_test.go |
Cover enabled, disabled, and dry-run guardrails. |
docs/src/content/docs/specs/ai-credits-specification.md |
Specify advisory failure accounting and conformance coverage. |
docs/src/content/docs/reference/safe-outputs.md |
Document steering suppression on credit blocks. |
actions/setup/js/daily_aic_spec_conformance.test.cjs |
Test replacement of historical whole-run estimates. |
actions/setup/js/daily_aic_component_coverage.test.cjs |
Test failure evidence, identity checks, and usage precedence. |
actions/setup/js/daily_aic_component_coverage.cjs |
Recognize verified advisory Decisions failures. |
.github/workflows/weekly-safe-outputs-spec-review.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/weekly-editors-health-check.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/weekly-blog-post-writer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/update-astro.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/unbloat-docs.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/ubuntu-image-analyzer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/tidy.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/technical-doc-writer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/spec-extractor.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/spec-enforcer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/smoke-project.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/slide-deck-maintainer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/refiner.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/q.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/purelock.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/linter-miner.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/layout-spec-maintainer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/instructions-janitor.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/hourly-ci-cleaner.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/go-logger.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/glossary-maintainer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/github-mcp-tools-report.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/functional-pragmatist.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/evoskill-evolver.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/eslint-miner.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/dictation-prompt.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/developer-docs-consolidator.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/dependabot-burner.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/dead-code-remover.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-yamllint-fixer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-workflow-updater.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-trajectory-grader-implementer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-safeoutputs-git-simulator.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-safe-output-integrator.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-rendering-scripts-verifier.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-go-test-parallelizer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-elixir-credo-snippet-audit.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-documentation-diagram.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-doc-updater.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-doc-healer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-compiler-threat-spec-optimizer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-community-attribution.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-code-debt-aider.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-caveman-optimizer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-astrostylelite-markdown-spellcheck.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-architecture-diagram.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/daily-agent-of-the-day-blog-writer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/code-simplifier.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/code-scanning-fixer.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/cloclo.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/ci-coach.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/avenger.lock.yml |
Skip steering creation on credit blocks. |
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml |
Skip steering creation on credit blocks. |
Review effort: Max (auto)
|
|
||
| Set `steer: true` to create a run-scoped issue during the activation job, before the agent starts. Users can add comments containing the keyword `steer` while the run is in progress. The injected prompt identifies the exact issue and instructs the agent to read relevant user-authored comments with the GitHub MCP `issue_read` tool. | ||
|
|
||
| When the daily AI Credits guardrail blocks agent startup, no steering issue is created. Failure reporting uses its normal existing-issue deduplication instead. |
| | Explicit execution-not-started artifact | No selected accounting and version-1 component execution evidence matching run ID, job attempt, component, and `state: not_started` | | ||
| | Legacy failed Agent before accounting | Verified coverage, no selected accounting, failed conclusion, missing raw file, no execution-evidence file, and no inspected legacy Agent artifact | | ||
| | Failed Evaluations before accounting | Verified coverage, failed conclusion, and no selected accounting | | ||
| | Advisory Decisions failure before accounting | Verified coverage, successful job conclusion, no selected accounting, and `evals/evals_status.json` identifying the same run and selected job attempt with engine `decisions`, status `not_evaluated`, reason `judge_failed`, execution outcome `failure`, and execution state `started` | |
|
🎉 This pull request is included in a new release. Release: |

Why
Failed advisory Decisions requests can leave the Evaluations job successful while producing no response-usage file. The daily credit guardrail then replaces the entire historical run with a maximum-credit estimate, discarding available agent/detection usage and causing repeated startup blocks.
Changes
Scope and trade-offs
The zero-accounting fallback is an existing compatibility policy, not proof that the provider never charged the request. The runtime explicitly warns that provider billing remains unverified. Credit limits, models, endpoints, and credentials are unchanged; the upstream HTTP 400 cause is not resolved here.
This is the standalone accounting/steering alternative to the same changes included in #74292. It does not merge the evals state-persistence jobs; avoid merging both alternatives independently.
Validation
make fmtandmake lint-cjsgo test ./pkg/workflow -run 'SteeringIssue|ActivationSteering' -count=1make agent-report-progress, including impacted tests, lint, schema freshness, and 355-workflow compile/drift validation2f75c0ba8722feb021acd783db5c42341c9043d2, including all source and generated locks: PASS, no confirmed vulnerabilities or material coverage gapsNo workflows were dispatched and no live billing reconciliation is claimed.
Documentation review
Relates to #74243, #74198, #74175, #74237, and #74182.