Skip to content

feat: aggregate ledgers from more than one machine #27

Description

@kleyt0n

Design issue — agree the shape before building.

Problem

Someone with a laptop and a desktop gets two disjoint pictures, and a team lead gets none.

Why it matters

The ledger is the one artifact that is safe to move between machines, because it is path-free by construction: src/repo.rs reduces a working directory to an owner/name slug during the scan and discards the path, branch and session id. That property is what makes this possible without compromising anything.

What to do

  • Export and import of usage-ledger.json, plus a machine label on day rows.
  • Merge dedups on the existing (requestId, message.id) key.
  • File in, file out — no server, no account, no sync. If it cannot be done that way it should not be done: surface has no backend and no telemetry, and this must not become the reason it acquires one.
  • LEDGER_VERSION is at 4 and older ledgers are discarded, so there is a precedent for the schema change.
  • Confirm the export carries nothing the ledger does not already hold.

Acceptance

Two machines' ledgers merge into one dashboard with per-machine attribution, and the merge is idempotent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions