ltcai 10.10.0 → 11.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/README.md +45 -42
  2. package/docs/CHANGELOG.md +40 -0
  3. package/docs/COMMUNITY_AND_PLUGINS.md +1 -1
  4. package/docs/DEVELOPMENT.md +1 -1
  5. package/docs/ONBOARDING.md +1 -1
  6. package/docs/OPERATIONS.md +1 -1
  7. package/docs/PERFORMANCE.md +78 -7
  8. package/docs/TRUST_MODEL.md +1 -1
  9. package/docs/WHY_LATTICE.md +1 -1
  10. package/docs/kg-schema.md +1 -1
  11. package/docs/v11.1.0_PRODUCT_INTELLIGENCE_PLAN.md +313 -0
  12. package/lattice_brain/__init__.py +1 -1
  13. package/lattice_brain/graph/_kg_contract.py +11 -0
  14. package/lattice_brain/graph/curator.py +1 -1
  15. package/lattice_brain/graph/fusion.py +184 -3
  16. package/lattice_brain/graph/proactive.py +138 -1
  17. package/lattice_brain/graph/projection.py +10 -2
  18. package/lattice_brain/graph/retrieval.py +137 -7
  19. package/lattice_brain/graph/retrieval_docgen.py +20 -20
  20. package/lattice_brain/graph/retrieval_policy.py +6 -0
  21. package/lattice_brain/graph/retrieval_reads.py +188 -1
  22. package/lattice_brain/graph/retrieval_vector.py +474 -110
  23. package/lattice_brain/graph/schema.py +125 -2
  24. package/lattice_brain/graph/vector_index/__init__.py +85 -0
  25. package/lattice_brain/graph/vector_index/base.py +170 -0
  26. package/lattice_brain/graph/vector_index/brute_force.py +114 -0
  27. package/lattice_brain/graph/vector_index/hnsw.py +293 -0
  28. package/lattice_brain/graph/vector_index/jobs.py +287 -0
  29. package/lattice_brain/graph/vector_index/quantized.py +151 -0
  30. package/lattice_brain/graph/vector_index/selector.py +131 -0
  31. package/lattice_brain/ingestion.py +50 -3
  32. package/lattice_brain/portability.py +654 -2
  33. package/lattice_brain/runtime/agent_runtime.py +1 -1
  34. package/lattice_brain/runtime/contracts.py +1 -1
  35. package/lattice_brain/runtime/multi_agent.py +1 -1
  36. package/lattice_brain/self_model.py +620 -0
  37. package/lattice_brain/synthesis.py +801 -0
  38. package/latticeai/__init__.py +1 -1
  39. package/latticeai/api/brain_intelligence.py +83 -1
  40. package/latticeai/api/chat_stream.py +4 -1
  41. package/latticeai/api/local_files.py +62 -0
  42. package/latticeai/api/models.py +1 -1
  43. package/latticeai/api/portability.py +130 -1
  44. package/latticeai/api/security_dashboard.py +48 -13
  45. package/latticeai/api/voice_capture.py +4 -1
  46. package/latticeai/api/workspace.py +11 -5
  47. package/latticeai/core/embedding_providers.py +20 -1
  48. package/latticeai/core/legacy_compatibility.py +1 -1
  49. package/latticeai/core/marketplace.py +1 -1
  50. package/latticeai/core/messages.py +14 -0
  51. package/latticeai/core/model_compat.py +2 -2
  52. package/latticeai/core/tool_registry.py +0 -7
  53. package/latticeai/core/workspace_os_constants.py +1 -1
  54. package/latticeai/core/workspace_os_utils.py +4 -50
  55. package/latticeai/core/workspace_review_items.py +12 -1
  56. package/latticeai/integrations/telegram_bot.py +28 -10
  57. package/latticeai/models/router.py +1 -1
  58. package/latticeai/runtime/access_runtime.py +1 -1
  59. package/latticeai/runtime/network_boundary_wiring.py +9 -5
  60. package/latticeai/runtime/permission_mode_wiring.py +9 -6
  61. package/latticeai/runtime/router_registration.py +3 -0
  62. package/latticeai/services/architecture_readiness.py +1 -1
  63. package/latticeai/services/brain_intelligence.py +253 -0
  64. package/latticeai/services/memory_service.py +1 -1
  65. package/latticeai/services/model_catalog.py +4 -3
  66. package/latticeai/services/model_engines.py +28 -14
  67. package/latticeai/services/obsidian_bridge.py +618 -0
  68. package/latticeai/services/product_readiness.py +1 -1
  69. package/latticeai/tools/filesystem.py +4 -1
  70. package/package.json +1 -1
  71. package/scripts/bench_vector_index.py +295 -0
  72. package/scripts/check_current_release_docs.mjs +1 -1
  73. package/scripts/release_screen_claims.json +17 -0
  74. package/src-tauri/Cargo.lock +1 -1
  75. package/src-tauri/Cargo.toml +1 -1
  76. package/src-tauri/tauri.conf.json +1 -1
  77. package/static/app/asset-manifest.json +37 -37
  78. package/static/app/assets/{Act-CC8SpNRm.js → Act-D4zSxFR-.js} +1 -1
  79. package/static/app/assets/{AdminConsole-DGIY_Tb_.js → AdminConsole-w5jBfPt2.js} +1 -1
  80. package/static/app/assets/{Brain-BDSC2Mol.js → Brain-C2EqQg74.js} +1 -1
  81. package/static/app/assets/{BrainHome-BYgYp3ON.js → BrainHome-CvXS6XiQ.js} +1 -1
  82. package/static/app/assets/{BrainSignals-DYwVFmcO.js → BrainSignals-DOE_KhOU.js} +1 -1
  83. package/static/app/assets/{Capture-ClcKLsmI.js → Capture-DPqpGK8d.js} +1 -1
  84. package/static/app/assets/{CommandPalette-DpwbyF1S.js → CommandPalette-CNf7h5fp.js} +1 -1
  85. package/static/app/assets/{Library-D8VNtffM.js → Library-BN0HYOfc.js} +1 -1
  86. package/static/app/assets/{LivingBrain-CeWwc0NN.js → LivingBrain-Dfq_wEDI.js} +1 -1
  87. package/static/app/assets/{ProductFlow-CS5CCM4t.js → ProductFlow-B-3O0rNV.js} +1 -1
  88. package/static/app/assets/{ReviewCard-Bap4yPfI.js → ReviewCard-gZ-tdqFM.js} +1 -1
  89. package/static/app/assets/{System-odPxU1YL.js → System-BElUcSSw.js} +1 -1
  90. package/static/app/assets/arrow-left-CFNIMjhv.js +1 -0
  91. package/static/app/assets/{bot-CmvhqTeF.js → bot--qYHMtkP.js} +1 -1
  92. package/static/app/assets/{brain-DLT9uuGq.js → brain-DDCLjRqO.js} +1 -1
  93. package/static/app/assets/{button-DyppYhFH.js → button-51Z3rsuv.js} +1 -1
  94. package/static/app/assets/{circle-pause-Bm5z7EBI.js → circle-pause-CMIiMaQl.js} +1 -1
  95. package/static/app/assets/{circle-play-GjKdH0Fg.js → circle-play-DZoO_cfG.js} +1 -1
  96. package/static/app/assets/{cpu-CuVMv-F5.js → cpu-Bs6uc9W9.js} +1 -1
  97. package/static/app/assets/{download-C9_946tf.js → download-G-2olkWz.js} +1 -1
  98. package/static/app/assets/{folder-open-B3QKdxib.js → folder-open-CTOspnmb.js} +1 -1
  99. package/static/app/assets/{hard-drive-BwW9Hx4r.js → hard-drive-CewHWJhn.js} +1 -1
  100. package/static/app/assets/index-CkzokZAj.css +2 -0
  101. package/static/app/assets/{index-BrUQ-bF8.js → index-D7Rr-J2Y.js} +3 -3
  102. package/static/app/assets/{input-Db2Hw2VH.js → input-D4w_BZWl.js} +1 -1
  103. package/static/app/assets/{permissionCopy-BpbIHRio.js → permissionCopy-CosBEXAZ.js} +1 -1
  104. package/static/app/assets/{primitives-4B_Ynf7r.js → primitives-d0g9pvzS.js} +1 -1
  105. package/static/app/assets/search-BLCYt75v.js +1 -0
  106. package/static/app/assets/{share-2-BgvRTDPJ.js → share-2-NmD7e_oV.js} +1 -1
  107. package/static/app/assets/{shield-alert-DWFLyykG.js → shield-alert-CcQeMuju.js} +1 -1
  108. package/static/app/assets/{textarea-Bk4vEqzT.js → textarea-BPAJDc-0.js} +1 -1
  109. package/static/app/assets/{useFocusTrap-CGRXEg_p.js → useFocusTrap-C7YLdTBC.js} +1 -1
  110. package/static/app/assets/{useQuery-CdPzp3_U.js → useQuery-DRyD9opW.js} +1 -1
  111. package/static/app/assets/{utils-orU8igel.js → utils-DG1_ExrP.js} +1 -1
  112. package/static/app/assets/{workspace-Brj2Ylb2.js → workspace-CWVf3gsI.js} +1 -1
  113. package/static/app/index.html +4 -4
  114. package/static/sw.js +1 -1
  115. package/static/app/assets/arrow-left-J47Yde1U.js +0 -1
  116. package/static/app/assets/index-CYb18LtP.css +0 -2
  117. package/static/app/assets/search-YH-7-x5Y.js +0 -1
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  [![CI Status](https://github.com/TaeSooPark-PTS/LatticeAI/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/TaeSooPark-PTS/LatticeAI/actions/workflows/ci.yml)
12
12
  [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
13
13
 
14
- ![v10.10.0 Living Brain walkthrough](output/release/v10.10.0/gifs/v10.10.0-living-brain-walkthrough.gif)
14
+ ![v11.0.1 Living Brain walkthrough](output/release/v11.0.1/gifs/v11.0.1-living-brain-walkthrough.gif)
15
15
 
16
16
  Chat, files, folders, notes, and web pages all flow into one durable knowledge
17
17
  graph on your computer. Any model — local MLX or cloud — can speak with that
@@ -24,10 +24,10 @@ memory. Nothing leaves your machine without explicit consent.
24
24
 
25
25
  | | |
26
26
  | --- | --- |
27
- | **Chat with a Brain that remembers** — every conversation grows durable, source-linked memory ![Brain Chat](output/release/v10.10.0/screenshots/04-brain-chat-home.png) | **See how knowledge connects** — a real relationship graph, not a file list ![Memory Graph](output/release/v10.10.0/screenshots/05-memory-graph.png) |
28
- | **Capture anything** — files, whole folders, notes, screenshots, web pages ![Capture](output/release/v10.10.0/screenshots/06-capture.png) | **Automate with review** — agent changes become proposals you approve first ![Review Center](output/release/v10.10.0/screenshots/12-review-center.png) |
29
- | **Pick a model in one click** — recommended local models for your hardware ![Recommended Models](output/release/v10.10.0/screenshots/02-recommended-models.png) | **Stay in control** — audit, roles, retention in a separate admin surface ![Admin Console](output/release/v10.10.0/screenshots/10-admin-console.png) |
30
- | **Watch a file become memory** — three named steps, not a pipeline diagram ![Material to memory](output/release/v10.10.0/screenshots/11-knowledge-journey.png) | **Say how much it may do alone** — one dial in plain words; dangerous actions stay blocked either way ![Settings](output/release/v10.10.0/screenshots/08-system.png) |
27
+ | **Chat with a Brain that remembers** — every conversation grows durable, source-linked memory ![Brain Chat](output/release/v11.0.1/screenshots/04-brain-chat-home.png) | **See how knowledge connects** — a real relationship graph, not a file list ![Memory Graph](output/release/v11.0.1/screenshots/05-memory-graph.png) |
28
+ | **Capture anything** — files, whole folders, notes, screenshots, web pages ![Capture](output/release/v11.0.1/screenshots/06-capture.png) | **Automate with review** — agent changes become proposals you approve first ![Review Center](output/release/v11.0.1/screenshots/12-review-center.png) |
29
+ | **Pick a model in one click** — recommended local models for your hardware ![Recommended Models](output/release/v11.0.1/screenshots/02-recommended-models.png) | **Stay in control** — audit, roles, retention in a separate admin surface ![Admin Console](output/release/v11.0.1/screenshots/10-admin-console.png) |
30
+ | **Watch a file become memory** — three named steps, not a pipeline diagram ![Material to memory](output/release/v11.0.1/screenshots/11-knowledge-journey.png) | **Say how much it may do alone** — one dial in plain words; dangerous actions stay blocked either way ![Settings](output/release/v11.0.1/screenshots/08-system.png) |
31
31
 
32
32
  ## Why Lattice AI
33
33
 
@@ -58,52 +58,53 @@ First-run flow — wake the Brain, pick the owner, load a recommended model:
58
58
 
59
59
  | | | |
60
60
  | --- | --- | --- |
61
- | ![Login](output/release/v10.10.0/screenshots/01-login.png) | ![Model install](output/release/v10.10.0/screenshots/03-install-load-progress.png) | ![Model library](output/release/v10.10.0/screenshots/07-model-library.png) |
61
+ | ![Login](output/release/v11.0.1/screenshots/01-login.png) | ![Model install](output/release/v11.0.1/screenshots/03-install-load-progress.png) | ![Model library](output/release/v11.0.1/screenshots/07-model-library.png) |
62
62
 
63
63
  Screenshot index and capture notes:
64
- [output/release/v10.10.0/SCREENSHOT_INDEX.md](output/release/v10.10.0/SCREENSHOT_INDEX.md)
64
+ [output/release/v11.0.1/SCREENSHOT_INDEX.md](output/release/v11.0.1/SCREENSHOT_INDEX.md)
65
65
 
66
66
  ## Current Release
67
67
 
68
- The current release is **10.10.0 — Quiet Station**:
69
-
70
- The Brain chat home used to greet you with everything at once — a stats
71
- sentence, six capture chips, a model banner, an autonomy strip, and two
72
- shelves stacked under the composer. 10.10.0 rebuilds it around one idea: the
73
- canvas holds the composer; everything else blooms on demand.
74
-
75
- - **Stats became a badge.** "기억 13 · 주제 299" sits as a chip beside the
76
- greeting; hovering (or clicking) it opens a summary popover with a small
77
- memory/topics/links graph and the memory-map shortcut. The sentence left the
78
- reading line.
79
- - **Capture folds behind one +.** 문서 · 이미지 · 파일 · 폴더 · 노트 · 웹 live
80
- in the composer's Add menu — hover opens it, click pins it, Escape and
81
- outside-click close it, and an in-flight upload keeps it open.
82
- - **The model banner became a status pill.** "모델 준비 필요" now sits on the
83
- hero's right edge with the one accented CTA; the full sentence rides on the
84
- tooltip and the accessible name.
85
- - **The shelves became a dock.** 대화 · 통계 · 기억 지도 sit on a quiet rail —
86
- a left column on desktop, a row above the fold elsewhere — and open a
87
- focus-trapped drawer over the screen instead of stacking cards under it.
88
- - **Borders got quieter, colour got scarcer.** Cards float on soft shadow
89
- instead of rules, and the warm accent appears exactly twice: the send
90
- button and the model CTA.
91
- - **The frontend test floor is 100%.** Every statement, branch, function and
92
- line under `frontend/src` is covered, `vitest` enforces the thresholds, and
93
- CI runs the coverage gate — a claim the suite fails loudly if it drifts.
94
- - **Release history starts at 9.0.0.** The 8.x notes left the tree; README,
95
- the notes index, RELEASE.md and the changelog all begin the public story at
96
- 9.0.0.
68
+ The current release is **11.0.1 — Both Branches**:
69
+
70
+ 11.0.0 put every line under test and documented, unfixed, the defects that
71
+ work surfaced. 11.0.1 is the settling of that account: **all eleven
72
+ documented defects are fixed, the code they proved dead is gone, and the CI
73
+ floor now holds 100% of branch arcs as well as lines.**
74
+
75
+ - **Every 11.0.0 finding is fixed.** The Telegram helper that sent the local
76
+ server's auth header to api.telegram.org, the unload-all that fabricated
77
+ success, the HTML inspector whose stylesheet collection could never fire,
78
+ the review-item id that collided within one second, the vLLM zombie that
79
+ read as "already running", the security dashboard's listing/detail
80
+ redaction gaps and invalid-JSON exports, the embedding `model_id` frozen at
81
+ the wrong dimension, the fast-path model-name mismatch, and the workspace
82
+ routes' dead literal and unreachable 404 arms. Each fix flipped the test
83
+ that had pinned the broken behaviour and gained a regression test.
84
+ - **Branch coverage joined the floor.** `branch = true` is now in the
85
+ coverage config: both directions of all 9,828 conditionals execute under
86
+ the suite (5,798 tests, up from 5,426), and `fail_under = 100` fails CI on
87
+ a single missed arc. Exclusions stay honest: eight reasoned
88
+ `pragma: no cover` lines and two reasoned `pragma: no branch` lines.
89
+ - **Dead code left the tree.** The unused auto-approved write-policy factory,
90
+ an unused snapshot-import normalizer, the workspace 404 arms shadowed by
91
+ the anti-enumeration 403, a provably-dead version guard, a provably-dead
92
+ MLX condition, and the vLLM silent-success recheck — each removal proved by
93
+ AST/reference scan before deletion.
94
+ - **Verified where CI runs.** The full suite passes with the branch gate on
95
+ macOS 3.14, a fresh-resolve python 3.11 environment (fastapi 0.141), and a
96
+ clean linux python:3.14 container — the three environments that caught
97
+ 11.0.0's release-day failures.
97
98
 
98
99
  Release notes: [RELEASE.md](RELEASE.md) · Full history: [docs/CHANGELOG.md](docs/CHANGELOG.md)
99
100
 
100
- Expected artifacts for 10.10.0 release must use exact filenames:
101
+ Expected artifacts for 11.0.1 release must use exact filenames:
101
102
 
102
- - `dist/ltcai-10.10.0-py3-none-any.whl`
103
- - `dist/ltcai-10.10.0.tar.gz`
104
- - `ltcai-10.10.0.tgz`
105
- - `dist/ltcai-10.10.0.vsix`
106
- - `src-tauri/target/release/bundle/dmg/Lattice AI_10.10.0_aarch64.dmg`
103
+ - `dist/ltcai-11.0.1-py3-none-any.whl`
104
+ - `dist/ltcai-11.0.1.tar.gz`
105
+ - `ltcai-11.0.1.tgz`
106
+ - `dist/ltcai-11.0.1.vsix`
107
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_11.0.1_aarch64.dmg`
107
108
 
108
109
  Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
109
110
 
@@ -138,6 +139,8 @@ See [ARCHITECTURE.md](ARCHITECTURE.md) for details and
138
139
 
139
140
  | Version | Theme |
140
141
  | --- | --- |
142
+ | 11.0.1 | Both Branches |
143
+ | 11.0.0 | Full Measure |
141
144
  | 10.10.0 | Quiet Station |
142
145
  | 10.9.0 | Never Blocks |
143
146
  | 10.8.0 | Within Reach |
package/docs/CHANGELOG.md CHANGED
@@ -4,6 +4,46 @@ The top entry is either the current unreleased main-branch work or the current
4
4
  release line. Older entries are historical and may describe behavior as it
5
5
  existed at that release.
6
6
 
7
+ ## [11.0.1] - 2026-08-10
8
+
9
+ ### Fixed
10
+ - 11.0.0 릴리스 노트가 기록한 결함 11건 전부: Telegram `send_web_link`의
11
+ 서버 토큰 유출과 전체 언로드 성공 조작, `inspect_html` 스타일시트 데드
12
+ 수집, 리뷰 아이템 id 초 단위 충돌, vLLM 좀비 재확인(침묵 성공 → 409),
13
+ 보안 대시보드 목록/상세 마스킹 갭과 invalid-JSON 내보내기, 임베딩
14
+ `model_id` 차원 동결, fast-path `X-Model`/SSE 본문 불일치, 워크스페이스
15
+ 응답의 죽은 `"ok"` 리터럴과 미도달 404 arm. 각 수정은 결함을 고정하던
16
+ 테스트를 반전하고 회귀 테스트를 추가했습니다.
17
+
18
+ ### Changed
19
+ - 커버리지 게이트가 분기까지 잡습니다: `[tool.coverage.run] branch = true`,
20
+ 9,828아크 전부 실행, `fail_under = 100`은 이제 라인+분기 합산.
21
+ 테스트 5,426 → 5,798개. `pragma: no branch`는 사유 명시 2줄.
22
+
23
+ ### Removed
24
+ - 참조-0 증명 후 죽은 코드 삭제: `tool_registry._wa()`,
25
+ `workspace_os_utils._snapshot_graph_import_payload`, 워크스페이스 404
26
+ arm 2개, vLLM 침묵 성공 분기, 증명된 죽은 조건 3곳
27
+ (model_catalog 버전 가드 · model_compat MLX 조건 · retrieval_docgen
28
+ blank-query 가드).
29
+
30
+ ## [11.0.0] - 2026-08-10
31
+
32
+ ### Changed
33
+ - Python 테스트 커버리지 72.80% → **100.00%**, CI 게이트 `fail_under = 100`.
34
+ 테스트 2,269 → 5,426개(+3,157, 신규 파일 145개). 제외는 도달 불가 사유가
35
+ 명시된 `pragma: no cover` 8줄뿐이며, MLX/Windows/watchdog 등 플랫폼 잠금
36
+ 분기는 페이크 모듈·시임 패치로 ubuntu CI에서도 실행됩니다.
37
+ - `build_phases` 후반 4개 페이즈가 `test_security.py`의 server-import
38
+ 부수효과 없이 전용 테스트(RuntimeContext 직접 구동)로 커버됩니다.
39
+ - ARCHITECTURE.md 검증 다이어그램이 실측값으로 갱신되고 "보고만 되고 강제
40
+ 안 되는" 점선 상자가 사라졌습니다(양쪽 커버리지 모두 100% 플로어).
41
+
42
+ ### Internal
43
+ - 커버리지 작업이 드러낸 실제 결함·죽은 분기 11건은 동작 변경 없이
44
+ RELEASE_NOTES_v11.0.0.md에 기록되고, 현재 동작을 그대로 단언하는
45
+ 테스트로 고정됐습니다(수정은 다음 릴리스 후보).
46
+
7
47
  ## [10.10.0] - 2026-08-06
8
48
 
9
49
  ### Changed
@@ -1,6 +1,6 @@
1
1
  # Community And Plugins
2
2
 
3
- Current release: **10.10.0 — Quiet Station**.
3
+ Current release: **11.0.1 — Both Branches**.
4
4
 
5
5
  LatticeAI defines the path from a strong local-first framework (8.4.0
6
6
  action-aware baseline, 8.5.0 registry+DI hardening, 8.6.0 capture/navigation
@@ -3,7 +3,7 @@
3
3
  > **Status: canonical** — current contributor guidance, kept in sync with the
4
4
  > current release.
5
5
 
6
- Current release: **10.10.0 — Quiet Station**.
6
+ Current release: **11.0.1 — Both Branches**.
7
7
 
8
8
  This document is for contributors working on the local-first Digital Brain
9
9
  codebase. Product positioning and quick start stay in `README.md`; release
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Onboarding
2
2
 
3
- Current release: **10.10.0 — Quiet Station**.
3
+ Current release: **11.0.1 — Both Branches**.
4
4
 
5
5
  The first-run goal is a five-minute path from "I opened the app" to "my Brain
6
6
  has a source, a question, and proof." This page is the product contract behind
@@ -1,4 +1,4 @@
1
- # Lattice AI — Operations Guide (v10.10.0)
1
+ # Lattice AI — Operations Guide (v11.0.1)
2
2
 
3
3
  > **Status: canonical** — kept in sync with the current release. Storage layout
4
4
  > below reflects the SQLite live Brain store and workspace scoping, not the
@@ -1,12 +1,11 @@
1
1
  # Knowledge Graph Performance Baseline
2
2
 
3
- > **Status: reference** — a synthetic regression baseline, not a
4
- > current-release measurement. The numbers below were last captured on the
5
- > v9.6.0 working tree (see provenance line) and are carried forward as the
6
- > comparison reference. The 9.7.0-9.8.0 line added graph-layer paths
7
- > (`hybrid_search`, vector freshness, extraction-quality scoring), so
8
- > regenerate with `scripts/profile_kg.py` on the current tree before treating
9
- > these as 9.8.0 numbers.
3
+ > **Status: mixed provenance — read the date on each table.** The
4
+ > `scripts/profile_kg.py` tables were last captured on the v9.6.0 working tree
5
+ > and are carried forward as the regression reference; regenerate them before
6
+ > treating them as current. The **vector index backend** table is a fresh
7
+ > 11.1.0 measurement (2026-08-10) from `scripts/bench_vector_index.py`, and
8
+ > says so inline.
10
9
 
11
10
  Synthetic performance and memory baseline for `KnowledgeGraphStore`
12
11
  (`lattice_brain/graph/`). Measured with `scripts/profile_kg.py`.
@@ -92,6 +91,78 @@ Keyword search p50 grew ~3.6x but stays under 5 ms.
92
91
  Regenerate with `.venv/bin/python scripts/profile_kg.py` after graph-layer
93
92
  changes and compare against these tables.
94
93
 
94
+ ## Vector index backends (11.1.0)
95
+
96
+ `scripts/bench_vector_index.py` measures the three selectable backends
97
+ (`LATTICEAI_VECTOR_INDEX`) against each other. It answers two questions
98
+ together, because either one alone is misleading: **how fast** each backend
99
+ answers, and **how much of the exact answer it returns** (recall@10 against
100
+ the brute-force scan, which is ground truth by construction).
101
+
102
+ Methodology, and what it does not cover:
103
+
104
+ - The corpus is synthetic — deterministic pseudo-text from a fixed vocabulary
105
+ (English + Korean) embedded with the built-in hash embedder. Real embeddings
106
+ cluster differently, so the recall figures are an upper bound for a
107
+ well-separated corpus, not a promise about your notes.
108
+ - Rows are written straight into `vector_embeddings`. This measures the
109
+ **search** path only; ingestion throughput stays in the tables above.
110
+ - Latency and memory are measured in separate passes. tracemalloc roughly
111
+ triples Python allocation cost, so timing under it would measure the
112
+ profiler — the `peak MB` column comes from one extra traced query.
113
+ - `first ms` is the *first* query after the corpus changed. For `hnsw` that is
114
+ where the graph gets built and the `.hnsw` sidecar written; for the other two
115
+ it is an ordinary query.
116
+ - `hybrid p50` is `hybrid_search` (lexical + vector fusion) on that backend —
117
+ the number a user's question actually pays.
118
+ - The candidate cap is **lifted** (`--max-candidates 0`). This matters more
119
+ than it sounds: with the product default of 10 000, the exact scan on a
120
+ larger index silently becomes "the newest 10 000 rows", and recall@10 would
121
+ then be measured against a baseline that never looked at most of the corpus.
122
+ The first 50k run made exactly that mistake and scored HNSW at 0.18 — not
123
+ because it missed anything, but because the two backends had searched
124
+ different candidate sets. The `trunc` column now reports whether any query
125
+ hit a cap.
126
+
127
+ Run it:
128
+
129
+ ```bash
130
+ .venv/bin/python scripts/bench_vector_index.py # 10k vectors
131
+ .venv/bin/python scripts/bench_vector_index.py --nodes 1000 # quick
132
+ .venv/bin/python scripts/bench_vector_index.py --json # machine-readable
133
+ ```
134
+
135
+ ### Measured, 2026-08-10 — 10 000 vectors, 30 queries, top_k 10
136
+
137
+ macOS 27 (arm64, Apple Silicon), Python 3.14.5, SQLite 3.53.1,
138
+ hnswlib 0.8.0, uncapped candidates, corpus build 2.12 s.
139
+
140
+ | backend | p50 ms | p95 ms | first ms | peak MB | recall@10 | hybrid p50 ms |
141
+ |-----------|-------:|-------:|---------:|--------:|----------:|--------------:|
142
+ | brute | 288.89 | 291.95 | 290.68 | 39.72 | 1.000 | 296.63 |
143
+ | quantized | 639.47 | 645.93 | 653.31 | 38.38 | 0.987 | 639.83 |
144
+ | hnsw | 21.53 | 22.11 | 795.84 | 0.74 | 0.953 | 24.37 |
145
+
146
+ What the table says, plainly:
147
+
148
+ - **The default is exact and slow.** 289 ms per query at 10k, and hybrid
149
+ inherits nearly all of it (297 ms) — the vector channel *is* the cost.
150
+ - **HNSW meets the 11.1.0 target and prices it.** Hybrid p50 **24.4 ms** at 10k
151
+ (target: < 50 ms), a 12x improvement, in exchange for **4.7% of the exact
152
+ top-10 going missing**. That is the trade, stated as a number rather than as
153
+ the word "approximate". Its 0.74 MB peak is the two-phase lookup: it reads
154
+ only the ten rows it returns, where the exact scan reads all 10 000.
155
+ - **The 796 ms first query is the graph build**, paid once per index generation
156
+ and then persisted to the `.hnsw` sidecar. Any write to `vector_embeddings`
157
+ invalidates the fingerprint and buys that cost again, which is why `brute`
158
+ stays the default for a continuously-ingesting brain.
159
+ - **Quantized is currently the wrong choice on every axis.** ~2.2x the latency
160
+ for 0.987 recall, and its RAM advantage does not materialise (38.4 vs
161
+ 39.7 MB): the exact scan already feeds the index in bounded batches, so
162
+ resident vectors were never the dominant term — the fetched SQLite rows are.
163
+ It ships as an honest, exhaustive backend and as the representation a held
164
+ cross-query index would need. It is not a recommendation.
165
+
95
166
  ## Observations
96
167
 
97
168
  - Keyword `search()` / `context_for_query()` stay low-millisecond thanks to
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Trust Model
2
2
 
3
- Current release: **10.10.0 — Quiet Station**.
3
+ Current release: **11.0.1 — Both Branches**.
4
4
 
5
5
  Lattice AI is local-first, explicit about external communication, and honest
6
6
  when a capability is unavailable.
@@ -1,6 +1,6 @@
1
1
  # Why Lattice AI Exists
2
2
 
3
- Current release: **10.10.0 — Quiet Station**.
3
+ Current release: **11.0.1 — Both Branches**.
4
4
 
5
5
  **Lattice AI is a local-first Digital Brain that keeps your knowledge durable
6
6
  across any AI model.**
package/docs/kg-schema.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Knowledge Graph Schema
2
2
 
3
- Current release: **10.10.0 — Quiet Station**.
3
+ Current release: **11.0.1 — Both Branches**.
4
4
 
5
5
  명세 출처: `lattice_ai_full_spec.pptx` 슬라이드 20·21·22
6
6
  구현: `lattice_brain/graph/schema.py`