Skip to content

Commit 0e379b1

Browse files
committed
feat(foundation): verify sqlite runtime across dist and sidecar
1 parent 306cebf commit 0e379b1

11 files changed

Lines changed: 579 additions & 31 deletions

docs/diataxis/en/explanation/development-progress-dashboard.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ It tracks what is already implemented, where the hard gaps remain, and how to ve
1919
- What is real at HEAD:
2020
- graph/store operations semantics exist in `src/learning/store.ts`, including file-backed ops, embedded SQLite graphdb persistence/query paths, and HTTP adapter paths with fallback diagnostics,
2121
- the embedded sqlite baseline now also has restart-durability proof: shutdown closes the store cleanly, the adapter can reopen safely, and server integration covers ingest -> shutdown -> fresh module reload -> diagnostics/query/readiness continuity,
22+
- a new host-level verifier now exercises that same embedded sqlite baseline through both `dist` runtime and packaged sidecar flows on the current Windows host: ingest -> store diagnostics/foundation readiness -> restart -> query continuity (`scripts/verify-foundation-sqlite-runtime.js`),
2223
- ANN-style prefilter, representation telemetry, circuit health, remote index sync, and live `external_http` connector proof now exist in `src/learning/queryBackend.ts` and `src/learning/vectorAccelerationAdapter.ts`,
2324
- runtime capability/runbook governance now includes explicit ANN remote index-sync health (`query_vector_acceleration_index_sync_health`) in addition to prefilter, health, traceability, and circuit checks,
2425
- runtime capability governance now also includes explicit gate `query_vector_acceleration_calibration_readiness`, which formalizes whether the ANN path is even ready for release-grade threshold tuning,
@@ -30,12 +31,12 @@ It tracks what is already implemented, where the hard gaps remain, and how to ve
3031
- Phase-2 runtime diagnostics are now materially implemented in `src/learning/KnowledgeLearningPlatform.ts` for query-backend comparison/history/trend, knowledge staleness diagnostics/rebuild planning, learning-quality history/trend, session-plan quality evaluation/history/trend/runtime-threshold diagnostics, query-backend config, and query-backend diagnostics,
3132
- Phase-3 tutor/memory diagnostics remain real and now include an active default runtime tutor adapter path in `src/server.ts`, so normal server execution can emit adapter telemetry instead of staying catalog-only.
3233
- What is not closed yet:
33-
- Phase-1 A8 has advanced beyond a file-only default: `src/server.ts` now defaults to `graphdb/sqlite` with explicit file fallback, and restart durability is already proved, but packaged/runtime proof and heavier-workload hardening are still open before calling the local graph backend production-closed,
34+
- Phase-1 A8 has advanced beyond a file-only default: `src/server.ts` now defaults to `graphdb/sqlite` with explicit file fallback, restart durability is already proved, and host-level dist/runtime + packaged sidecar proof is now in place, but heavier-workload hardening is still open before calling the local graph backend production-closed,
3435
- Phase-1 A9 is now operational rather than scaffold-only, but recall/latency calibration and larger-workload validation are still open before calling the ANN layer production-closed,
3536
- Phase-2 quality/session/query observability is now real, but it is not yet release-closed because these gates still require release-grade calibration on top of the current graph/ANN operational baseline; the new ANN calibration-readiness gate only formalizes prerequisites, not closure,
3637
- default tutor routing is no longer catalog-only, but the runtime is still effectively `local`-first and retains explicit rule-engine fallback rather than a production-proven multi-provider routing policy.
3738
- Active execution focus therefore shifts to truth-first foundation recovery:
38-
- finish the remaining packaged/runtime + heavier-workload closure for the embedded graph backend baseline,
39+
- finish the remaining heavier-workload closure for the embedded graph backend baseline while keeping the new dist/runtime + packaged sidecar proof green,
3940
- finish the remaining workload/threshold closure for the now-live ANN connector baseline,
4041
- move the newly surfaced ANN runbook visibility from operator-readable summaries to workload-calibrated release gates,
4142
- keep the new diagnostic surfaces honest against the same runtime truth,
@@ -133,7 +134,9 @@ Current branch status for this slice:
133134
## Latest Validation Snapshot (2026-05-14)
134135

