perf: reduce mail snapshot copying and unnecessary vacuuming [skip release]#107

merged2
main
perf/emc2-storage-startup
opened5d agobyPPB
View on GitHubTwo-way sync enabledPR last imported 4d ago

What this changes

Reduce repeated cached-mail copying and avoid vacuum when no free pages can be reclaimed. Keep attachment inventory and encrypted mail intact.

Related: #106.

This is one layer of the ordered stack #107, #108, #104, #112, #84. [skip release] suppresses automatic publication from the squash commit.

Ownership and scope

  • Task owner: pekth.
  • Delivery owner (one writer): Codex acting for pekth.
  • Owned paths: storage and summary/cursor helpers, synthetic benchmarks/tests, docs.
  • Base branch and feature branch: main and perf/emc2-storage-startup.
  • Related issue or pull request: listed above.
  • Coordination search completed; existing PRs reused and original commits preserved with fast-forward branch updates.

How it was verified

  • Final head: ebe18547cf626afaba405899191d04009392512d; merge base: 0ef892e5a1be9c233ae8ae1b26685f2b7ea79980.

  • Broad bounded baseline: 1,343 tests passed; one fixed-port browser-session test failed. Its diagnosed ephemeral-listener repair subsequently passed in a separate bounded run. This is complete passing test-path coverage across separate runs, not a monolithic passing run.

  • Bootstrap regression: both pending and failed full reads reproduced unwanted automatic sync before the fix; all 10 bootstrap scenarios passed after the loaded guard.

  • Combined stack strict TypeScript, renderer and desktop build passed on Node 24.22.1.

  • Combined focused integration checks: all 207 passed, zero failed or skipped, through the bounded serial runner.

  • Isolated Linux source desktop startup passed under Xvfb: renderer loaded, database opened, isolated API and background close passed; packaged false, supported linux-local key fallback. This is source startup proof only.

  • Whitespace checks, changed contributor/changelog relative links and noreply commit-metadata check passed.

  • For application changes, npm test and npm run build pass; test coverage uses the separate bounded runs described above.

  • No private mail, account data, credentials or runtime paths are included.

  • Affected documentation and changelog are updated.

Review

  • Independent reviewer: Codex gpt-6.1-sol, high effort; SHIP, source only. Existing matching source reviews reused; fixes and integration resolutions reviewed separately.
  • Reviewed combined head: a4d8b230737abd4b30ae133f33cb6386bd6c9501; tree: e820385fac0d18fd257b203f6ffc2981123c37b4. Final stack head f2521f8b3446d471a200427ebae4bcf91b97b37b has that identical tree; only commit ancestry changed to put listener isolation in the bottom layer.
  • Required checks and approvals: forge state must be read separately; skipped or absent CI is not a passing hosted run.
  • Blocking source feedback resolved. Squash queue and resolved conversations remain required.
  • Native/installed app acceptance, phone geometry and passkey prompts, platform credential persistence, real providers and release artifact acceptance remain unknown.

Model: gpt-6.1-sol. Harness: Codex in T3 Code.

Landing receipt

  • Rebased onto main 0ef892e5a1be9c233ae8ae1b26685f2b7ea79980 before merge. Final head: ebe18547cf626afaba405899191d04009392512d.
  • Merged through the protected squash queue as 038ff3b044431196cf05f6240b4f9bd52a417f29.
  • Application, build, test, dependency and workflow inputs match the previously reviewed and executed candidate. Passing evidence was reused for those unchanged inputs. The rebased source equivalence and updated release documentation received an independent review; the changelog wording finding was corrected.
  • Automatic publication was suppressed for this intermediate merge.

Checks

3 skipped
All checks passed
ebe1854

Added 2 commits

  • perf: reduce mail snapshot copying and unnecessary vacuuming18f536f
  • test: isolate browser session checks from development listenerebe1854

Closure reconciliation for https://github.com/collection-of-things/aggregate-mail/issues/106: Reduced summary copying, conditional compaction and authenticated status-first bootstrap are merged. The old pending-merge status is superseded.

The issue is being closed as completed because this fixing PR is merged. Closure reason: https://github.com/collection-of-things/aggregate-mail/issues/106#issuecomment-6461136126

Installed/browser performance and real-provider acceptance are not established by this closure.