You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Daily AIC guardrail counts every run of a reusable workflow as 0 AIC #74864
When a compiled workflow is called through workflow_call, the daily AIC guardrail counts each of its past runs as 0 AIC. max-daily-ai-credits never trips, however much the workflow spends.
Reproduction (gh-aw v1.0.1)
.github/workflows/hello.md, compiled with gh aw compile hello:
---
on:
workflow_call:
engine: claudepermissions:
contents: read
---
Say hi.
The jobs of the first run are named caller / pre_activation, caller / activation, caller / agent, caller / safe_outputs and caller / conclusion.
Analysis
componentKey() in actions/setup/js/daily_aic_component_coverage.cjs matches job.name exactly against agent, detection and evals. GitHub prefixes the jobs of a called workflow with the caller's job name, so the agent job is named caller / agent. No job matches, loadBillableJobs() returns no components, and getRunAIC() returns 0.
The usage artifact is found correctly: matchesGuardrailArtifactName() already accepts prefixed artifact names. Only the job match fails. The same code is on main.
Suggested fix
In componentKey(), also match the segment after the last / in the job name.
Acceptance criteria
In daily_aic_component_coverage.test.cjs, jobs named caller / agent and caller / detection are counted as agent and detection.
Jobs nested more than one level, such as outer / caller / agent, are counted as agent.
Jobs named agent, detection and evals are counted as before.
Activity