Commit b375f91
committed
Ignore forked-session replay in usage parsing
Add logic to detect and ignore replayed events from forked sessions so they don't inflate usage totals, while still counting new post-fork activity. Bump the scan-cache DB schema to v3 and add a migration that clears stale cache rows that must be reparsed under the new semantics. Introduce ForkReplayState and related helpers (maybe_start_fork_replay, fork_replay_should_skip_event, note_fork_replay_token) and update parsing/scan flows to skip replayed events but preserve token-count bookkeeping. Add timestamp parsing helper and tests covering fork-replay behavior, cache migration, and snapshot computation. Also bump package version to 0.3.4, update CHANGELOG/README, and add /temp to .gitignore.1 parent 15fcb70 commit b375f91
6 files changed
Lines changed: 498 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
0 commit comments