Commit c91ad56
authored
feat: Phase 8 — Embedded maintenance operations (rebuild, compact, WAL prune) (#80)
* docs(08): capture phase context
* docs(state): record phase 8 context session
* docs(08): research embedded maintenance phase domain
* docs(08-embedded-maintenance): create phase plan
Two plans in 2 waves:
- Plan 01: Expand EmbeddedSession with callback slots, wire JNA + Panama backends
- Plan 02: Integration tests for embedded maintenance in both backends
* fix(08): revise plans based on checker feedback
Add Java lint step (gradle :core:check :jna:check 🇵🇦check) to
08-01 verification and Task 2 verify block per CLAUDE.md compliance.
Document D-09 data-seeded test deferral in 08-02 objective and task
actions — collection CRUD unavailable until FUTURE-03.
* docs(08): add validation strategy
* feat(08-01): expand EmbeddedSession with callback slots and maintenance methods
- Add 5 BiFunction callback slots for maintenance operations
- Add 7 public maintenance methods (5 primary + 2 convenience overloads)
- Add ensureOpen() guard pattern matching ServerSession
- Constructor expands from 2 to 7 parameters with null checks
* feat(08-01): wire JNA and Panama backends with maintenance symbol bindings
- Add 5 chroma_embedded_* symbol declarations to JNA JnaBindings interface
- Add 5 MethodHandle fields to Panama Ffi record with eager binding
- Both doStartEmbedded methods pass callFfiJson lambdas to expanded constructor
- Fix EmbeddedSessionTest to use 7-parameter constructor
* docs(08-01): complete embedded maintenance wiring plan
- Create 08-01-SUMMARY.md with execution results
- Update STATE.md with phase 8 position and decisions
- Update ROADMAP.md progress (1/2 plans complete)
- Mark EMNT-01 through EMNT-04 complete in REQUIREMENTS.md
* test(08-02): add JNA embedded maintenance integration tests
- 7 tests covering smoke, error paths, input validation, closed-session guards
- Verifies rebuildCollection, compactAll, compactCollection, pruneAllWAL, pruneCollectionWAL
* test(08-02): add Panama embedded maintenance integration tests
- 7 tests mirroring JNA coverage for smoke, error paths, validation, closed-session guards
- Verifies rebuildCollection, compactAll, compactCollection, pruneAllWAL, pruneCollectionWAL
* docs(08-02): complete embedded maintenance integration tests plan
- SUMMARY.md with 14 tests (7 JNA + 7 Panama) coverage
- STATE.md updated with phase 08 completion
- ROADMAP.md marks phase 08 complete (2/2 plans)
- REQUIREMENTS.md marks EMNT-05 complete
* docs(phase-08): complete phase execution
* docs(phase-08): evolve PROJECT.md after phase completion
* test(08): complete UAT - 5 passed, 0 issues
* docs(08): ship phase 08 — PR #80
* fix(08): address PR review findings — dead name param, error handling, tests
- Remove dead `name` parameter from rebuildCollection and pruneCollectionWAL
(options object already carries the name; old API silently discarded it)
- Add pruneCollectionWAL(String) convenience overload for API parity
- Log readLastError failures in PanamaChromaRuntime instead of silent null
- Use addSuppressed for callFfiVoid drain catch in AbstractChromaRuntime
- Replace null-returning test stubs with UnsupportedOperationException
- Add 13 unit tests: constructor null-rejection (5), input validation (5),
convenience overload delegation (2), existing lifecycle (6 unchanged)
- Update integration tests and ServerSession stubs for new signatures
* fix(08): address PR review — stale stubs, type consistency, API symmetry
- Update 3 stale "Phase 8" stub messages to "Phase 10" in ServerSession
- Add compactCollection(String) convenience overload to match rebuild/prune
- Add Javadoc on pruneAllWAL noting name field is ignored
- Change collectionCount from u32/int to u64/long across Rust, Go, Java
- Change WAL prune warning from Option<String>/String to Vec<String>/List
* test(08): add compactCollection delegation test and convenience overload smoke tests
Complete the symmetric delegation test set in EmbeddedSessionTest and
exercise the convenience overload FFI path in JNA/Panama integration tests.1 parent 3da2a31 commit c91ad56
32 files changed
Lines changed: 2752 additions & 86 deletions
File tree
- .planning
- phases/08-embedded-maintenance
- internal/runtime
- java
- core/src
- main/java/tech/amikos/chroma/local/core
- test/java/tech/amikos/chroma/local/core
- jna/src
- main/java/tech/amikos/chroma/local/jna
- test/java/tech/amikos/chroma/local/jna
- panama/src
- main/java/tech/amikos/chroma/local/panama
- test/java/tech/amikos/chroma/local/panama
- shim/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
127 | | - | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| |||
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
66 | | - | |
67 | | - | |
| 72 | + | |
| 73 | + | |
68 | 74 | | |
0 commit comments