135136
- Reconfirmed on the current Windows host in this turn: `node node_modules/jest/bin/jest.js src/learning/runtimeCapability.test.ts src/knowledge.api.contract.test.ts --runInBand --no-cache`, `node node_modules/jest/bin/jest.js src/agent_workspace.frontend.test.ts --runInBand --no-cache`, `npm run test:agent-workspace:contracts`, `npm run build:with-vite`, `npm run docs:diataxis:check`, `npm run docs:site:build`, `NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_STRICT=1 NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_UI_STRICT=1 NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_UI_DYNAMIC_STRICT=1 node scripts/verify-agent-workspace-browser.js`.
137+
- Reconfirmed on the current Windows host in this turn: `npm run build:sidecar`, `npm run verify:foundation:sqlite-runtime`.
136138
- The strict browser proof now explicitly verifies the bilingual runtime-runbook verify/checks ANN governance labels that were added in this slice: sync-health plus circuit, traceability, and prefilter summaries, along with the threshold/signal drilldowns and calibration-readiness cues that support budget-tuning work.
139+
- The embedded sqlite graph baseline now also has a repeatable host-level runtime proof outside Jest integration scope: both `dist` runtime and packaged sidecar flows preserve ingest -> diagnostics/readiness -> restart -> query continuity on the same runtime data directory.
137140
- Tauri strict evidence is implementation-closed but still host-dependent:
138141
- the current Windows host proves non-strict tauri/runtime behavior and load-flow parity,
139142
- Linux strict evidence commands (`verify:agent-workspace:tauri:rust:strict`, `verify:agent-workspace:tauri:window-evidence:strict`, strict evidence index/manifest) still require provisioned `webkit2gtk-4.1`, `javascriptcoregtk-4.1`, and `libsoup-3.0`.

