Skip to content

docs(#6735): define cost data contract for runtime-reported inference cost - #6736

Merged
ascerra merged 1 commit into
mainfrom
agent/6735-cost-data-contract-docs
Aug 29, 2026
Merged

docs(#6735): define cost data contract for runtime-reported inference cost#6736
ascerra merged 1 commit into
mainfrom
agent/6735-cost-data-contract-docs

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

Summary

Adds a "Cost data contract" section to the tracing reference documenting how fullsend sources, aggregates, rounds, and displays runtime-reported inference cost. Expands the total_cost_usd field description in the CLI reference and adds cross-references from the Getting Started runtime-selection guide.

Related Issue

Addresses the documentation gap described in #6735 — operators had no public definition of how inference cost flows from each runtime through aggregation to the various output surfaces.

Changes

  • Tracing reference (docs/guides/infrastructure/distributed-tracing.md): new "Cost data contract" section covering runtime cost extraction (per-runtime source fields), cross-iteration aggregation formula, rounding and precision by surface (metrics.json, OTel spans, console, status comments), no-fallback behavior, and distinction from backend-derived estimates (e.g. MLflow). Updated fullsend.cost_usd attribute description to cross-reference the new section. Added CLI reference link to "See also."
  • CLI reference (docs/cli/run.md): expanded total_cost_usd description to note it is the runtime-reported raw aggregate with no pricing-table fallback, with a link to the cost data contract.
  • Getting Started (docs/guides/getting-started/choosing-a-runtime.md): added a cross-reference from the status comment bullet in "Where to see what ran" to the cost data contract.

Testing

  • scan-secrets passed on all changed files and staged content
  • lint-docs-links passed (no links escape the repo root)
  • lychee offline link check passed (32 total, 0 errors)
  • Trailing whitespace, end-of-file, merge conflict checks passed
  • gitlint passed on commit message

Note: npm run docs:build could not run due to sandbox network restrictions on git submodules. Manual verification of the VitePress build is recommended.

Checklist

  • PR title follows Conventional Commits (correct type, ! for breaking changes)
  • Commits are signed off (DCO) — human and human-directed agent sessions only
  • I wrote this contribution myself and can explain all changes in it

Closes #6735

Post-script verification

  • Branch is not main/master (agent/6735-cost-data-contract-docs)
  • Secret scan passed (gitleaks — 6bdc0fd748ee717986e37432a14018b6d661a8ec..HEAD)
  • PR body secret scan passed (gitleaks — no-git)

… cost

Add a "Cost data contract" section to the tracing reference that
documents how fullsend sources, aggregates, rounds, and displays
runtime-reported inference cost. The new section covers:

- Per-runtime cost extraction (Claude Code reads result.total_cost_usd,
  pi sums usage.cost.total, OpenCode sums step_finish.part.cost)
- Cross-iteration aggregation (raw sum across completed iterations)
- Rounding and precision by surface (full float in metrics.json,
  rounded to cents on OTel spans, four decimals on console, two
  decimals in status comments)
- No pricing-table fallback when a runtime reports zero
- Distinction from backend-derived estimates (e.g. MLflow)

Expand the total_cost_usd description in the CLI reference (docs/cli/run.md)
to note it is the runtime-reported raw aggregate with no fallback, and
cross-reference the new section. Add a cross-reference from the
Getting Started runtime-selection page so operators can discover the
cost contract from the "Where to see what ran" list.

Closes #6735
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner August 28, 2026 16:05
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Aug 28, 2026
@fullsend-ai-review

fullsend-ai-review Bot commented Aug 28, 2026

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 4:07 PM UTC · Completed 4:24 PM UTC

Commit: 6725503 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $5.32

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://d51403d5-site.fullsend-ai.workers.dev

Commit: 67255034f9bcf29102a7ae7637ee5b0fab0936ec

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-review fullsend-ai-review Bot added the risk/low PR risk: low label Aug 28, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: low (1/5)

Details

Documentation-only PR by bot addressing a well-scoped, triaged issue (#6735) with three files and 84 lines of additive changes defining the cost data contract — no protected paths, no security-sensitive files, no dependency changes, minimal churn, and all acceptance criteria met.

@fullsend-ai-review

Copy link
Copy Markdown

Looks good to me

@fullsend-ai-review fullsend-ai-review Bot added the ready-for-merge All reviewers approved — ready to merge label Aug 28, 2026
@ascerra
ascerra added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit a9fb388 Aug 29, 2026
78 of 79 checks passed
@ascerra
ascerra deleted the agent/6735-cost-data-contract-docs branch August 29, 2026 17:48
@fullsend-ai-retro

fullsend-ai-retro Bot commented Aug 29, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 5:49 PM UTC · Completed 6:06 PM UTC

Commit: 6725503 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.26

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #6736 — docs(#6735): define cost data contract for runtime-reported inference cost

Workflow quality: Clean execution, zero rework

This was a well-executed end-to-end automated workflow with no rework cycles.

Timeline:

  • 15:49 UTC (Aug 28) — Human (ascerra) filed issue #6735 with a detailed technical specification for the cost data contract documentation.
  • 15:49–15:55Triage agent ran (~6 min, $0.82). Applied labels (documentation, component/docs, component/runner, priority/medium, ready-to-code) and posted a structured triage summary.
  • 15:55–16:05Code agent ran (~10 min, $3.55). Created PR #6736 with changes across 3 files (+84/−3 lines).
  • 16:05–16:24Review agent ran (~19 min, $5.32). Assessed risk as low (1/5) and approved with zero findings.
  • 12:02 UTC (Aug 29) — Human reviewer (ralphbean) approved with no comments (~20 hours after review agent).
  • 17:48 UTC (Aug 29) — PR merged, closing issue docs: define how runtime-reported inference cost is aggregated and traced #6735.

Total agent cost: $9.69 | Total automated pipeline time: ~35 minutes | Time to merge: ~26 hours

Key observations

Code agent executed well on a detailed spec. The issue body contained the complete technical specification — runtime extraction behavior, aggregation formulas, rounding rules, precision by surface. The code agent translated this into well-structured documentation in one shot. This demonstrates the value of detailed issue specifications for zero-rework outcomes.

Review agent produced no findings, consistent with human review. Both the agent (opus, high effort) and the human reviewer approved without requesting changes or posting inline comments. The review agent's risk assessment (low, 1/5) was appropriate for a docs-only PR.

Code agent could not verify docs build locally. The PR description notes: "npm run docs:build could not run due to sandbox network restrictions on git submodules." The CI Build Site check passed, so no rework was needed, but local verification was skipped.

Evidence for existing issues

No new proposals

All identified improvement areas are covered by existing open issues. The workflow executed cleanly with zero rework, appropriate agent decisions, and correct final outcome.

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

Labels

ready-for-merge All reviewers approved — ready to merge ready-for-review Triggers review agent dispatch risk/low PR risk: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: define how runtime-reported inference cost is aggregated and traced

2 participants