Skip to content

Commit a0c57d6

Browse files
committed
recalculate summary after filtering out the optimizer/audit workflows
1 parent 1909791 commit a0c57d6

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/agentic-token-optimizer.lock.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/agentic-token-optimizer.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,21 @@ steps:
9797
9898
BEFORE_COUNT=$(jq '(.runs // []) | length' /tmp/gh-aw/token-audit/all-runs.json)
9999
jq '
100-
.runs |= map(select(
101-
(.workflow_path // "") != ".github/workflows/agentic-token-optimizer.lock.yml"
102-
and (.workflow_path // "") != ".github/workflows/agentic-token-audit.lock.yml"
103-
and (.workflow_name // "") != "Agentic Workflow AIC Usage Optimizer"
104-
and (.workflow_name // "") != "Daily Agentic Workflow AIC Usage Audit"
105-
))
100+
(.runs // [])
101+
| map(select(
102+
(.workflow_path // "") != ".github/workflows/agentic-token-optimizer.lock.yml"
103+
and (.workflow_path // "") != ".github/workflows/agentic-token-audit.lock.yml"
104+
and (.workflow_name // "") != "Agentic Workflow AIC Usage Optimizer"
105+
and (.workflow_name // "") != "Daily Agentic Workflow AIC Usage Audit"
106+
)) as $runs
107+
| {
108+
summary: {
109+
total_runs: ($runs | length),
110+
total_tokens: ($runs | map(.token_usage // 0) | add // 0),
111+
total_aic: ($runs | map(.aic // 0) | add // 0)
112+
},
113+
runs: $runs
114+
}
106115
' /tmp/gh-aw/token-audit/all-runs.json > /tmp/gh-aw/token-audit/all-runs.filtered.json
107116
mv /tmp/gh-aw/token-audit/all-runs.filtered.json /tmp/gh-aw/token-audit/all-runs.json
108117
AFTER_COUNT=$(jq '(.runs // []) | length' /tmp/gh-aw/token-audit/all-runs.json)

0 commit comments

Comments
 (0)