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
Copy file name to clipboardExpand all lines: crates/db-core2/AGENTS.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,3 +48,9 @@
48
48
- If the pool policy changes between single-connection and multi-connection, the hook path should remain correct without upper-layer changes.
49
49
- In-memory databases should still be treated carefully; `max_connections(1)` is the safe default unless shared-memory behavior is explicitly intended.
50
50
- If code needs to answer "what tables does this SQL depend on?" or "which subscribers should rerun?", it belongs above this crate.
51
+
52
+
## Test Ownership
53
+
54
+
- Put tests here when the behavior is about database opening, connection policy, migration failure handling, cloudsync wiring, or raw table-change hook behavior.
55
+
- Prefer temp-database integration tests here over higher-level plugin tests when verifying pooled connection semantics.
56
+
- Do not test subscription reruns, dependency extraction, transport delivery, or Tauri command behavior here.
Copy file name to clipboardExpand all lines: crates/db-live-query/AGENTS.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
-`db-live-query` is the reusable live-query service layer.
6
6
- It executes SQL, analyzes query dependencies, tracks subscriptions, reruns affected queries, and serializes rows for sinks.
7
-
- It consumes raw table-change signals from `db-core2` and pure watch indexing from `db-watch`.
7
+
- It consumes raw table-change signals from `db-core2` and maintains its own watch indexing (`watch.rs`).
8
8
9
9
## This Crate Owns
10
10
@@ -36,7 +36,7 @@
36
36
37
37
## Dependency Direction
38
38
39
-
- This crate may depend on `db-core2` and `db-watch`.
39
+
- This crate may depend on `db-core2`.
40
40
-`plugins/db` may depend on this crate.
41
41
- This crate must not depend on Tauri or app-specific UI/runtime layers.
42
42
@@ -46,3 +46,9 @@
46
46
- Raw SQLite hook installation and pooled connection setup belong below this crate in `db-core2`.
47
47
- Tauri channels, app bootstrap, and JS-facing event types belong above this crate in `plugins/db`.
48
48
- If this layer ever becomes app-specific, it should be split again rather than letting transport or product logic leak inward.
49
+
50
+
## Test Ownership
51
+
52
+
- Put tests here when the behavior is about dependency extraction, reactive vs non-reactive classification, rerun targeting, unsubscribe semantics, stale-sink cleanup, or JSON row serialization.
53
+
- These tests may use a real temp database plus a fake sink, but they should not depend on Tauri transport types.
54
+
- Higher layers should not duplicate this crate's rerun and invalidation tests unless they are specifically proving adapter integration.
0 commit comments