docs/diataxis/zh/explanation/development-progress-dashboard.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- 当前已经真实落地的部分:
1010
- `src/learning/store.ts` 已具备 file-backed ops、embedded SQLite graphdb persistence/query 路径,以及 HTTP adapter 语义路径,
1111
- embedded sqlite 基线现在还具备了重启耐久性证明:shutdown 会干净关闭 store,adapter 可安全重开,server integration 已覆盖 ingest -> shutdown -> fresh module reload -> diagnostics/query/readiness 连续性,
12+
- 现在还有一条新的主机级验证器,会在当前 Windows 宿主上分别走 `dist` runtime 与 packaged sidecar 两条路径,证明同一条 embedded sqlite 基线可以完成 ingest -> store diagnostics/foundation readiness -> restart -> query 连续性(`scripts/verify-foundation-sqlite-runtime.js`),
1213
- `src/learning/queryBackend.ts` / `src/learning/vectorAccelerationAdapter.ts` 现已具备 ANN 风格 prefilter、representation telemetry、circuit health、远端索引同步,以及 live `external_http` connector 证明,
1314
- runtime capability / runbook 治理也已新增显式的 ANN 远端索引同步健康度检查(`query_vector_acceleration_index_sync_health`),与 prefilter、health、traceability、circuit 并列,
1415
- runtime capability 治理现在也新增了显式门禁 `query_vector_acceleration_calibration_readiness`,用来正式回答当前 ANN 路径是否已经具备进入发布级阈值校准的前提条件,
@@ -20,12 +21,12 @@
2021
- `src/learning/KnowledgeLearningPlatform.ts` 中的 Phase-2 运行时诊断面已接通真实实现,包括 query-backend comparison/history/trend、knowledge staleness diagnostics/rebuild planning、learning-quality history/trend、session-plan quality evaluate/history/trend/runtime-threshold diagnostics、query-backend config、query-backend diagnostics,
2122
- Phase-3 的导师/记忆诊断仍为真实实现,且 `src/server.ts` 现已注入默认激活态 tutor adapter,正常 server 路径可直接产出 adapter telemetry。
2223
- 当前仍未闭环的部分:
23-
- Phase-1 A8 已经超出 file-only 默认态:`src/server.ts` 现在默认走 `graphdb/sqlite` 并保留显式 file fallback,且重启耐久性已证明;但在宣布本地图后端达到生产闭环之前,packaged/runtime 证明与更重工作负载级加固仍未完成
24+
- Phase-1 A8 已经超出 file-only 默认态:`src/server.ts` 现在默认走 `graphdb/sqlite` 并保留显式 file fallback,重启耐久性已证明,而且主机级 dist/runtime + packaged sidecar 证明也已具备;但在宣布本地图后端达到生产闭环之前,更重工作负载级加固仍未完成
2425
- Phase-1 A9 现已进入 operational baseline,而不再只是 scaffolding:但在宣布 ANN 层达到生产闭环前,仍需补齐 recall/latency 校准与更大工作负载验证;
2526
- Phase-2 的 quality/session/query 可观测性已不再是空占位,但它们仍需要建立在当前 graph/ANN operational baseline 之上的发布级校准,因此还不能宣称发布级闭环;新的 ANN calibration-readiness gate 只是把前提条件正式化,并不等于校准完成;
2627
- 默认 tutor routing 已不再只是 catalog-only,但当前 runtime 仍是 `local`-first,并保留显式 rule-engine fallback,而不是已验证的生产级多 provider 路由策略。
2728
- 因此当前活跃重心不是“默认认为 Phase-1 已完成然后推进上层”,而是:
28-
1. 先补完 embedded graph backend 基线剩余的 packaged/runtime + 更重工作负载闭环
29+
1. 在保持新的 dist/runtime + packaged sidecar 证明持续为绿的前提下,先补完 embedded graph backend 基线剩余的更重工作负载闭环
2930
2. 补完当前 live ANN connector baseline 的工作负载与阈值闭环,
3031
3. 把当前已前推到 runbook 卡片中的 ANN 指标可见性,继续推进为带工作负载校准的发布级门禁,
3132
4. 让这批新诊断面始终与同一份运行时真相保持一致,
@@ -145,7 +146,9 @@
145146
## 最新验证快照(2026-05-14)
146147

147148
- 本轮已在当前 Windows 宿主重新确认通过:`node node_modules/jest/bin/jest.js src/learning/runtimeCapability.test.ts src/knowledge.api.contract.test.ts --runInBand --no-cache``node node_modules/jest/bin/jest.js src/agent_workspace.frontend.test.ts --runInBand --no-cache``npm run test:agent-workspace:contracts``npm run build:with-vite``npm run docs:diataxis:check``npm run docs:site:build``NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_STRICT=1 NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_UI_STRICT=1 NOTE_CONNECTION_AGENT_WORKSPACE_BROWSER_UI_DYNAMIC_STRICT=1 node scripts/verify-agent-workspace-browser.js`
149+
- 本轮已在当前 Windows 宿主重新确认通过:`npm run build:sidecar``npm run verify:foundation:sqlite-runtime`
148150
- 严格浏览器证据现在已显式校验本轮新增的双语 runtime-runbook verify/checks ANN 治理标签:不仅验证 sync-health,也验证熔断、可追踪性、预筛选摘要,以及支撑校准工作的阈值/信号钻取和校准就绪态。
151+
- embedded sqlite 图基线现在也具备了 Jest 集成测试之外、可重复执行的主机级运行时证明:`dist` runtime 与 packaged sidecar 两条路径都会在同一个 runtime data 目录上保持 ingest -> diagnostics/readiness -> restart -> query 连续性。
149152
- Tauri strict 证据链在实现层面已经闭环,但仍受宿主依赖约束:
150153
- 当前 Windows 宿主已经证明 non-strict tauri/runtime 行为与 load-flow parity,
151154
- Linux strict 证据命令(`verify:agent-workspace:tauri:rust:strict``verify:agent-workspace:tauri:window-evidence:strict` 及 strict evidence index/manifest)仍要求宿主预装 `webkit2gtk-4.1``javascriptcoregtk-4.1``libsoup-3.0`

docs/en/TEST_REPORT.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
- PASS
4242
- [x] `npm run build:with-vite`
4343
- PASS
44+
- [x] `npm run build:sidecar`
45+
- PASS
46+
- [x] `npm run verify:foundation:sqlite-runtime`
47+
- PASS
4448
- [x] `npm run docs:diataxis:check`
4549
- PASS
4650
- [x] `npm run docs:site:build`
@@ -50,14 +54,18 @@
5054

5155
### What This Refresh Adds
5256

53-
1. The Phase-2 ANN governance slice is now operator-visible through the frontend runbook shell, not only backend JSON:
57+
1. The embedded `graphdb/sqlite` baseline now also has repeatable host-level runtime proof on the current Windows machine:
58+
- `npm run verify:foundation:sqlite-runtime` covers both `dist` runtime and packaged sidecar flows,
59+
- both modes now prove ingest -> store diagnostics/foundation readiness -> restart -> query continuity on the same runtime data directory,
60+
- A8 is therefore no longer blocked on missing packaged/runtime evidence; the remaining honest gap is heavier-workload hardening.
61+
2. The Phase-2 ANN governance slice is now operator-visible through the frontend runbook shell, not only backend JSON:
5462
- verify/checks now surface ANN sync-health, circuit-budget, traceability, and prefilter summaries plus threshold/signal drilldowns,
5563
- they now also surface ANN circuit budget flags and prefilter calibration-readiness cues,
5664
- action-queue continues to carry the index-sync incident drilldown.
57-
2. `query_vector_acceleration_prefilter_effectiveness` now shares the ANN fast-lane escalation path instead of using the slower generic escalation branch.
58-
3. Runtime capability governance now has explicit gate `query_vector_acceleration_calibration_readiness`, which fails or warns until the ANN path has representative sync/prefilter/traceability/stability telemetry in the same runtime window.
59-
4. The workspace verify/checks cards now surface that calibration-readiness gate directly, instead of forcing operators to infer it only from the underlying budget signals.
60-
5. This refresh still does **not** prove release-grade Phase-2 closure:
65+
3. `query_vector_acceleration_prefilter_effectiveness` now shares the ANN fast-lane escalation path instead of using the slower generic escalation branch.
66+
4. Runtime capability governance now has explicit gate `query_vector_acceleration_calibration_readiness`, which fails or warns until the ANN path has representative sync/prefilter/traceability/stability telemetry in the same runtime window.
67+
5. The workspace verify/checks cards now surface that calibration-readiness gate directly, instead of forcing operators to infer it only from the underlying budget signals.
68+
6. This refresh still does **not** prove release-grade Phase-2 closure:
6169
- it closes visibility and browser/runtime proof for the new ANN governance summaries,
6270
- it does **not** close workload/threshold calibration for those budgets.
6371

@@ -69,7 +77,7 @@
6977
- conversation memory lifecycle,
7078
- memory-policy diagnostics/history/trend.
7179
2. These passes do **not** prove Phase-1 A8/A9 closure:
72-
- runtime no longer defaults to `local-file-graphdb`, and restart durability for the embedded `graphdb/sqlite` baseline is now integration-proved, but packaged/runtime proof and heavier workload hardening still remain,
80+
- runtime no longer defaults to `local-file-graphdb`, restart durability for the embedded `graphdb/sqlite` baseline is integration-proved, and host-level dist/runtime + packaged sidecar proof is now in place, but heavier workload hardening still remains,
7381
- ANN no longer stops at query-only scaffolding: the `external_http` path now has remote index sync plus live end-to-end query proof, but workload and threshold calibration still remain before production closure.
7482
3. These passes do **not** prove Phase-2 quality-gate closure:
7583
- query comparison, staleness, learning-quality, session-plan-quality, and query-backend diagnostics are now implementation-real, but they still require release-grade calibration on top of the current graph/ANN operational baseline.

docs/en/TODO.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
- [x] Query-backend comparison/history/trend, staleness diagnostics/rebuild planning, learning-quality history/trend, session-plan quality evaluate/history/trend/runtime-threshold diagnostics, query-backend config, and query-backend diagnostics are now live in `src/learning/KnowledgeLearningPlatform.ts`.
1010
- [x] Default server runtime now injects an active local `tutorAdapter` while retaining the `local` + `cloud` adapter catalog.
1111
- [x] Default runtime graph backend is no longer `local-file-graphdb`: the server now targets embedded `graphdb/sqlite` with explicit file fallback.
12-
- [~] The new embedded `graphdb/sqlite` baseline is now restart-durability-proved, but packaged/runtime proof and heavier workload gates still remain before calling A8 production-closed.
12+
- [x] Host-level dist runtime plus packaged sidecar verification now proves the embedded `graphdb/sqlite` baseline across ingest -> store diagnostics/foundation readiness -> restart -> query continuity on the current Windows host (`npm run verify:foundation:sqlite-runtime`).
13+
- [~] The new embedded `graphdb/sqlite` baseline is now restart-durability-proved and host-level runtime-packaging-proved, but heavier workload gates still remain before calling A8 production-closed.
1314
- [~] Phase-1 A9 now has a live `external_http` connector baseline with remote index sync and end-to-end query proof, but recall/latency thresholds and larger-workload validation still remain before production closure.
1415
- [x] Agent-workspace runbook verify/checks now surface ANN index-sync, circuit, traceability, and prefilter summaries plus threshold/signal drilldowns, while action-queue keeps the index-sync incident drilldown.
1516
- [x] `query_vector_acceleration_prefilter_effectiveness` now shares the ANN fast-lane escalation path instead of lagging behind the other ANN governance checks.
@@ -38,11 +39,12 @@ After syncing the repository to the latest upstream `main` baseline, we re-audit
3839
- [x] ANN connector hardening does expose candidate normalization, representation telemetry, and prefilter effectiveness signals.
3940
- [x] Default runtime now targets an embedded `graphdb/sqlite` backend with explicit file fallback.
4041
- [x] Embedded sqlite restart durability is now covered by server integration proof (`ingest -> shutdown -> fresh module restart -> query/readiness continuity`).
42+
- [x] Host-level dist runtime + packaged sidecar verification now proves the same embedded sqlite baseline across ingest/readiness/diagnostics/restart/query continuity (`npm run verify:foundation:sqlite-runtime`).
4143
- [x] The `external_http` ANN path now syncs a remote prefilter index and serves live query traffic under integration proof.
42-
- [ ] Packaged/runtime proof and heavier workload hardening still remain for A8.
44+
- [ ] Heavier workload hardening still remains for A8.
4345
- [ ] ANN still needs workload/threshold calibration before production closure.
4446
- [ ] Next active implementation phase is now split:
45-
- [ ] finish the remaining A8 packaged/runtime + workload closure,
47+
- [ ] finish the remaining A8 heavier-workload closure on top of the new dist/runtime + packaged sidecar proof,
4648
- [ ] finish the remaining A9 workload/threshold closure on top of the live connector baseline,
4749
- [ ] move next into Phase-2 release-grade gate hardening,
4850
- [ ] continue Phase-3 tutor/memory hardening in parallel.

0 commit comments

Comments
 (0)