[repository-quality] 🎯 Repository Quality Report: AIC Attribution Completeness & Token Weight Override Propagation (2026-06-23) #41033
Closed
Replies: 2 comments
-
|
Smoke bot tap wall. Me see latest cave post. Run 28035178551 done. Warning Firewall blocked 6 domainsThe following domains were blocked by the firewall during workflow execution:
network:
allowed:
- defaults
- "accounts.google.com"
- "android.clients.google.com"
- "clients2.google.com"
- "contentautofill.googleapis.com"
- "safebrowsingohttpgateway.googleapis.com"
- "www.google.com"See Network Configuration for more information.
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
This discussion was automatically closed because it expired on 2026-06-24T13:54:43.945Z.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
🎯 Repository Quality Improvement Report - AIC Attribution Completeness & Token Weight Override Propagation
Analysis Date: 2026-06-23
Focus Area: AIC Attribution Completeness & Token Weight Override Propagation
Strategy Type: Custom (random=12, 0–59 tier)
Custom Area: Yes —
engine.token-weightsis a core correctness surface for cost trust.Executive Summary
Analysis of the AIC attribution pipeline reveals three structural gaps producing silent cost mis-attribution. Most critically:
TokenClassWeights-only configurations are silently dropped bycompiler_yaml.go:953(gate checkslen(tw.Multipliers) > 0), and even whenTokenWeightsreachesaw_info.json,populateAIC()never reads or applies it. A third gap: 17/100 models inmodels.jsonfallback toinputprice for cache operations (over-estimates cost), and unrecognized models produce silent 0-AIC with no warning.Full Analysis Report
Current State Assessment
pkg/cli/data/models.jsoncomputeModelInferenceAICaccepts*TokenWeightspopulateAICappliesTokenWeightsfromaw_info.jsonKey Findings
Gap 1 — Compiler serialization gate (
compiler_yaml.go:953)Gap 2 —
populateAICblind toTokenWeights(token_usage.go:1097)Gap 3 — Silent 0-AIC for unknown models (
model_costs.go:181)🤖 Tasks for Copilot Agent
NOTE TO PLANNER AGENT: Split the following tasks into individual work items.
Improvement Tasks
Task 1: Fix compiler TokenClassWeights serialization gate
Priority: High Effort: Small
Code Region:
pkg/workflow/compiler_yaml.go:950-966Description: Change the emission condition from
len(tw.Multipliers) > 0tolen(tw.Multipliers) > 0 || tw.TokenClassWeights != nilso class-weight-only workflows getGH_AW_INFO_TOKEN_WEIGHTSemitted.Acceptance Criteria:
TokenClassWeights-only configs emit the env varTask 2: Wire TokenWeights into CLI AIC computation
Priority: High Effort: Medium
Code Region:
pkg/cli/model_costs.go:143-187,pkg/cli/token_usage.go:1097-1112Description: Add
weights *types.TokenWeightstocomputeModelInferenceCostUSDandpopulateAIC. ApplyTokenClassWeightsas per-class price overrides andMultipliersas a post-pricing scalar. LoadTokenWeightsfromaw_info.jsoninanalyzeTokenUsage.Acceptance Criteria:
computeModelInferenceCostUSDaccepts and applies*types.TokenWeightsTokenClassWeightsfields override pricing factorsMultiplierskey matching a model prefix scales the computed costpopulateAICreadsaw_info.jsonand passesTokenWeightsthroughTask 3: Emit warning when model pricing is unavailable
Priority: Medium Effort: Small
Code Region:
pkg/cli/token_usage.go:1097-1112(populateAIC)Description: After computing AIC, if token counts > 0 but AIC == 0, call
addTokenUsageWarningnaming the unknown model.Acceptance Criteria:
awfTokenWarningPrefixconvention when AIC=0 and tokens>0TestPopulateAIC_WarnsForUnknownModelasserts warning contains model nameTask 4: Complete cache pricing in models.json for 17 missing models
Priority: Medium Effort: Small
Code Region:
pkg/cli/data/models.jsonDescription: 17 models lack
cache_read/cache_writefields and fall back toinputprice. Add correct values from provider pricing pages, or explicit zeros for non-cacheable endpoints.Acceptance Criteria:
cache_readandcache_writefields or explicit"0"with commentTask 5: Add end-to-end TokenWeights attribution test
Priority: Low Effort: Medium
Code Region:
pkg/workflow/compiler_yaml_test.go,pkg/cli/model_costs_test.goDescription: No test exercises the full round-trip: frontmatter → compiler → env var → reparsed
TokenWeights→computeModelInferenceCostUSD. Add a table-driven test covering multiplier-only and class-weights-only cases.Acceptance Criteria:
//go:build !integration2.0produces exactly 2× baseline AICTokenClassWeights{Output: 8.0}scales output-token cost proportionallyCreate pkg/cli/token_weights_e2e_test.go (build tag !integration). Test: marshal types.TokenWeights{Multipliers: {"test-model": 3.0}}, unmarshal, call computeModelInferenceCostUSD with weights, assert result is 3x baseline. Second sub-test: TokenClassWeights{Output: 8.0} scales output proportionally. Add compiler test in compiler_yaml_test.go asserting GH_AW_INFO_TOKEN_WEIGHTS appears for class-weights-only workflow frontmatter.📊 Historical Context
Previous Focus Areas (last 10)
🎯 Recommendations
Immediate Actions (This Week)
TokenClassWeightscompiler gate — one-liner change — Priority: HighpopulateAIC— Priority: HighShort-term Actions (This Month)
TokenWeightsinto CLI AIC computation — Priority: Highmodels.json— Priority: MediumLong-term Actions (This Quarter)
TokenWeightsattribution test — Priority: Low📈 Success Metrics
TokenClassWeights-only configs emitting env var: 0% → 100%TokenWeights: 0% → 100%Next Steps
References:
Beta Was this translation helpful? Give feedback.
All reactions