Skip to content

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 16:27
· 1389 commits to main since this release
2eb6565

Minor Changes

  • Breaking (cost record): cost.json accepts one models shape: an array of entries. A record whose models is an object is no longer read by key order — that coercion dropped the keys, which are the only place the writer named a model, so the entry priced without anything able to attribute it. Such a record now reads as unreadable spend, named by the existing cost.json unreadable — spend unrecorded for this rollup warning, and the run still completes. Every record the shipped prompts/review.md template writes already carries the array form, so no template and no documented recipe changes. An existing object-valued record migrates by rewriting it as "models": [{"name": "<panel slug>", "model": "<model id>", "input_tokens": N, "output_tokens": N}]; record --cost-names will not convert it, because converting would restore the shape the reader just dropped.

  • record --cost-names[=<names>] names the models[] entries of a bundle's cost record and its per-chunk records, in place and without changing a count. Names come from the flag's own ordered list — synthesizer first, then lenses — or from a panel pinned in the bundle; with neither, the repair refuses rather than inventing a name from a slug.

    An entry that already names its seat keeps that name. A name that sits on the wrong seat, repeats, or comes from outside the panel refuses with a code naming the entry and the seat it should hold, and an entry the panel cannot explain refuses rather than being left half-attributed. A document holding several records gives each record the whole panel, never a share of it.

    The repair plans every cost file before writing any, and it runs after the record verb's other checks, so no refusal rewrites a cost record. A cost file that changed after it was planned refuses rather than replacing the newer write, and a record that grew past the reader's 8 MiB cap refuses before anything is written. A write that fails mid-pass stops with the files already written named in the refusal, and re-running finishes the repair.

    This verb is how an operator repairs the array that the same release made the only shape: a record whose models is an object is cost-models-not-array here rather than converted, because converting would restore the second shape the reader just dropped. Migrate by writing an array whose entries name their seat — the migration note sits with the array-shape change, and this verb is its repair path.

  • Lens certification becomes version-scoped, and aggregation stops refusing records it can read. A cost record offered as schema_version: "2" may carry only the top-level fields v2 defines: an extra field now refuses by name and version (carries top-level field "notes", which that version does not define — remove the field; no version this build certifies defines it) instead of a generic "unreadable" sentence, a record bound to the run at a version this build does not certify refuses as version-unsupported rather than being re-read as v2, and a schema_version no reader can parse (null, a boolean, an array, an object, an empty string) is malformed instead of counting as absent — so an unreadable declaration can never let an older certified record stand in for the newest binding. The group estimate and the cost rollup take the other side of the split: they price the fields they know and ignore top-level fields a newer writer added, so one run's stray key no longer voids the history an estimate is built from — that closes a budget-unknown refusal under require_known_estimate that a single unregistered field could previously trigger. Nested shapes stay strict, and every fail-closed check still fails: foreign capture, duplicated key, unreadable entry, mismatched binding.

Patch Changes

  • report --cost keeps a chunk's spend when the bundle's own cost.json is unreadable. The broken top-level record used to be folded into the same rollup as the per-chunk records, so one bad file voided every chunk beside it and reported zero tokens for a run that had real measured spend. It is now dropped on its own — named once by cost.json unreadable — spend unrecorded for this rollup, the same way an unreadable chunk is named — and the chunk records still price. No other shape changes: a bundle with no chunk records reads its top-level record exactly as before.
  • The release body is asserted, not assumed. scripts/release.sh now reads the published release back after GoReleaser publishes the assets, rewrites the body from CHANGELOG.md's section for the tagged version when it differs, and fails the run when the rewrite does not stick or the release is incomplete. A body that differs only in the whitespace GitHub hands back is accepted rather than rewritten, and a release that is missing assets never gets a body at all. Release 0.5.0 shipped a one-byte body while the notes file held 15.9 kB and every publish step reported success; the new body stage closes that gap, the release-body eval holds it offline, and a re-run leaves an already-correct body untouched.