Skip to content

fix(effective-cost): numerator = cost-tier estimate (smoke catch)#67

Merged
Ryfter merged 1 commit into
masterfrom
effective-cost-cost-fix
Jun 22, 2026
Merged

fix(effective-cost): numerator = cost-tier estimate (smoke catch)#67
Ryfter merged 1 commit into
masterfrom
effective-cost-cost-fix

Conversation

@Ryfter

@Ryfter Ryfter commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Deployed-script smoke on the slice-1 merge surfaced cost: 0.0 in production: the numerator was sourced from $tspend (realized spend), which is hardcoded 0.0 in Invoke-TaskViaFleet today — so the metric would read 0 for every real run. Sourced it from $est (the cost-tier estimate, the same value the budget guard uses), matching the record's basis='estimate' label. T87/T88 pin cost == 0.05 (paid estimate) and non-zero effective_cost through the full Invoke-Conductor path.

🤖 Generated with Claude Code

…lder spend

Live-smoke catch: $tspend is realized spend, hardcoded 0.0 in dispatch today, so
the run-level effective cost read 0 in production. Source the numerator from $est
(the cost-tier estimate the budget guard uses), matching the basis='estimate' label.
T87/T88 pin it through the full Invoke-Conductor path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 22, 2026 23:49
@Ryfter
Ryfter merged commit e265619 into master Jun 22, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the effective-cost metric’s numerator to use the per-task cost-tier estimate (consistent with cost_basis='estimate' and the budget guard), instead of the stubbed realized spend (spend=0.0) currently returned by Invoke-TaskViaFleet, which caused cost/effective_cost to be zero in production.

Changes:

  • Switch Invoke-Conductor’s effective-cost task-cost accumulation from $tspend to $est (tier estimate).
  • Add end-to-end PowerShell tests covering the full Invoke-Conductor path to ensure cost == 0.05 for a paid task and that effective_cost is non-zero.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/conductor-lib.ps1 Uses cost-tier estimate ($est) as the effective-cost numerator input instead of placeholder realized spend.
scripts/test-conductor-lib.ps1 Adds full-path tests (T87/T88) to catch regressions where effective cost would incorrectly compute as zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants