Skip to content

test: add E2E coverage for memory sync pipeline + graph visualization #3116

@senamakel

Description

@senamakel

Summary

PR #3113 introduced significant new functionality that needs E2E test coverage:

Core (Rust) — integration tests needed

  • memory_sync::sources::github::run_github_sync — mock GitHub API, verify summaries land in tree
  • memory_tree::ingest::ingest_summary — verify L1 buffer management, seal cascade at SUMMARY_FANOUT
  • memory_sync::sources::rebuild::rebuild_tree_from_raw — seed raw files on disk, verify tree gets built
  • memory_sources::sync::sync_source — verify per-source mutex (second call is no-op), retry_all_failed fires, audit log written
  • memory_sources::sync::check_and_rebuild_tree — verify auto-detect triggers rebuild when raw exists + max_level=0
  • Graph export with source root nodes — verify synthetic roots, document leaves, orphan linking

Frontend (Vitest) — component tests needed

  • SyncAuditPanel — renders entries, formats tokens/cost/duration, handles empty state
  • PixiGraph.updateGraph — verify nodes preserve position on update, new nodes spawn near parent
  • MemoryWorkspace — verify graph doesn't unmount between fetches (no setGraph(null))
  • MemoryGraph — source node kind renders with orange color, legend includes "Source" entry

E2E (WDIO/Playwright)

  • Memory tab → trigger GitHub sync → verify graph shows source root + L1/L2 nodes
  • Memory tab → trigger Gmail sync → verify audit log panel shows the run
  • Memory tab → press sync twice quickly → verify only one sync runs (mutex)

Context

These were validated manually during #3113 development but lack automated coverage. The coverage gate (≥80% on changed lines) will benefit from these tests on future PRs touching the same paths.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions