Skip to content

[Epic C] (#962) Integration Testing: a real reduction on hardware, both platforms #967

Closed

Description

@diffwireauto

Epic C of #962, and the Feature's Integration Testing Epic. Plan of record: docs/initiatives/standalone/962-stale-blob-reclamation/PLAN.md.

The only Epic needing the owner. A and B are test-provable; a real reduction on real hardware is not.

Depends on #965 and the Epic B issue.

Tasks

Task Pts
C1 · Owner hardware run, Windows and Android: the action reports a real reduction, history still reads correctly afterwards, and an unmigrated radio's history is untouched when that radio is next connected. 3
C2 · Post-run read-back of the live database: no migrated key retains a blob, unmigrated keys all do, row count unchanged. 1

Why both platforms

Storage is platform-independent Dart, but VACUUM is not: it rewrites the whole file and needs temporary space, and the owner's install is 70.9 MiB on desktop with a different filesystem and free-space picture from a phone. The reduction has to be observed somewhere real, not inferred.

The baseline to measure against

Captured 2026-10-22 on the owner's live database, for comparison after the run:

file                 74,350,592 bytes (70.9 MiB)
keys with rows       41
marked migrated      41
message rows         28,389
history blobs        138, none empty

Measured on a copy, the expected outcome of a full sweep today: 40 blobs deleted, 291 keys kept including all 98 unmigrated history blobs byte-identical, file 54,927,360 bytes, integrity_check ok, rows unchanged.

Acceptance

  • The action reports a reduction, and the live file on disk is smaller, verified by reading it rather than trusting the log line.
  • Opening the four previously trapped d549bbfbd0 channels still shows their history.
  • Connecting a radio whose keys had not migrated still shows that radio's history, proving the sweep left authoritative blobs alone.
  • Row count unchanged across the whole exercise.

Agent Mail: TealGlen

Activity

  1. diffwireauto commented on Oct 23, 2026

    @diffwireauto
    MemberAuthor

    Ready for the hardware run

    Epics A and B are built, pushed and green: #972 (engine) and #973 (the button, stacked on A). Merges are held to the Feature end per the plan grant.

    What to do

    The Storage card is at the bottom of App Settings. It shows the current database size and a Clear Stale History Now button.

    1. Note the size the card reports.
    2. Press the button.
    3. Read the result line. Expect something like Cleared 40 old copies, 16.6 MB returned. and, if anything was held back, Kept N that could not be verified.
    4. Open the four d549bbfbd0 channels (#wardriving, Public, #test, Offband Claude Msg System 6a3d) and confirm the history is still there.
    5. Connect a radio whose keys have not migrated and confirm that radio's history is intact. That is the half that proves the sweep left authoritative blobs alone.

    Baseline to measure against

    Captured from the live database before any of this:

    file                 74,350,592 bytes (70.9 MiB)
    keys with rows       41
    message rows         29,950
    history blobs        138, none empty
    

    Measured on a copy through the production sweep, so this is what to expect:

    blob keys: 477, migrated history keys aged: 47
    cleared 40, refused 0, 17362944 bytes returned (16.56 MiB)
    kept keys missing: 0, byte-changed: 0
    integrity_check: ok, rows 29950 -> 29950
    

    47 aged and 40 cleared because the other 7 migrated through the empty-blob path and never had a blob to reclaim. Expect roughly 16.5 MiB back, not the ~42 MB steady-state figure: 23.8 MB of blob still belongs to 98 keys on radios not reconnected since the upgrade, and those are still the only copy of that history.

    I will read the live database afterwards and confirm no migrated key retains a blob, every unmigrated key still does, and the row count is unchanged.

    Agent Mail: TealGlen

  2. diffwireauto commented on Oct 24, 2026

    @diffwireauto
    MemberAuthor

    Merged to dev via #973 (dev head 5b061924), CI 10/10 green. Content verified on dev by git cat-file and by grep for the substantive symbols, not by merge state.

    Owner-validated on Windows 2026-10-23, read back from the live database independently of what the UI reported:

    before after
    file bytes 74,350,592 57,057,280 (-16.5 MiB)
    migration timestamps 0 47
    audit entries 0 1, naming all 40 cleared keys
    cleared keys still holding a blob 0
    unmigrated history blobs lost 0 of 98
    cleared keys left with zero rows 0

    He confirmed the channels read normally afterwards.

    Agent Mail: TealGlen

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions