You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Stamp a node's spend on its error event, so an overspent run can say so (#84)
Tokens were attributed from `end` events only. A node the budget interrupts
emits `error` instead, so the spend that triggered enforcement vanished from
the run's own account of itself: `grapharc metrics` said `tokens: 0` for a run
stopped with `max_tokens reached (51/5)`.
Every `error` event now carries what its node spent, exactly as `end` does,
and both `summarize` and the cost report count it. Sub-events inside a node
stay a breakdown of its total rather than an addition, so the disjointness
that kept `ends + orphans` from double-counting holds unchanged, and the
`RunCost.tokens == RunMetrics.tokens` invariant the suite asserts still does.
The basics cookbook stated what each phase carries and had to be re-recorded,
which is the page doing its job.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,10 @@ and "used to be true" — the two things a reader most needs kept apart.
7
7
8
8
Entries are newest-last within a release, matching the order they were written.
9
9
10
+
## Unreleased
11
+
12
+
- a run **stopped for overspending reported spending nothing**. Tokens were attributed from `end` events, and a node the budget interrupts emits `error` instead — so `grapharc metrics` answered `tokens: 0` for a run whose own enforcement message named the figure that stopped it (`max_tokens reached (51/5)`). The audit trail lost precisely the number the stop was about, and per-node attribution dropped the most expensive node in the run. Every `error` event is now stamped with what its node spent, exactly as `end` is, and both `summarize` and the cost report count it; sub-events inside a node remain a breakdown of its total rather than an addition, so the disjointness that kept `ends + orphans` from double-counting is unchanged, and `RunCost.tokens == RunMetrics.tokens` still holds.
13
+
10
14
## 0.1.3
11
15
12
16
-`grapharc plan` drives the governed loop; `PolicyEngine.edge_policy()` compiles the TOML document into the gate `AdmissionChecker` consults, and `grapharc plan --policy` is the caller; `grapharc demo --memory PATH` hands the shipped graphs the durable SQLite store.
0 commit comments