voyage/lib/stats
Kjell Tore Guttormsen 43e6a2b23a
fix(stats): a trekbrief record carries the order Voyage runs, written by the writer (green)
appendStatsRecord(kind, record, env, { cwd }): for kind trekbrief it drops
every order_* key the record came with and adds attributeOrder()'s three
keys (lib/stats/claimed-order.mjs), resolving the mailbox from the record's
project_dir when that lies inside cwd. Other kinds are written untouched.

The CLI guard compares real paths (realpathSync on argv[1] and on
import.meta.url). The old `import.meta.url === file://${argv[1]}` was a
silent no-op - exit 0, nothing written - under a symlink and under a path
with a space (measured 04.10). Valgt realpath fordi `resolve()` alone fixes
only the space.

stats-landing 15/15; intent-approval, claimed-order, proevesett green.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 19:50:32 +02:00
..
cache-analyzer.mjs feat(stats): aggregate token/cost totals in cache-analyzer 2026-06-26 14:38:16 +02:00
claimed-order.mjs feat(stats): the recorder finds the one claimed order Voyage runs (green) [skip-docs] 2026-10-04 19:49:11 +02:00
event-emit.mjs feat(voyage)!: rename stats filenames, settings keys, hook prefixes [skip-docs] 2026-05-05 14:49:03 +02:00
stats-append.mjs fix(stats): a trekbrief record carries the order Voyage runs, written by the writer (green) 2026-10-04 19:50:32 +02:00
token-usage.mjs feat(stats): add claude-fable-5 to PRICE_TABLE 2026-07-02 17:15:36 +02:00