Repository navigation
Commit b576bb4
authored
fix(usage): retain reset history and unify accounting (#131667)
* fix(usage): retain reset history and unify accounting
Keep family selection within the recorded agent and assign each instance once.
Carry discovered SQLite or JSONL sources into batched loading, including empty
current sessions and history encountered before a current artifact.
Share Gateway and Control UI aggregation and total arithmetic, use canonical
pricing for detail logs, and invalidate both result caches on config changes.
Split calendar, cache, selection, and loading owners out of the usage handler.
Add failing-before regressions for reset history, overlapping families, mixed
sources, config replacement, missing-price exports, and log pricing.
* refactor(usage): keep accounting type imports acyclic
Make batched loading own its minimal input contract and import shared accounting
types from the leaf definition instead of the runtime barrel. Remove obsolete
current-JSONL fixture setup to keep the existing usage test within its line cap.
Verified both CI failures locally: zero Madge cycles and passing core lint with
the CI tsconfig. No runtime behavior or public protocol changes.
* refactor(usage): remove unused accounting type re-exports
The shared usage contracts now import their canonical leaf definitions. Remove
the six obsolete internal-barrel type re-exports left by that ownership repair.1 parent b18d444 commit b576bb4
25 files changed
Lines changed: 2288 additions & 1985 deletions
File tree
- config
- docs/reference
- scripts
- src
- gateway/server-methods
- infra
- ui/src
- e2e
- pages/usage
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2988 | 2988 | | |
2989 | 2989 | | |
2990 | 2990 | | |
2991 | | - | |
2992 | 2991 | | |
2993 | 2992 | | |
2994 | 2993 | | |
| |||
3237 | 3236 | | |
3238 | 3237 | | |
3239 | 3238 | | |
3240 | | - | |
| 3239 | + | |
3241 | 3240 | | |
3242 | 3241 | | |
3243 | 3242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
653 | 653 | | |
654 | 654 | | |
655 | 655 | | |
656 | | - | |
657 | 656 | | |
658 | 657 | | |
659 | 658 | | |
| |||
884 | 883 | | |
885 | 884 | | |
886 | 885 | | |
887 | | - | |
888 | 886 | | |
889 | 887 | | |
890 | 888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| |||
0 commit comments