feat: integrate DB with Open/Close/Put/Delete/Get

- Add db.go with DB struct: Open/Close/Put/Delete/Get/GetDurableSequence/IsWriteStopped
- Add db_test.go with lifecycle, put/get, delete, recovery, and corruption tests
- Extract sentinel errors to errkit/ leaf package to break import cycle (wal -> go_kv)
- Update wal/sequence.go, wal/writer.go to import errkit instead of root package
- Root errors.go re-exports from errkit for backward compatibility

Phase 1 Wave 4d complete (T19).
This commit is contained in:
dailz
2026-06-12 14:10:56 +08:00
parent 294ab9181f
commit 0fe1530e25
9 changed files with 415 additions and 37 deletions
+28 -2
View File
@@ -8,7 +8,7 @@
"plan_name": "phase1-wal",
"status": "active",
"started_at": "2026-06-12T05:09:32.588Z",
"updated_at": "2026-06-12T06:02:11.867Z",
"updated_at": "2026-06-12T06:09:22.858Z",
"session_ids": [
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
],
@@ -120,6 +120,19 @@
"status": "completed",
"ended_at": "2026-06-12T06:02:11.867Z",
"elapsed_ms": 16713
},
"todo:19": {
"task_key": "todo:19",
"task_label": "19",
"task_title": "DB integration: Open/Close/Put/Delete/Get",
"session_id": "opencode:ses_1459293beffeLZq5Ac22xWZfBy",
"agent": "Sisyphus-Junior",
"category": "deep",
"updated_at": "2026-06-12T06:09:22.858Z",
"started_at": "2026-06-12T06:07:14.120Z",
"status": "completed",
"ended_at": "2026-06-12T06:09:22.858Z",
"elapsed_ms": 128738
}
}
}
@@ -127,7 +140,7 @@
"active_plan": "/home/dailz/workspace/src/go-kv/.omo/plans/phase1-wal.md",
"started_at": "2026-06-12T05:09:32.588Z",
"status": "active",
"updated_at": "2026-06-12T06:02:11.867Z",
"updated_at": "2026-06-12T06:09:22.858Z",
"session_ids": [
"opencode:ses_145c3bae9ffeTB2zbsTym0Cev8"
],
@@ -239,6 +252,19 @@
"status": "completed",
"ended_at": "2026-06-12T06:02:11.867Z",
"elapsed_ms": 16713
},
"todo:19": {
"task_key": "todo:19",
"task_label": "19",
"task_title": "DB integration: Open/Close/Put/Delete/Get",
"session_id": "opencode:ses_1459293beffeLZq5Ac22xWZfBy",
"agent": "Sisyphus-Junior",
"category": "deep",
"updated_at": "2026-06-12T06:09:22.858Z",
"started_at": "2026-06-12T06:07:14.120Z",
"status": "completed",
"ended_at": "2026-06-12T06:09:22.858Z",
"elapsed_ms": 128738
}
},
"agent": "atlas"
+1 -1
View File
@@ -1412,7 +1412,7 @@ Max Concurrent: 6 (Wave 1b)
**Commit**: YES
- Message: `feat: implement MANIFEST stub and CURRENT file`
- [ ] 19. DB integration: Open/Close/Put/Delete/Get
- [x] 19. DB integration: Open/Close/Put/Delete/Get
**What to do**:
- 创建 `db.go``DB` 结构体和核心 API