Skip to content

Feat/m3 live pipeline - #1

Merged
hsusul merged 4 commits into
mainfrom
feat/m3-live-pipeline
Aug 13, 2026
Merged

hsusul merged 4 commits into
mainfrom
feat/m3-live-pipeline

Conversation

@hsusul

@hsusul hsusul commented Aug 13, 2026

Copy link
Copy Markdown
Owner

No description provided.

hsusul and others added 4 commits August 13, 2026 11:36
…e harness

Close M3's missing lifecycle boundary: the debounced watcher, durable
coalescing queue, and bounded pipeline drain existed but nothing bound them
into a running system tied to the app lifecycle.

- worker: a background Worker (own SQLite connection + registry/blobs/config)
  with deterministic recover/scan/enqueue_paths/run_pending/drain_batch steps,
  plus a spawn() thread driver + WorkerHandle with deterministic shutdown.
- jobs: QueueDepth + queue_depth() for observable, bounded backpressure.
- src-tauri: spawn the worker in setup (own connection to the same DB file, a
  real recursive SessionWatcher, initial incremental scan) and shut it down
  cleanly on RunEvent::Exit; add a debug-only LORE_DEV_* root override so
  `cargo tauri dev` can run against seeded fixtures, never real history.
- discovery: match owner_of on canonicalized forms so a symlinked root prefix
  (/var -> /private/var, /tmp, a symlinked home) no longer drops live updates.
- synthetic: deterministic, seedable synthetic-profile generator (write-only,
  never reads real ~/.claude / ~/.codex) for scale and E2E tests.
- tests: deterministic lifecycle coverage (worker.rs) and a scale harness
  (scale.rs) incl. an opt-in 10k-session ingest proof.

Sources stay read-only; progress events are content-free; no network/LLM.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drive the real product flow (the spawned worker + real SessionWatcher) over a
seeded synthetic profile through every lore_core entry point the Tauri commands
wrap: launch -> initial scan -> live FSEvents update -> browse (agents/repos/
sessions/detail/git/secret-count) -> search -> export -> forget. Ignored by
default (pre-release tier; depends on real FS-watch delivery).

This is what surfaced the symlinked-root canonicalization bug fixed in the
owner_of change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add lore_core::backup::create_backup: a standalone, integrity-verified,
retention-pruned snapshot of the live WAL-mode archive using SQLite's
online backup API (SECURITY.md §6, DATA_MODEL.md §9). The copy retries
on BUSY/LOCKED so the background worker can keep writing, backup files
inherit the app's 0600 posture on unix, and DEFAULT_BACKUP_RETENTION
bounds copies on disk. Acceptance tests cover the standalone copy,
uncheckpointed-WAL capture, retention, and private permissions.
Add lore_core::backup::restore_backup (reverse of the online copy: replace
a destination DB file wholesale via SQLite's restore API, then re-verify
integrity) and list_backups (content-free, oldest-first enumeration so
recovery can offer the newest backup). prune now reuses list_backups.
Restore never needs original agent logs — a backup is the entire archive
(SECURITY.md §6, TESTING.md §7). Tests cover restoring over a lost
archive, rejecting a non-database file, and filtering stray files.
@cursor

cursor Bot commented Aug 13, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@hsusul
hsusul merged commit 3ba62de into main Aug 13, 2026
3 checks passed
hsusul added a commit that referenced this pull request Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant