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: plans/qihse_persistence_layer.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,9 @@ Current landed state:
13
13
- PR-2 is complete for the planned WAL structure: file-backed adds write ADD and COMMIT WAL records, records carry previous-record offsets, open replays committed batches newer than the snapshot, and writable open truncates torn or uncommitted WAL tails.
14
14
- PR-3 read-only mmap candidate work now covers `vectors.qvec`, `metadata.qmeta`, validated `idmap.qid`, and validated direct mapping of `index.qidx` for clean snapshots.
15
15
- PR-4 physical compaction is complete for the current row model: `compact()` rewrites the in-memory table, vector blob, and metadata arena with live rows only, then publishes the compact snapshot and regenerated `idmap.qid`/`vectors.qtri` through the existing atomic flush path.
16
-
- PR-4 compaction fixtures now verify compact-after-mutation row/index/idmap/trinary behavior, high-ID idmap consistency, and stale/corrupt derived sidecar rebuild.
16
+
- PR-4 compaction fixtures now verify compact-after-mutation row/index/idmap/trinary behavior, high-ID idmap consistency, stale/corrupt derived sidecar rebuild, stale `.tmp` file ignore-on-open behavior, and WAL mutation compaction clearing WAL without resurrecting pruned rows.
17
17
- PR-5 search-path benchmark scaffolding is present: `make bench-trinary-search-path` compares full float32 DB search against DB-backed `vectors.qtri` candidate selection plus exact float32 rerank and reports recall/order/latency. Pure trinary storage remains out of scope.
18
-
- Latest pushed checkpoint before this slice: `7df0e3e` on `codex/qihse-file-persistence`.
18
+
- Latest pushed checkpoint before this slice: `b8a37a3` on `codex/qihse-file-persistence`.
- PR-3: validate the newly landed `index.qidx` mmap path under more corruption and compatibility cases, then decide whether UMA should wrap mapped rows directly or keep the current vector DB-owned mapping path.
48
-
- PR-4: add compaction crash/recovery fixtures around tmp files, manifestpublication, and WAL-plus-compaction interactions. Public mutation APIs, mutation WAL replay/truncation, and physical compaction are present.
48
+
- PR-4: add deeper manifest-publication crash fixtures if needed. Public mutation APIs, mutation WAL replay/truncation, physical compaction, stale temp-file handling coverage, and WAL-plus-compaction interaction coverage are present.
49
49
- PR-5: use the search-path benchmark to drive optional vector DB trinary acceleration. Current benchmark proves recall/order on the synthetic fixture and exposes latency variance; it is not yet a production search-path optimization.
50
50
- PR-6: add persisted anchor hints and optimizer statistics only as rebuildable, explicit-format sidecars.
Copy file name to clipboardExpand all lines: plans/qihse_persistence_pr0_pr1_enhancement.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,9 @@ Current implementation state:
29
29
- PR-2 WAL/recovery hardening is implemented for ADD/COMMIT records, previous-record offsets, committed-batch replay, and writable torn-tail truncation.
30
30
- PR-3 candidate work has started: read-only mmap mode maps `vectors.qvec`, `metadata.qmeta`, validated `idmap.qid`, and validated direct `index.qidx` rows for clean snapshots.
31
31
- PR-4 physical compaction is present: delete/update/upsert API symbols write committed WAL records, replay committed mutation batches newer than the snapshot, writable open truncates torn/uncommitted mutation tails, and `compact()` rewrites live rows only before publishing the regenerated snapshot/sidecars.
32
-
- PR-4 compaction fixture coverage now enforces row/index/live/idmap counts after physical pruning, high unsigned IDs, valid `vectors.qtri` after compact, and stale/corrupt derived sidecar rebuild.
32
+
- PR-4 compaction fixture coverage now enforces row/index/live/idmap counts after physical pruning, high unsigned IDs, valid `vectors.qtri` after compact, stale/corrupt derived sidecar rebuild, stale `.tmp` file ignore-on-open behavior, and WAL mutation compaction clearing WAL without resurrecting pruned rows.
33
33
- PR-5 search-path benchmark scaffolding is present: standalone tryte top-k exists with `make bench-trinary-codec`, DB-backed candidate generation plus exact float32 rerank exists with `make bench-trinary-db-candidate`, and `make bench-trinary-search-path` compares full float32 DB search against trinary candidates plus rerank with recall/order/latency reporting.
34
-
- Latest pushed checkpoint before this slice: `7df0e3e` on `codex/qihse-file-persistence`.
34
+
- Latest pushed checkpoint before this slice: `b8a37a3` on `codex/qihse-file-persistence`.
35
35
-`qihse/qihse_vector_db.c` was restored after a disk-full truncation and now contains the native persistence implementation.
36
36
-`qihse_vector_db_create(..., db_path)` opens a file-backed native database.
37
37
-`qihse_vector_db_open()` supports ephemeral, file-copy, read-only, and read-only mmap modes.
- Writable mmap, production vector DB trinary acceleration, pure trinary storage, compaction crash fixtures, and anchor persistence are still deferred.
548
+
- Writable mmap, production vector DB trinary acceleration, pure trinary storage, deeper manifest-publication crash fixtures, and anchor persistence are still deferred.
549
549
550
550
## Follow-On Phases
551
551
552
552
After the current checkpoint:
553
553
554
554
- PR-3: harden mmap compatibility and corruption tests now that read-only `vectors.qvec`, `metadata.qmeta`, `idmap.qid`, and `index.qidx` mapping are present for clean snapshots.
555
-
- PR-4: public delete/update/upsert API behavior, mutation WAL replay/truncation, and physical tombstone compactionare implemented and covered by persistence tests. Compaction crash/recovery fixtures remain.
555
+
- PR-4: public delete/update/upsert API behavior, mutation WAL replay/truncation, physical tombstone compaction, stale temp-file ignore behavior, and WAL-plus-compaction interactions are implemented and covered by persistence tests. Deeper manifest-publication crash fixtures can still be added.
556
556
- PR-5: DB-backed candidate generation, exact rerank, and search-path benchmark scaffolding are present; production search-path acceleration, broader recall measurement, and optional pure trinary storage remain.
557
557
- PR-6: optional persisted anchor hints and optimizer statistics as rebuildable sidecars.
558
558
559
559
## PR-4: Mutation and Compaction Plan
560
560
561
561
PR-4 should make mutation explicit without changing QIHSE's program boundary. The public contract belongs to native QIHSE; Framewerx and other callers remain clients.
562
562
563
-
Status: the public delete/update/upsert declarations are staged in `qihse/qihse_vector_db.h` and the native implementation is present in `qihse/qihse_vector_db.c`. Executable tests now cover delete, update, upsert, read-only rejection, compact-after-mutation search correctness, unflushed mutation WAL replay, and physical compact row pruning.
563
+
Status: the public delete/update/upsert declarations are staged in `qihse/qihse_vector_db.h` and the native implementation is present in `qihse/qihse_vector_db.c`. Executable tests now cover delete, update, upsert, read-only rejection, compact-after-mutation search correctness, unflushed mutation WAL replay, physical compact row pruning, stale compact temp files, and WAL mutation compaction.
564
564
565
565
### Public API
566
566
@@ -704,23 +704,21 @@ The persistence test file carries a compile-safe TODO backlog for these cases. C
704
704
705
705
Use this split when resuming the remaining plan with multiple agents. QIHSE remains its own native program; none of these tasks should introduce Framewerx-specific persistence behavior.
0 commit comments