You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* chore(demo): seed BOTH core + pro data so chat/memory works in the demo
`npm run demo` set only OFFGRID_SEED_PRO (pro: observations/entities/clipboard/
replay), leaving the CORE RAG/memory store empty — so "All memory" chat had
nothing to query and errored with "Sorry, something went wrong…". Add
OFFGRID_SEED=force so the core seeder (seedDemo) also runs, indexing synthetic
chats/knowledge/memory into RAG. The demo now exercises the real chat/generation
success path, not the empty-profile error path.
Also clarify CLAUDE.md: the two seeders are independent (OFFGRID_SEED = core,
OFFGRID_SEED_PRO = pro); capture flows that generate need both.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: add @scure/bip39 for vault recovery phrases
Audited, minimal BIP39 implementation. Consumed by the desktop-pro vault
recovery-phrase feature (24-word phrase -> vault unlock), resolved from the
desktop node_modules as a pro peer dep.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs: engineering guidance (integration tests, sparing mocks) + vault-recovery evidence GIF
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: User <user@Users-MacBook-Pro-174.local>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ Two process rules, learned from the same incident — they matter as much as the
61
61
When iterating (a request, a fix, a tweak the user just confirmed), add a test that captures that specific behavior **as part of the same change** — a regression test that would fail before the change and pass after. This applies to bug fixes (test the exact broken case), new branches/conditions (cover each), and copy/contract changes other code depends on. Do not defer tests to "later" or a separate commit.
62
62
63
63
-**Unit tests** — vitest, `src/**/*.test.ts` (run `npm test`). Keep logic pure and Electron-free so it's testable: extract decision logic into a no-import module and test that (see `model-sizing.ts`, `search-ranking.ts` + their `__tests__/`). DB/Electron-bound code (anything importing `getDB`, `vision`, etc.) can't be unit-tested directly — pull the pure part out.
64
+
-**Integration tests over mocks** — cover the real seams too, not just the pure units. Run the actual implementation against real collaborators wherever it's feasible (a temp SQLite DB, a temp `OFFGRID_USER_DATA` dir, real crypto/WASM) — see `vault-service.test.ts`, which exercises real kdbxweb + Argon2 against a temp dir. **Use mocks very sparingly**, only at true boundaries you can't run in-process (the network, a native OS dialog, hardware IDs). A mock that stands in for your own logic hides the thing under test and lets it rot green — prefer a real (or in-memory) implementation so the test fails when the behavior actually breaks.
64
65
-**Regression guards for prompts/contracts** — when a fix lives in a prompt or string contract, assert it by reading the source (see `extract-prompt.test.ts`, which guards the observation-confabulation fix).
65
66
-**E2E** — Playwright Electron tour in `e2e/` (`npm run test:e2e`), DOM-driven, fresh temp profile, `OFFGRID_PRO=0`. Assert new surfaces render. Screenshot key states via `page.screenshot({ path: 'e2e/screenshots/<name>.png' })`; include those screenshots in the PR body.
@@ -69,7 +70,7 @@ When iterating (a request, a fix, a tweak the user just confirmed), add a test t
69
70
70
71
E2E and screenshot/video capture (including the Provit capture harness) run the app on a **fresh temp `OFFGRID_USER_DATA` profile** and must use **synthetic demo data only — never a real profile, never upload real user data.**
71
72
72
-
-**Seed with the demo script.** A blank profile is EMPTY, so any flow that *generates* (chat, especially the "All memory" scope) will error with **"Sorry, something went wrong…"** — this is a **profile/RAG gap, not a bug**: no seeded memory store means the memory path throws before streaming. Launch the app with **`OFFGRID_SEED=force`**(see `src/main/index.ts` → `dev-seed.ts:seedDemo`) so the profile has synthetic chats/knowledge/memory and generation actually works. Use this for any e2e that exercises chat/generation.
73
+
-**Seed with the demo script — BOTH seeders.** A blank profile is EMPTY, so any flow that *generates* (chat, especially the "All memory" scope) will error with **"Sorry, something went wrong…"** — a **profile/RAG gap, not a bug**: no seeded memory store means the memory path throws before streaming. There are TWO independent seeders and a flow may need both: **`OFFGRID_SEED=force`**→ core `seedDemo` (`src/main/index.ts` → `dev-seed.ts`) seeds chats / knowledge / RAG memory (this is what "All memory" chat queries); **`OFFGRID_SEED_PRO=force`** → pro `seedProDemo` (`pro/main/index.ts` → `pro/main/dev-seed.ts`) seeds observations / entities / clipboard / replay frames. `npm run demo` sets both — use it (or set both env vars) for any capture that exercises chat/generation.
73
74
-**Model ports are single-owner.** Only one app instance can bind the model engine ports (`:7878` gateway, `:8439` llama-server, `:7879`). A running `npm run dev` will block a second capture instance's engine → generation errors that look like a bug but aren't. Free the ports (stop the dev app) before an e2e capture, or the recording exercises the error path only.
74
75
-**Never upload private data.** Screenshots/video from real-profile runs (real chats, memories) must not be published. Capture runs must be synthetic-seeded so anything that lands in a PR or the public showcase is demo data.
0 commit comments