$ cd packages/game-data && node --test tests/ledger-tools.test.mjs # cwd /Users/king/Desktop/Workspace/SRO/zoen # exit 0 TAP version 13 # --at needs an ISO date/time, got "not-a-date" # Subtest: cost estimate uses the pricing table (Opus 5.5 list prices) ok 1 - cost estimate uses the pricing table (Opus 5.5 list prices) --- duration_ms: 1.138167 type: 'test' ... # Subtest: time: wall clock includes stoppages, active counts only short gaps ok 2 - time: wall clock includes stoppages, active counts only short gaps --- duration_ms: 1.976458 type: 'test' ... # Subtest: codex ledger reads only zoen/ sessions, dedupes usage records and counts image calls ok 3 - codex ledger reads only zoen/ sessions, dedupes usage records and counts image calls --- duration_ms: 79.35325 type: 'test' ... # Subtest: token windows can be limited to one session (concurrent sessions are not double-counted) ok 4 - token windows can be limited to one session (concurrent sessions are not double-counted) --- duration_ms: 0.361333 type: 'test' ... # Subtest: task-log records --session and a back-dated --at start without counting flags as text ok 5 - task-log records --session and a back-dated --at start without counting flags as text --- duration_ms: 179.826458 type: 'test' ... # Subtest: incremental transcript cache gives the same totals as a full parse ok 6 - incremental transcript cache gives the same totals as a full parse --- duration_ms: 201.931375 type: 'test' ... # Subtest: a rebuild keeps a session whose transcript is gone (archived) and the total never drops ok 7 - a rebuild keeps a session whose transcript is gone (archived) and the total never drops --- duration_ms: 268.759792 type: 'test' ... # Subtest: per session the larger value wins: a trimmed or rewritten transcript cannot lower a total ok 8 - per session the larger value wins: a trimmed or rewritten transcript cannot lower a total --- duration_ms: 146.371917 type: 'test' ... # Subtest: sub-agent transcripts (/subagents/agent-*.jsonl) are counted in their session, once ok 9 - sub-agent transcripts (/subagents/agent-*.jsonl) are counted in their session, once --- duration_ms: 97.2745 type: 'test' ... # Subtest: a task logged from a sub-agent counts that sub-agent (and its helpers), not the session or the other sub-agents ok 10 - a task logged from a sub-agent counts that sub-agent (and its helpers), not the session or the other sub-agents --- duration_ms: 117.589792 type: 'test' ... # Subtest: per-task tokens: an earlier value for the same window is kept, an earlier open window is not carried over ok 11 - per-task tokens: an earlier value for the same window is kept, an earlier open window is not carried over --- duration_ms: 0.278333 type: 'test' ... # Subtest: time of merged spans equals the time of all timestamps read together ok 12 - time of merged spans equals the time of all timestamps read together --- duration_ms: 0.428667 type: 'test' ... # Subtest: a ledger written before per-session splits is merged exactly; a copy of a conversation is counted once ok 13 - a ledger written before per-session splits is merged exactly; a copy of a conversation is counted once --- duration_ms: 7.502458 type: 'test' ... 1..13 # tests 13 # suites 0 # pass 13 # fail 0 # cancelled 0 # skipped 0 # todo 0 # duration_ms 1229.113083