Repository navigation
Description
Problem
A workflow's activation job can inspect recent runs for the rolling 24-hour max-daily-ai-credits guardrail but fail to retrieve their usage/accounting artifacts. When usage is unknown, gh-aw conservatively assumes the per-run maximum (for example, assumedAIC: 1000). Repeated assumptions can produce a guardrail message such as Daily workflow AIC guardrail exceeded ...: 6000/5100 and prevent the agent job from starting, even when there may have been no model-assisted work in some of those prior runs.
In the customer-reported case, activation inspected nine previous runs but did not list their usage records, and emitted repeated warnings that accounting sources had failed and 1,000 AIC was being assumed. The final exceeded total therefore appeared to be a measured usage figure, although it included conservative estimates. This makes it difficult to understand why activation blocked the run, whether artifact retrieval failed transiently or due to permissions/retention, and whether the displayed total reflects measured or assumed usage. The guardrail total should not be interpreted as provider billing; billing reconciliation remains with the provider.
Expected behavior
Keep the conservative guardrail behavior when usage is genuinely unknown, but distinguish measured AIC from assumed AIC. If a run's agent job never starts or is skipped and job metadata confirms that no AI-powered jobs ran, that run's AIC usage must be treated as zero—not as the assumed per-run maximum. The AIC total should also make missing evidence understandable enough for an operator to diagnose the cause.
Potential solution
Improve activation accounting to use run/job metadata to confirm when no AI-powered job ran; assign zero AIC in that case even if no usage artifact exists. For other inspected runs, report whether usage was measured or assumed because accounting evidence could not be read. Include actionable failure context for artifact discovery/download (such as the underlying API/permission/retention failure where available), and summarize measured, confirmed-zero, and assumed contributions separately in the exceeded-guardrail output. Consider retrying transient artifact/API failures within the activation time budget. Do not treat a missing artifact as zero when job information cannot confirm that no AI-powered jobs ran.
Customer impact
Operators may see a rolling daily AIC limit block a run before its agent job starts, while the reported total is dominated by assumed values and the logs do not clearly explain why usage artifacts were unavailable. In particular, a run whose agent never ran should not inflate later rolling totals. Better accounting and diagnostics would make the guardrail actionable without weakening its protection against genuinely unknown usage.
Activity