Repository navigation
docs: add costs-and-checks.md, one home for the run summary and the measured costs - #298
Merged
Merged
Conversation
…easured costs Replaces docs/run-metrics.md. Adds sizing a run with preview, estimating cost from its characters, comparing run records with jq, and a dated summary of the model comparison in chartula-evals. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No
goldbarth
added a commit
that referenced
this pull request
Sep 30, 2026
…n stops (#299) Follows #298, which added `docs/costs-and-checks.md`, the page this one takes the diagnosis sections from. - **Why:** the messages a run stops with were spread over `cli.md`, `github.md`, `configuration.md`, `what-goes-into-a-release.md` and `run-metrics.md`, each explained where its topic lives, but nothing let a user start from the message. `docs/troubleshooting.md` is that entry: message, cause, fix, with a link to the page that explains more. - **It opens with `chartula doctor`,** which finds most of the setup and range situations before anything is spent, and says which ones it cannot find (a spent rate limit, a first tag, everything that only shows once the model writes a whole release). - **The situations:** no model key; GitHub cannot read the repository (404); a rejected token (401); a token that cannot publish, which stops `generate` before its first model call (#285); the rate limit, with and without a token; a configuration error; a shallow clone; a first tag without a terminal; a failed model call by status (404, 401 with and without a key, 403), an unreachable endpoint, and an answer the SDK cannot read, kept apart from an unreachable one (#288); an answer that does not match the facts; an answer cut off at `maxOutputTokens`; a context window too small; a thorough check that verified nothing; a slow run, read from the progress lines (#297) and the run summary. - **Every message is from a real run of the built binary,** in a scratch repository, with GitHub and the model served by a local stub (a mode per case: 404, 401, rate limit with `x-ratelimit-remaining: 0`, 403 with `x-accepted-github-permissions`, model 404/401, an unknown `finish_reason`, a reported prompt of 120 tokens, prose instead of a verdict, a cut answer, a 4 s delay per call). Paths are anonymized to `/work/my-repo`, the stub's address to `https://api.github.com/` and `http://localhost:11434/v1`. The line after `The endpoint said:` came from the stub, so the page shows it as `...` and says its wording depends on the provider. The slow run's summary is the real local run from the chartula-evals sweep already used in #298. - **One home per explanation:** a message appears here and, where it has one, on the page that explains its topic; the explanation itself stays there and is linked. From `cli.md`, the status-by-status account of a failed model call and the missing-key example move here and are replaced by links. From `costs-and-checks.md`, the three diagnosis sections (slow run, unreadable check, cut prompt) move here; the summary page keeps a short list of the lines that point to a problem, each linking its section. - **A message corrected on the way:** the warning without a GitHub token said a run spends "roughly one [request] per pull request". It spends one per commit in the range, as `docs/github.md` says, so a release merged with merge commits was underestimated. The class comment also still claimed that an exhausted limit fails with a 403 naming a commit; the run names the rate limit (`GitHubErrorResponse.cs`). Both are corrected in `GitHubTokenNotice.cs`. - **README:** Troubleshooting joins the "Setting it up" index; `getting-started.md` links it under "Next". **Verified:** - Every case ran with the binary built from this branch; the outputs match the page, and the corrected no-token warning was rerun after the fix. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). - `dotnet build -c Release` without warnings, `dotnet format --verify-no-changes` clean. Tests: full suite passing (920), no test changed; no test asserts the warning's wording. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No --- _Generated by [Claude Code](https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No)_ Co-authored-by: Claude <[email protected]>
goldbarth
added a commit
that referenced
this pull request
Oct 1, 2026
) Follows #298, which explained the `lower bound` line of the run summary from its wording in `RunReportFormatter.cs` only. - **Why:** every other line of the summary on `costs-and-checks.md` is shown as a run prints it; `lower bound` was described but never shown, so a reader could not recognize it in their own output. - **Shown where the other unusual lines are,** under "Lines that point to a problem", after the thorough check without calls: what the line means, an output block from a real run, and what to do with such a run. - **The block is from an endpoint that reports no usage at all,** the case where the summary says least: every count is zero and all four calls are unreported. The sentence after it says the summary is then no measure of the cost, names the provider's usage page instead, and links `callsWithoutUsage` in the run record. **Verified:** - The block is from `generate --no-publish` with the binary from `main`, against a scratch repository and local GitHub and model stubs on 127.0.0.1, the model stub answering without a `usage` object: two renderings and two thorough checks, `lower bound, 4 of 4 calls unreported`. - Every relative link and anchor in all Markdown files of the repository resolves (script, with a negative test). Tests: none, documentation only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follows #292, which made
previewfree and shows the calls and prompt charactersgeneratewould send.docs/run-metrics.md, the measured costs in chartula-evals and in pieces ofproviders.md, and nothing said how to size a run before paying for it.docs/costs-and-checks.mdis the one home for all of it: the run summary, both checks, whether the thorough check earns its tokens, estimating cost, comparing run records, and a dated summary of the model comparison.previewshows, and turns its prompt characters into a token estimate (characters / 4, doubled with the thorough check). The divisor rests on the bound inCallValidity.cs, and the page checks it against a real case: 90,489 characters of prompt for ServiceDeskLitev1.9.0, against 21,293 rephrasing tokens in the run of 2026-09-25.chartula.logfiles of the ServiceDeskLite sweep in chartula-evals (preview.3; the summary code for that case is unchanged since then). Thepreviewoutput was run on 2026-09-30 withmainon the same range. The twojqcommands ran against three run records of that sweep. Paths anonymized to/work/my-repo.lower boundline has no real run to quote, since no provider in the sweep left usage unreported. The page gives its wording fromRunReportFormatter.csin the table instead of inventing an output block.title-onlyand the local models, fromsweeps/servicedesklite-v1.9.0-evaluation.mdand-stats/report.md, with the evaluation's own limits (three runs per cell, one release, a flag count says nothing about text quality) and links to the report and the charts. No prices: the page gives the formula and links the price lists. The Anthropic comparison runs are named as pending.run-metrics.mdis deleted and every link to it points to the new page (README,chartula.example.yaml,cli.md,configuration.md,run-record.md,what-goes-into-a-release.md,architecture.md).providers.mdkeeps its model notes and recommendations in two sentences and links here for the figures; the local-model details and the 62%/4× figures moved here. The one remaining figure there (about 11,000 tokens per call) links its source.thinking: disabled, check with the steadier model, render with the cheaper one if your own reading holds up.run-metrics.md(slow run, unreadable check, cut prompt) stay here untiltroubleshooting.mdtakes them;run-record.mdkeeps its purpose section until it becomes schema only.Verified:
cells.csvand the evaluation text; each number in the page traces to one of them or to a run log.main.Tests: none, documentation only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BQ1Z71j4Q2W1CwGYjF55No
Generated by Claude Code