Skip to content

perf(test): storage suite takes ~90–105s, dominated by a few heavy IO tests #1940

Closed

Description

@Astro-Han

What happened
packages/storage runs 1026 tests in 88.3s locally (104.7s in an earlier run). Wall time is dominated by a handful of tests doing real fs/SQLite/git work. Slowest, from --test-reporter=spec timings on latest main (76e1476):

Test Time
Git workspace service (describe) 34.5s
rejects missing/changed/extra/symlinked backup payloads (single test) 32.3s
restores a writable Automation authority after a real legacy cutover 27.1s
SQLite Artifact store (describe) 20.4s
cleans interrupted backup and restore staging 16.3s
execution stores / Interaction store / Git worktree executor / operational cutover 14.5s / 12.9s / 11.5s / 10.9s

With --concurrency=3, storage is the critical path of the parallel workspace batch.

How to reproduce
cd packages/storage && time node --test "dist/**/*.test.js" (~88–105s).

Environment

  • Maka commit: 76e14764a
  • OS: macOS + Node v26.5.1; likely slower on CI’s 2-core ubuntu runners
  • Surface: tests only

Additional context
Heavy tests come from the storage SQLite migration + WAL backup series (#1570/#1694/#1706) and the Git workspace service (#1742). Options: gate the fs/git/sqlite-heavy cases behind the existing MAKA_STORAGE_STRESS env hook (already wired in CI), reduce payload/iteration sizes, or split a fast unit tier from the integration tier.

Activity

  1. UncertaintyDeterminesYou4ndMe commented on Aug 4, 2026

    @UncertaintyDeterminesYou4ndMe
    Contributor

    Re-timed on latest main (62024d1, clean npm install + root npm run build:test): the problem this issue measured no longer exists. Recommend closing.

    At 76e1476 Now (62024d1)
    1026 tests, 88.3–104.7s wall 647 tests (634 pass, 12 stress-gated skips), 12.4s wall (474% CPU — the runner parallelizes across files)
    rejects missing/changed/extra/symlinked backup payloads — 32.3s test no longer exists
    restores a writable Automation authority after a real legacy cutover — 27.1s test no longer exists
    cleans interrupted backup and restore staging — 16.3s test no longer exists
    Git workspace service (describe) — 34.5s 11.4s
    SQLite Artifact store — 20.4s 7.1s

    What resolved it: #1994 (refactor(storage): make SQLite the sole operational authority) deleted the legacy WAL-backup/cutover series that owned the three worst offenders — the migration those tests exercised is complete, so the fs/SQLite/git-heavy payload work went with it. The remaining real-process-crash and process-lock cases are already behind MAKA_STORAGE_STRESS (12 skips locally; CI enables the flag selectively in run affected standard workspace tests), which is exactly the gating this issue proposed.

    Slowest remaining items for the record: Git workspace service 11.4s, SQLite Artifact store 7.1s, runtime policy stores 4.8s — none anywhere near critical-path territory at a 12s total.

    Environment: macOS 26.6, Node v22.17.0. (One local-only failure, unrelated to timing: top-level package import does not initialize node:sqlite asserts empty stderr, and Node 22.x prints the SQLite ExperimentalWarning; Node 24 on CI does not.)

  2. Astro-Han commented on Aug 8, 2026

    @Astro-Han
    ContributorAuthor

    Closing as completed. The current-main remeasurement in the previous comment puts the storage suite at about 12.4 seconds rather than 88–105 seconds; #1994 removed the obsolete migration paths that dominated the original measurement, and the remaining stress cases are gated. A new regression should be filed from a fresh baseline.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions