Skip to content

Commit 44dbcb3

Browse files
test(privacy): verify full wipe across core and Pro
1 parent 8a8289d commit 44dbcb3

4 files changed

Lines changed: 25 additions & 14 deletions

File tree

docs/FUNCTIONAL_TEST_STRATEGY.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ really a test of a third-party framework or engine we merely depend on:
2828
75% branches / 77% functions / 79% lines on the TESTABLE surface (ratchet floor 77/74/76/78,
2929
climbing toward the 85% goal). ~1200 unit/integration tests.
3030
- **Swift, `npm run test:swift`:** 37 XCTest cases over the text-extractor pure classifiers.
31-
- **DB integration, `npm run test:db`:** 61 cases over `database.ts` + `rag/store.ts` against a
32-
real temp SQLite. Kept OUT of the default gate because it needs `better-sqlite3` rebuilt for
33-
the node ABI (the app builds it for Electron's ABI); the script rebuilds + restores. KNOWN GAP:
34-
wire `test:db` into CI as an isolated step so database.ts coverage is enforced there.
31+
- **DB integration, `npm run test:db`:** 104 cases over core and Pro persistence against real
32+
temp SQLite. Kept OUT of the default gate because it needs `better-sqlite3` rebuilt for the
33+
node ABI (the app builds it for Electron's ABI); the script rebuilds + restores. KNOWN GAP:
34+
wire `test:db` into CI as an isolated step so database coverage is enforced there.
3535
- The default coverage gate EXCLUDES (with a real alternative suite each): vendored/built
3636
(`packages/**`, `**/dist/**`); native/DB/spawn shells (database.ts, rag/store.ts, imagegen.ts,
3737
mflux.ts, sd-server.ts, model-server.ts, media-server.ts, whisper/parakeet/whisper-server) -

docs/P0_P2_INTEGRATION_COVERAGE.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ manual claim does not count as complete integration coverage.
88
## Current status - 2026-07-17
99

1010
- Scope: 155 journeys - 74 P0, 71 P1, and 10 P2.
11-
- Covered by direct integration or E2E evidence: 20 - 13 P0, 6 P1, and 1 P2.
12-
- Left: 135 - including partially covered journeys whose exact release behavior is not yet proven.
11+
- Covered by direct integration or E2E evidence: 21 - 14 P0, 6 P1, and 1 P2.
12+
- Left: 134 - including partially covered journeys whose exact release behavior is not yet proven.
1313
- Green gates today:
1414
- `npm test`: 203 files passed, 1 skipped; 2,190 tests passed, 1 skipped.
1515
- `npm run test:coverage`: 96.77% statements, 91.54% branches, 96.25% functions,
1616
97.55% lines.
17-
- `npm run test:db`: 12 files and 103 real SQLite integration tests passed; Electron ABI
17+
- `npm run test:db`: 13 files and 104 real SQLite integration tests passed; Electron ABI
1818
restored afterward.
1919
- `npm run test:e2e`: 22 Playwright Electron tests passed against fresh synthetic temp profiles.
2020
- Both TypeScript projects pass.
@@ -51,6 +51,10 @@ manual claim does not count as complete integration coverage.
5151
attachment persistence across lock and unlock.
5252
- #128 - Vault recovery and backup. `vault-service.test.ts` and `vault-recovery.test.ts` exercise
5353
real KDBX export bytes, recovery setup, wrong phrases, and recovery to a new password.
54+
- #136 - Delete all is complete. Core and Pro DB integration tests seed projects, chats, memory,
55+
knowledge, connectors, encrypted tokens, profile data, every registered Pro table, and every
56+
personal-data directory. They run the real delete-all registry, close and reopen the encrypted
57+
database, and verify personal data stays gone while models and ordinary preferences survive.
5458

5559
## Covered P1 journeys
5660

@@ -154,10 +158,10 @@ manual claim does not count as complete integration coverage.
154158

155159
- #129 - Runtime residency toggles persist; #130 - Chat residency stays required; #131 - Resource
156160
mode applies; #132 - Settings survive relaunch; #133 - Storage usage is truthful; #134 - Clear
157-
cache preserves user data; #135 - Delete category is scoped; #136 - Delete all is complete; #137
158-
- Core locked Pro tabs; #138 - Pro license activates; #139 - Invalid or exhausted license fails
159-
clearly; #140 - Offline entitlement behavior; #141 - Core and Pro override behavior; #142 - Manual
160-
update check; #143 - Update channel persists.
161+
cache preserves user data; #135 - Delete category is scoped; #137 - Core locked Pro tabs; #138 -
162+
Pro license activates; #139 - Invalid or exhausted license fails
163+
clearly; #140 - Offline entitlement behavior; #141 - Core and Pro override behavior; #142 - Manual
164+
update check; #143 - Update channel persists.
161165

162166
## Left - resilience and desktop polish
163167

scripts/test-db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# DB integration tests (src/main/__tests__/*.dbtest.ts) exercise the real data layer against
2+
# DB integration tests (core + pro *.dbtest.ts) exercise the real data layer against
33
# a temp SQLite DB. They need better-sqlite3-multiple-ciphers built for the TEST RUNNER's node
44
# ABI - but the app builds it for ELECTRON's ABI (via electron-builder install-app-deps). So:
55
# rebuild for node, run the tests, then ALWAYS restore Electron's build - even on failure or

vitest.db.config.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
import { defineConfig } from 'vitest/config'
2+
import { resolve } from 'path'
23

3-
// Dedicated config for the DB integration tests (*.dbtest.ts). Kept separate from the
4+
// Dedicated config for core + Pro DB integration tests (*.dbtest.ts). Kept separate from the
45
// default vitest run because they load the better-sqlite3 native module (see
56
// scripts/test-db.sh). Run via `npm run test:db`.
67
export default defineConfig({
8+
resolve: {
9+
alias: {
10+
'@offgrid/core': resolve(__dirname, 'src'),
11+
'@offgrid/pro': resolve(__dirname, 'pro')
12+
}
13+
},
714
test: {
8-
include: ['src/main/__tests__/*.dbtest.ts'],
15+
include: ['src/main/__tests__/*.dbtest.ts', 'pro/main/__tests__/*.dbtest.ts'],
916
exclude: ['node_modules/**', 'out/**', 'e2e/**']
1017
}
1118
})

0 commit comments

Comments
 (0)