Skip to content

Snapshot summary sizes lose precision: 5-decimal GB strings round small sizes to 0 B #168

Open

Description

@Razberrry

The snapshot collector pre-formats every *files-size summary value as gigabytes with 5 decimal places (backend/collectors/collect_snapshots.py:68). One step of 0.00001 GB is ~10.7 KiB, which makes the frontend display provably wrong information on small tables:

  1. Real files shown as 0 B. A commit that adds 2 data files with 3 records reports added-files-size: 0.00000 GB — the Timeline details panel renders Files size 0 B for files that exist and hold data.
  2. Arithmetic that doesn't reconcile. Table state shows 21 KiB → 10 KiB while the impact line shows −10 KiB (raw values 20.97 and 10.49 KiB each round independently). Users read 21 − 10 = 11 and report a bug.

The frontend already reverses the GB formatting to bytes (frontend/src/features/timeline/lib/format/backendSize.ts), so it can only recover what survived the 5-decimal rounding — any frontend "fix" would be fake precision.

Proposal: ship raw byte counts (Iceberg's summary values are byte strings already, e.g. added-files-size: "5735") and let the frontend format once at display time. Alternatively keep the GB strings but with enough decimals (~9) to be byte-exact. Either way it's a breaking change to the graph payload consumed by the frontend and icegraph-client, so it should ride a version bump.

Activity

  1. YanivZalach commented on Aug 29, 2026

    @YanivZalach
    Owner

    See #154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions