Skip to content

Releases: anandgupta42/aireceipts

v0.11.0

Choose a tag to compare

@github-actions github-actions released this 14 Jul 03:10
d253ecb

Minor: enforcement learned about release branches (PRs #259, #261, SPEC-0036
R2 amendment). With AIRECEIPTS_REQUIRE_PR_RECEIPT=true, branches matching
release/* now stay notice-only instead of failing the check: release checkouts
are authored without a capturable agent session, so no receipt can exist for
them. Override with the AIRECEIPTS_RECEIPT_EXEMPT_GLOBS repo variable or the
hidden pr-check --exempt-globs flag (space-separated anchored globs, *
wildcards only; set it to an empty string to enforce everywhere, restoring the
old strict behavior). The matcher is a linear-time two-pointer scan, no RegExp,
so pathological patterns cannot blow up matching; the logic exists once per
runtime (scripts/check-pr-receipt.mjs for the reusable workflow,
src/pr/exemptGlobs.ts compiled into pr-check) with a parity suite pinning
the two to identical verdicts. The adopter caller snippet and
aireceipts integrations output forward the new variable. Also in this range
(#259, repo infra, not in the npm artifact): the dogfood attach pipeline got a
core.hooksPath self-heal and exempt-glob support in the reusable check
workflow, closing the failure class that silently dropped PR receipts for a
week (an absolute hooksPath plus a parked main checkout). Receipt rendering
untouched: 102 goldens byte-identical.

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 19:25
400aa73

Minor: the adoption funnel is now measurable (PR #257). setup and
integrations runs emit the standard content-free cli_run event (previously
invisible — the strict schema dropped uncatalogued command names), and a
non-zero cli_run now carries an exitClass enum classifying deliberate
failures: no-session-match | invalid-arguments | budget-exceeded |
not-comparable | other-controlled. Thrown errors keep their separate
cli_error/errorClass channel; the two never double-report a run.
Motivation: the 2026-07-10/11 launch cohort's most common event was a
receipt-class run exiting non-zero with no diagnosable cause. Everything stays
content-free (SPEC-0043 amended; docs/telemetry.md in schema-pinned parity):
the class only — never selectors, paths, or messages. The hidden pre-push hook
and statusline polling remain telemetry-silent.

v0.9.1

Choose a tag to compare

@github-actions github-actions released this 13 Jul 05:59
3d4216d

Patch: the SPEC-0073 auto-attach hook now fires for the commands coding agents
actually run
(fixes #241, PR #252). hook pre-push previously refused any Bash
command with more than one tokenized invocation, and a trailing 2>&1 defeated
even a single plain push — so chained agent pushes (git add && git commit && git push, git push 2>&1 | tail) never attached a receipt ref. The issue's "worktree"
correlation was an agent-command-style correlation. Now: shell redirections are
stripped per invocation, the hook attaches once when at least one invocation is an
unambiguous branch push, any cd/pushd/popd in the command still refuses (the
push may target a different repo than the hook's cwd), and heredoc payloads keep
refusing via an explicit guard. SPEC-0073 R1 amended accordingly.

Also hardened the adopter kit (org-rollout review finding): the hook commands in
docs/adopt/claude-settings.json, docs/adopt/codex-hooks.json, the
docs/pr-receipts.md snippets, and the integrations command's recipes now end
|| true — an npx/registry failure can never block a push.

v0.9.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 04:07
396de73

Minor: receipt dollars are now explicit observable lower bounds — ≥ $X, never an
exact-looking bill — and the --json export schema moves to v2 to say so in a
machine-readable way.
A second, deeper cost-correctness pass after v0.7.1's #196:
PR #242 fixed real undercounting (a commit/amend truncation had sliced a $0.44
receipt out of work independently reconstructed at ≥ $44.97, issue #239) and made
every surface state what the number is and what it excludes.

feat

  • GPT-5.6 (Sol/Terra/Luna) sessions are now priced. The price schema gained
    per-request context tiers (context_tiers, input_cache_write), so Codex request
    envelopes select the cited >272K Standard tier per request; the unpersisted
    cache-write quantity stays outside the floor with a caveat. GPT-5.5 remains
    tokens-only because its published long-context threshold is full-session scoped,
    which a request stream cannot select honestly (PR #242, cited from the official
    model pages in data/prices/openai.json).
  • Statusline model segment + the meter (SPEC-0076, PR #233): the statusline can
    show the session's model mix, and the landing page gained the meter story and
    redesign.
  • PR-receipt provenance footer (SPEC-0078, PR #236): posted receipts carry a
    footer stating how the numbers were produced and where the raw data lives.
  • Samosa story page (SPEC-0079, PRs #238/#240): a Ko-fi tip jar behind an
    own-surfaces-only story page; a single Sponsor row and README section link to it.
    Receipts, PR comments, and artifacts never carry the tip link by default.
  • Landing SEO/AEO (SPEC-0080, PR #243): share cards, JSON-LD, sitemap, llms.txt.
  • Exports: schema v2 adds minUsd lower-bound estimates (kind: "lower-bound",
    basis: "standard-api-list-price-equivalent"), exact parent/child/combined
    unpriced-token vectors, explicit dollar/token scopes, combined pricing-coverage
    fields, and tool-CSV granularity warnings (PR #242).

fix

  • Cost attribution across all agents (PR #242, fixes #239): PR anchors resolve
    one recovered SHA-alias truth for contributor selection, slicing, per-commit rows,
    and same-session amend lineage (with HEAD-change barriers so a branch switch can
    never pull a foreign commit into a slice). Codex parsing gains replay dedupe,
    inherited-baseline removal, model/provider switching, exact cumulative/last
    reconciliation, and fail-closed handling of malformed/reset/mixed streams — every
    observable envelope is retained as tokens even when pricing must be refused.
    Claude Code deduplicates by message.id and keeps id-less usage as one
    unattributed envelope; malformed counters can never become priceable zeroes.
    OpenCode prices provider-aware and reconciles aggregates componentwise —
    contradictory vectors are excluded, never fabricated.
  • Uncited cache rates contribute zero with a caveat — no fallback to an uncited
    input rate, ever (I2).
  • Displayed ledger rows sum exactly to TOTAL, and no displayed amount ever exceeds
    its raw value; tiny positive floors keep up to twelve decimals rather than
    collapsing to $0.0000 (PR #242).
  • Detector language: flagged patterns read FLAGGED PATTERN COST ≈ … · not proven savings — no "waste floor" claim (PR #242).
  • PR receipt attachment is reliable across Codex and CI (PR #232).

BREAKING / migration from schemaVersion 1

--json schemaVersion is now 2. totalUsd is scoped to the parent session
only
and is an explicit lower bound (rounded down); the old combined meaning lives
in combinedPricedUsd / combinedPricedCostEstimate. Scripts that consumed v1's
totalUsd should check schemaVersion and read the combined fields if they want
parent+subagent totals. All dollar fields carry lower-bound semantics objects; known
unpriced usage is exported beside the floor instead of disappearing. Details in
docs/json-schema.md.

v0.8.2

Choose a tag to compare

@github-actions github-actions released this 10 Jul 19:13
fc9d0eb

Patch: the auto-attach hook now fires on bare-HEAD branch publishes
git push -u origin HEAD (and --force-with-lease / HEAD:refs/heads/<x> forms), the
dominant idiom for coding agents, previously classified as not-a-branch-publish and the
SPEC-0073 hook silently wrote no receipt ref. Root-caused from the org dogfood pilots
producing zero receipts (issue #228, PR #230): the sibling hook on the same event fired
while ours declined classification. The receipt ref slug always derives from the
resolved checked-out branch; detached HEAD still attaches nothing (fail-safe), and
tag/sha/receipt-ref/delete publishes stay excluded.

Also: docs — terminal-statusline pages now say what happens without tmux (silent
fallback + alternatives, #226) and add a shell-wrapper recipe so the statusline appears
whenever the agent launches (#225).

v0.8.1

Choose a tag to compare

@github-actions github-actions released this 10 Jul 03:16
cbf360e

Patch: OpenAI gpt-5.6 family price rowsgpt-5.6-sol ($5.00 in / $0.50 cached /
$30.00 out per 1M), gpt-5.6-terra ($2.50 / $0.25 / $15.00), gpt-5.6-luna ($1.00 /
$0.10 / $6.00); Standard short-context tier, effective 2026-07-09, every row cited to
the official OpenAI pricing page (PR #223). Codex CLI sessions on these models — which
rendered tokens-only under I2's no-fabricated-dollars rule — now price in receipts and
the statusline. Additive data change only; no code touched.

Also: the README was restructured around a features-first flow with an agent-assisted
install section ("point your agent at this README and it installs + wires the
statusline"), contributed in PR #213. Docs-only; ships as the npm package README.

v0.8.0

Choose a tag to compare

@github-actions github-actions released this 10 Jul 02:43
9b87e15

Minor: the statusline now works at the terminal level — tmux, starship, zsh/bash,
PowerShell, terminal titles — so Codex and opencode sessions get a live cost line too,
not just Claude Code.
Neither Codex nor opencode exposes a command-backed status hook
(openai/codex#17827 and anomalyco/opencode#8619 are open), so the surface moved to the
terminal itself (SPEC-0075, PRs #217/#221).

feat

  • aireceipts statusline --cwd <path> selects the newest session attributed to that
    path
    instead of the machine's globally newest one, so a tmux status-right line
    (--cwd "#{pane_current_path}") shows each pane its own session. Attribution is
    guarded: Claude Code's lossy project-directory encoding is confirmed against the
    transcript's own recorded cwd after load, sessions launched from the home directory
    (or /) never ancestor-match everything, dot-segments resolve lexically, full-parse
    work is capped, and no match renders the neutral placeholder — never another
    project's line. Cursor sessions carry no cwd and are excluded. Relative paths resolve
    against the invocation directory; a usable Claude Code stdin payload still wins.
    Recipes for tmux, starship, plain zsh/bash, PowerShell, and OSC terminal titles are
    in docs/statusline.md — the Claude Code native statusLine hook remains the
    recommended (richer, faster) surface where it exists (PRs #217, #221).
  • ~/.aireceipts/statusline.json ({"items": ["brand", "cost", …]}) sets a persistent
    default segment list for the statusline. Precedence: explicit --format > config
    file > built-in default. An invalid file degrades to the default line with one stderr
    note (exit 0); the --format flag keeps its fail-fast contract (PR #221).
  • Telemetry: --cwd invocations are polling surfaces, so they count locally but never
    network-flush (a 15-second tmux poll adds zero events). The
    integration_surface_rendered event gains scoped and configFile booleans — never
    the path or the format string (docs/telemetry.md, PR #221).

fix

  • The published CLI is ~3.5× faster wherever sqlite-backed sessions (opencode,
    Cursor) are read
    (PR #214). tsup's removeNodeProtocol default rewrote
    import("node:sqlite") to import("sqlite") in dist/, which fails at runtime, so
    every published build silently fell back to spawning the sqlite3 CLI per query —
    measured 4.0s → 1.15s for one statusline render on a sqlite-heavy machine. On
    Node ≥ 22.13 the sqlite3 binary is no longer needed at all; older runtimes keep the
    fallback. Built-artifact regression tests now pin the import specifier and the
    in-process read path.

chore

  • CI gains a windows-latest job (cwd matching, statusline suites, built-CLI e2e). Its
    first runs surfaced and fixed three real Windows issues: .cmd spawns need a shell
    under Node's CVE-2024-27980 hardening, goldens/fixtures gained -text line-ending
    exemptions, and absolute POSIX paths are never drive-prefixed by path.resolve
    (PR #221).
  • OpenSSF Scorecard hardening: esbuild override for the open advisory, absolute
    SECURITY.md link (PR #212); adopter pr-check workflow hardened with
    continue-on-error + concurrency groups (PR #207).

Rendered receipt output is byte-identical (receipt goldens unchanged; the help golden
gains the --cwd line); the default statusline
line renders through the exact same code path as 0.7.2 when neither --cwd nor a
config file is present.

v0.7.2

Choose a tag to compare

@github-actions github-actions released this 09 Jul 05:40
39567e8

Patch: PR-receipt refs are now written under refs/aireceipts/* instead of the generic
refs/receipts/*.
The old namespace collided with other tools that also publish to
refs/receipts/<slug> (e.g. an attestation producer storing an in-toto receipt.json at
the same path). In a repo running both, the namespace was occupied by the other tool's
payloads, so CI pr-check fetched a foreign ref, failed its schemaVersion check, and
silently posted nothing — the auto-attach hook fired and pushed refs, yet no receipt ever
appeared. aireceipts now owns refs/aireceipts/* and never reads or writes
refs/receipts/*, so the two coexist; the push classifier still recognizes both namespaces
so a foreign receipt-ref push is never mis-counted as a branch commit (PR #204). No
migration: aireceipts had never written a refs/receipts/* ref. Hooks and CI on @latest
adopt the new namespace together on this release. Rendered receipt output is byte-identical
(goldens unchanged); the only user-visible surface change is the ref name in pr --help.

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 09 Jul 03:11
4a86846

Patch: Claude Code receipts were over-reporting cost by ~2.5–3× and are now correct.
Claude Code writes one assistant transcript record per content block of a response, and
every record of that response repeats the same message.id and a byte-identical usage
snapshot. The adapter had counted each record as its own billed turn, multiplying a
response's tokens by its block count. Turns are now deduped by message.id — the first
record of a response books its usage once, later records only add their tool calls — so
turnCount and every $ reflect real billed responses (PR #196). After upgrading, every
Claude Code receipt you render shows lower dollars and fewer turns than 0.7.0 showed for
the same session
: a real local session dropped from $102.97 to $36.69 (2.81×), and one PR
slice from $5.17 to $1.61. This was a silent over-report — the first known arithmetic
case of a receipt exceeding the true floor rather than under-reporting it. Codex, opencode,
and Cursor are unaffected (Codex reconciles against the rollout's own cumulative total and
was re-verified correct to the cent). Synthetic-fixture output is byte-identical (goldens
unchanged); the summary-cache version was bumped (2 → 3) so stale inflated totals recompute
on the next run. Receipts posted on this repo's own past PRs carry per-session correction
blocks with exact recomputed figures. Full audit and evidence: PR #196,
docs/cost-model.md, and the 2026-07-08 addendum in
docs/internal/cost-attribution-evidence.md.

v0.7.0

Choose a tag to compare

@github-actions github-actions released this 08 Jul 22:39
ff1e549

Minor: telemetry now defaults to enabled in CI, reversing the v0.6.x CI-default-off behavior.
Automated CI runs (e.g. the pr-check action) are now counted by default, so CI adoption shows up
in the data. CI is no longer special-cased — the isCI field still distinguishes CI from human
runs. Both kill switches still win everywhere: set AIRECEIPTS_TELEMETRY=off (or 0/false)
or DO_NOT_TRACK=1 to disable telemetry in CI or anywhere; an empty/malformed connection string
also disables. Telemetry payloads remain content-free (no transcript, prompts, file paths, repo
names, or dollar amounts — invariant I4). See SPEC-0002's 2026-07-08 amendment and docs/telemetry.md.