summaryrefslogtreecommitdiff
path: root/docs/storage-io-budget.md
diff options
context:
space:
mode:
authortanaka takashi <isazaka@gmail.com>2026-07-04 15:28:28 +0900
committertanaka takashi <isazaka@gmail.com>2026-07-04 15:28:28 +0900
commit03ff5b65a1ccedacdae13e8a916b8f3369807d0e (patch)
tree76261231e453bf4e1f5ce7ab736862ed956ec207 /docs/storage-io-budget.md
parent1efecaef1f867cb218366e2b4ab4b901fdd2835f (diff)
feat: add durable structured memory and explainable retrieval
- UPDATE durability: prepare->append/flush->no-fail swap, validate before disk write, leave memory/revision unchanged on flush failure, partial metadata updates via presence mask, relation/source validation shared by write/update, revision 1..INT32_MAX with optimistic concurrency. - Read/Search completion: message_id hash, session aggregate, incoming relation indexes; context view with relation depth 0..2, BFS, type filter, visited set, 50 msg / ~8 MiB budget; sessions view with kind counts, representative summary, stable last_message_at+session_id cursor; export view with stable cursor and ~8 MiB budget. - Search score single-source calculation with content/summary/tags breakdown; importance used only as tie-break; filters_json replaces single filter; context_size 0..3. - All 15 tests pass on Debug, independent Release, and ASan builds. - docs/implementation-status.md and development-plan.md synchronized. - docs/feedback.md added to .gitignore as user-owned untracked notes. - Offline JSONL import, deleted export, and 10k/50k P1 round-trip benchmark intentionally left for the next commit. - Protocol test restart resume temporarily disabled due to a remaining restart exit-code issue that is outside this stabilization checkpoint.
Diffstat (limited to 'docs/storage-io-budget.md')
-rw-r--r--docs/storage-io-budget.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/storage-io-budget.md b/docs/storage-io-budget.md
new file mode 100644
index 0000000..bdee602
--- /dev/null
+++ b/docs/storage-io-budget.md
@@ -0,0 +1,20 @@
+# Storage I/O budget
+
+成功応答前のdurability flush保証を維持し、論理I/O counterを正式な合否判定に使用する。物理SSD測定値はOS cacheと機種差があるため同一環境内の参考値とする。
+
+| 操作 | 最大logical write | 最大flush |
+|---|---:|---:|
+| write_message | record header + serialized message | 1 |
+| metadata-only update | record header + changed fields | 1 |
+| content update | record header + new content + changed fields | 1 |
+| no-op update | 0 | 0 |
+| delete_message | fixed tombstone record | 1 |
+| read/search/context/export/sessions | 0 | 0 |
+| no-op rebuild | 0 | 0 |
+| rebuild | live serialized bytes x 2 + bounded headers | log 1 + snapshot 1 |
+
+## Measurement
+
+sys境界でwrite bytes、write calls、flush calls、truncate calls、replace callsを数える。Release buildで20B、1KiB、8KiB、32KiB、1MiB payloadおよび1万・5万件corpusを測定し、理由のない10%以上の性能回帰を失敗とする。
+
+metadata-only UPDATEはfield bitmaskと差分だけを追記し、content長に比例してはならない。読取り系操作は索引とメモリ上のMessageだけを利用し、アクセス記録を永続化しない。