Skip to content

Commit dbea0a8

Browse files
committed
feat(learning): close foundation readiness with local ann
Promote the staged vector path into a deterministic local embedding plus ANN-style retrieval boundary, and align readiness docs/tests with the resulting integrated/go mainline state.
1 parent a147047 commit dbea0a8

14 files changed

Lines changed: 391 additions & 213 deletions

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

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@ Current top priority is **checkpoint closure**:
2121
- harden the Windows restore-cache migration path so `main` CI does not depend on a timing-sensitive duplicate-request assumption,
2222
- keep the next lane choice disciplined instead of drifting into more inspectability-only micro-slices.
2323

24+
## Current Mainline Snapshot (2026-04-21 M8.18)
25+
26+
- Foundation baseline on `main` is currently:
27+
- status `integrated`
28+
- decision `go`
29+
- `promotionCriteriaPassed = 7/7`
30+
- `promotionBlockers = []`
31+
- Retrieval/backend truth on `main` is currently:
32+
- graph persistence default is embedded sqlite (`storeType = sqlite`, `graphBackendStatus = independent`)
33+
- query scoring uses `keyword_matches`, `title_match_bonus`, `vector_ann_similarity_bonus`, `relation_bonus`
34+
- vector acceleration uses `mode = local_ann`, `status = independent`, `vectorAdapterSignalKind = embedding_ann`
35+
- Historical increment sections below remain chronological archive entries.
36+
- When a historical section says `in_progress` / `no-go`, read it as past checkpoint truth rather than current repo state.
37+
2438
Execution anchor:
2539

2640
- [Mainline Checkpoint: CI Hardening and Post-M8 Direction Requirements (2026-04-20)](../../../brainstorms/2026-04-20-mainline-checkpoint-ci-hardening-and-post-m8-direction-requirements.md)
@@ -280,6 +294,22 @@ Execution anchor:
280294
- decision stays `no-go`,
281295
- no ANN readiness claim is permitted from lexical-prefilter evidence alone.
282296

297+
## Latest Mainline Increment (2026-04-21 M8.18 Foundation Local ANN Vector Independence)
298+
299+
- Promoted the staged vector path into a real independent local ANN backend:
300+
- `src/learning/vectorAccelerationAdapter.ts` now emits deterministic local embeddings,
301+
- candidate pruning now runs through ANN-style signature buckets,
302+
- query traces now surface `mode = local_ann` and `status = independent`.
303+
- Foundation readiness is now fully satisfied on `main`:
304+
- status `integrated`
305+
- decision `go`
306+
- `promotionCriteriaPassed = 7/7`
307+
- `promotionBlockers = []`
308+
- The current bounded vector evidence is explicit:
309+
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_ann_similarity_bonus, relation_bonus]`
310+
- `vectorAdapterSignalKind = embedding_ann`
311+
- toolbar/runtime summaries now surface `unmet none` and `criteria 7/7`.
312+
283313
## Latest Mainline Increment (2026-04-21 M8.17 Foundation Sqlite Graph Store Default)
284314

285315
- Replaced the default file snapshot persistence path with an embedded sqlite-backed graph store while preserving one-time legacy import:
@@ -999,7 +1029,7 @@ This dashboard aligns against the following requirement chain:
9991029
|---|---|---|---|---|
10001030
| L0 Representation | atom/evidence extraction and staleness | Stable | Stable | No immediate blocker |
10011031
| L1 Structure | relation + temporal graph semantics | Stable | Stable | No immediate blocker |
1002-
| L2 Retrieval | explainable hybrid/vector retrieval + governance | Branch still frames graphdb/vector expansion | Explainable retrieval with relation-path + temporal-validity evidence is integrated on `main`; dedicated query scoring now lives in `src/learning/queryBackend.ts`, vector prefilter scoring now lives in `src/learning/vectorAccelerationAdapter.ts`, but persistence is still file-backed and independent ANN evidence is still absent (`src/learning/KnowledgeLearningPlatform.ts`, `src/learning/store.ts`) | M8: keep readiness honest until independent vector evidence exists |
1032+
| L2 Retrieval | explainable hybrid/vector retrieval + governance | Branch still frames graphdb/vector expansion | Explainable retrieval with relation-path + temporal-validity evidence is integrated on `main`; dedicated query scoring lives in `src/learning/queryBackend.ts`, persistence is sqlite-backed in `src/learning/store.ts`, and the vector path now runs through independent local ANN semantics in `src/learning/vectorAccelerationAdapter.ts` | Keep quality/perf honest while richer vector backends remain optional |
10031033
| L3 Learning | mastery diagnostics + path/session loop | Expanded in branch | Path/session/misconception/memory flows are already integrated and persistence-tested on `main` | Preserve baseline and avoid underclaiming |
10041034
| L4 Interaction | agent conversation + focus/path pane runtime | Implemented in branch | Typed contract routing, conversation shell, focus-mode, and path-dock coexistence are integrated on `main` | Expand only through typed contract discipline |
10051035
| L5 Governance | runbook, diagnostics, replay/autonomy controls | Expanded in branch | Operator diagnostics persistence/triage/history/threshold governance + runbook automation/audit + adaptive simulation/remediation + remediation backtest/approval-gate + approval-policy hardening/regression-alarms + approval-policy drift/escalation + escalation acknowledgement lifecycle/audit + escalation SLA/reminder baseline + notification digest/suppression baseline + delivery-log observability + stale-cleanup health auditing + anomaly/retention governance + notification SLO governance + notification-threshold override/audit governance + rollback preview/drift-diff governance + rollback apply guardrails + latest apply-outcome reconciliation + bounded apply-outcome history + supersession summary + combined status/applied-mode filtered history integrated | Stop lane after M7.29; pivot to M8 foundation readiness |

docs/diataxis/en/explanation/foundation-reentry-readiness-checklist.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@ This page defines the **Go/No-Go contract** for re-entering the foundation lane
77
Prevent branch-only assumptions from being promoted to mainline facts.
88
Foundation work may proceed only when code, tests, CI, and docs all satisfy the same evidence threshold.
99

10-
## Mainline Baseline (2026-04-20)
10+
## Mainline Baseline (2026-04-21)
1111

12-
- Mainline persistence baseline remains file-backed snapshot storage:
12+
- Mainline persistence baseline now defaults to embedded sqlite graph storage:
1313
- `src/learning/store.ts`
1414
- Mainline learning/runtime contract currently centers on:
1515
- `src/learning/api.ts`
1616
- `src/learning/types.ts`
1717
- `src/learning/KnowledgeLearningPlatform.ts`
1818
- `src/server.ts`
19+
- Mainline foundation retrieval boundaries are now explicit and integrated:
20+
- `src/learning/queryBackend.ts`
21+
- `src/learning/vectorAccelerationAdapter.ts`
1922
- Active interaction lane is stable and CI-protected:
2023
- `src/agent_workspace.contract.parity.test.ts`
2124
- `src/agent_workspace.runtime.behavior.test.ts`
@@ -69,9 +72,9 @@ Bundle note:
6972
- runtime snapshots now preserve `mandatoryCheckIds` for the active gate contract
7073
- runtime snapshots now preserve full `mandatoryChecks`, `promotionBlockers`, and `recommendations`
7174
- Current expected result on `main` is:
72-
- status `In Progress`
73-
- decision `No-Go`
74-
- rationale: mainline persistence now uses an embedded sqlite-backed graph store, query-backend and vector-boundary modules are present, graph-backend independence is satisfied, but the vector adapter is still only `prefilter_only`, so independent ANN evidence is still absent.
75+
- status `Integrated`
76+
- decision `Go`
77+
- rationale: mainline now carries embedded sqlite graph persistence, a dedicated query backend, and an independent local embedding-ANN vector adapter, so the bounded foundation re-entry contract is fully satisfied on the repository baseline.
7578
- The readiness payload now makes that distinction explicit:
7679
- `provenance.repoRootSource`
7780
- `provenance.runtimeProjectRootAligned`
@@ -94,30 +97,29 @@ Bundle note:
9497
- `graphBackendSignalKind = embedded_graphdb`
9598
- `graphBackendIndependent = true`
9699
- Current expected promotion blockers on `main` are:
97-
- `vector_backend_not_independent`
100+
- none
98101
- Current expected promotion criteria on `main` are:
99-
- passed `6/7`
100-
- satisfied: `store_backend_evidence_present`, `graph_backend_independent`, `query_backend_boundary_present`, `vector_backend_present`, `docs_aligned`, `readiness_verifier_present`
101-
- unsatisfied: `vector_backend_independent`
102+
- passed `7/7`
103+
- satisfied: `store_backend_evidence_present`, `graph_backend_independent`, `query_backend_boundary_present`, `vector_backend_present`, `vector_backend_independent`, `docs_aligned`, `readiness_verifier_present`
104+
- unsatisfied: none
102105
- Current expected derived criterion-id summaries on `main` are:
103-
- `promotionCriteriaSatisfiedIds = [store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, docs_aligned, readiness_verifier_present]`
104-
- `promotionCriteriaUnsatisfiedIds = [vector_backend_independent]`
106+
- `promotionCriteriaSatisfiedIds = [store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, vector_backend_independent, docs_aligned, readiness_verifier_present]`
107+
- `promotionCriteriaUnsatisfiedIds = []`
105108
- Current expected runtime/operator summary phrasing on `main` is:
106109
- `gates contract, core_behavior, persistence_safety, interaction_non_regression, documentation`
107110
- `criteria-detail 7`
108111
- `recommendations 1`
109-
- `satisfied store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, docs_aligned, readiness_verifier_present`
110-
- `unmet vector_backend_independent`
112+
- `satisfied store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, vector_backend_independent, docs_aligned, readiness_verifier_present`
113+
- `unmet none`
111114
- Current expected provenance behavior is:
112115
- direct verifier/utility usage reports `runtimeProjectRootAligned = true`
113116
- hermetic runtime/API usage may report `runtimeProjectRootAligned = false` while preserving the same repo-truth readiness payload
114117
- Current expected signal semantics on `main` are:
115-
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_prefilter_content_bonus, relation_bonus]`
116-
- `vectorAdapterSignalKind = lexical_token_overlap`
118+
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_ann_similarity_bonus, relation_bonus]`
119+
- `vectorAdapterSignalKind = embedding_ann`
117120
- Interpretation rule:
118121
- `embedded_graphdb` is evidence that mainline graph persistence no longer depends on the legacy file snapshot as the primary backend.
119-
- `lexical_token_overlap` is evidence of lexical prefilter scoring only.
120-
- It is **not** evidence of embedding-backed ANN readiness.
122+
- `embedding_ann` is evidence that the vector path now runs through deterministic local embeddings plus ANN-style bucket selection instead of lexical prefilter overlap.
121123

122124
## Non-overclaim Policy
123125

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

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,20 @@
2121
- 加固 Windows 下的 restore-cache migration 路径,避免 `main` CI 继续依赖时间敏感的重复请求假设,
2222
- 在进入下一条主线前,先停止 inspectability-only 微增量惯性。
2323

24+
## 当前主线快照(2026-04-21 M8.18)
25+
26+
- `main` 上的 foundation 基线当前为:
27+
- 状态 `integrated`
28+
- 决策 `go`
29+
- `promotionCriteriaPassed = 7/7`
30+
- `promotionBlockers = []`
31+
- `main` 上的检索/后端事实当前为:
32+
- 图持久化默认已是内嵌 sqlite(`storeType = sqlite``graphBackendStatus = independent`
33+
- query scoring 当前使用 `keyword_matches``title_match_bonus``vector_ann_similarity_bonus``relation_bonus`
34+
- vector acceleration 当前使用 `mode = local_ann``status = independent``vectorAdapterSignalKind = embedding_ann`
35+
- 下方“主线最新增量”章节按时间顺序保留历史记录。
36+
- 历史段落中出现的 `in_progress` / `no-go` 代表过去 checkpoint 结论,不代表当前仓库状态。
37+
2438
执行锚点:
2539

2640
- [2026-04-20 主线 checkpoint:CI 加固与 Post-M8 后续方向要求](../../../brainstorms/2026-04-20-mainline-checkpoint-ci-hardening-and-post-m8-direction-requirements.md)
@@ -280,6 +294,22 @@
280294
- 决策仍为 `no-go`
281295
- 不能把 lexical-prefilter 证据误写成 ANN readiness。
282296

297+
## 主线最新增量(2026-04-21 M8.18 Foundation Local ANN Vector Independence)
298+
299+
- 已把 staged vector 路径升级为真实独立的本地 ANN backend:
300+
- `src/learning/vectorAccelerationAdapter.ts` 现在产出确定性的本地 embedding,
301+
- candidate pruning 已切到 ANN 风格的 signature bucket,
302+
- query trace 现在显式暴露 `mode = local_ann``status = independent`
303+
- foundation readiness 现在在 `main` 上已经全部满足:
304+
- 状态 `integrated`
305+
- 决策 `go`
306+
- `promotionCriteriaPassed = 7/7`
307+
- `promotionBlockers = []`
308+
- 当前受限向量证据已显式化:
309+
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_ann_similarity_bonus, relation_bonus]`
310+
- `vectorAdapterSignalKind = embedding_ann`
311+
- 工具栏/运行时摘要现在显示 `unmet none``criteria 7/7`
312+
283313
## 主线最新增量(2026-04-21 M8.17 Foundation Sqlite Graph Store Default)
284314

285315
- 已将默认 graph persistence 从 file snapshot 切换到内嵌 sqlite-backed graph store,同时保留一次性 legacy import:
@@ -1002,7 +1032,7 @@
10021032
|---|---|---|---|---|
10031033
| L0 表示层 | 原子/证据提取 + staleness | 稳定 | 稳定 | 无紧急阻塞 |
10041034
| L1 结构层 | 关系 + 时序图语义 | 稳定 | 稳定 | 无紧急阻塞 |
1005-
| L2 检索层 | 可解释混合/向量检索 + 治理 | 分支仍指向 graphdb/vector 扩展 | 主线已经落入 relation-path + temporal-validity explainable retrieval;独立 query scoring 已抽到 `src/learning/queryBackend.ts`vector 预筛选打分已抽到 `src/learning/vectorAccelerationAdapter.ts`,但 persistence 仍是 file-backed,且独立 ANN 证据仍缺失(`src/learning/KnowledgeLearningPlatform.ts``src/learning/store.ts`| M8:保持 readiness 诚实,直到独立向量证据落地 |
1035+
| L2 检索层 | 可解释混合/向量检索 + 治理 | 分支仍指向 graphdb/vector 扩展 | 主线已经集成 relation-path + temporal-validity explainable retrieval;独立 query scoring `src/learning/queryBackend.ts`persistence 在 `src/learning/store.ts` 已切到 sqlite,vector 路径在 `src/learning/vectorAccelerationAdapter.ts` 已具备独立本地 ANN 语义 | 保持质量/性能诚实,是否扩展更重型向量后端作为可选后续 |
10061036
| L3 学习层 | 掌握诊断 + 路径/会话闭环 | 分支增强中 | 主线已经集成 path/session/misconception/memory 流并有 persistence 测试 | 保持基线,不再低估 |
10071037
| L4 交互层 | agent 对话 + focus/path pane 运行时 | 分支已实现 | 主线已经集成 typed contract routing、conversation shell、focus mode 与 path dock coexistence | 仅通过 typed contract 扩展 |
10081038
| L5 治理层 | runbook/诊断/回放与自动化 | 分支增强中 | 主线已集成运维诊断持久化/分级/趋势历史/阈值治理 + runbook 自动化/阈值审计 + 自适应模拟/自动修复 + 回测/批准门禁 + 批准策略硬化/回归告警 + 批准策略漂移/升级 + 升级确认生命周期/审计 + 升级 SLA/提醒基线 + 通知摘要/抑制基线 + 交付日志可观测性 + 陈旧通知健康审计 + 异常/retention 治理 + 通知 SLO 治理 + 通知阈值覆盖/审计治理 + 回滚预览/drift-diff 治理 + 回滚 apply guardrails + latest apply-outcome reconciliation + bounded apply-outcome history + supersession summary + 组合 status/appliedMode 过滤历史 | M7.29 后停止此 lane,转向 M8 foundation readiness |

docs/diataxis/zh/explanation/foundation-reentry-readiness-checklist.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
避免把分支假设升级为主线事实。
88
只有当代码、测试、CI、文档同时满足同一证据阈值时,foundation lane 才能进入主线“已集成”状态。
99

10-
## 主线基线现实(2026-04-20
10+
## 主线基线现实(2026-04-21
1111

12-
- 主线持久化基线仍是 file-backed snapshot
12+
- 主线持久化基线现在默认已是内嵌 sqlite 图存储
1313
- `src/learning/store.ts`
1414
- 主线学习/运行时契约核心仍是:
1515
- `src/learning/api.ts`
1616
- `src/learning/types.ts`
1717
- `src/learning/KnowledgeLearningPlatform.ts`
1818
- `src/server.ts`
19+
- 主线 foundation 检索边界现在已经显式集成:
20+
- `src/learning/queryBackend.ts`
21+
- `src/learning/vectorAccelerationAdapter.ts`
1922
- 当前交互链路已稳定并受 CI 保护:
2023
- `src/agent_workspace.contract.parity.test.ts`
2124
- `src/agent_workspace.runtime.behavior.test.ts`
@@ -69,9 +72,9 @@ CI 漂移说明:
6972
- runtime snapshot 现在也会保留当前 gate contract 的 `mandatoryCheckIds`
7073
- runtime snapshot 现在也会保留完整 `mandatoryChecks``promotionBlockers``recommendations`
7174
- 当前主线的预期结果是:
72-
- 状态 `In Progress`
73-
- 决策 `No-Go`
74-
- 原因:主线 persistence 现在已经切到内嵌 sqlite graph store,query-backend 与 vector 边界均已在主线,graph backend 独立性已满足,但 vector adapter 仍只是 `prefilter_only`,因此独立 ANN 证据仍未进入主线
75+
- 状态 `Integrated`
76+
- 决策 `Go`
77+
- 原因:主线现在已经同时具备 sqlite graph persistence、独立 query backend、以及本地 embedding-ANN 向量适配器,因此受限 foundation re-entry 合同在仓库基线层面已全部满足
7578
- readiness 载荷现在也显式区分这层语义:
7679
- `provenance.repoRootSource`
7780
- `provenance.runtimeProjectRootAligned`
@@ -94,30 +97,29 @@ CI 漂移说明:
9497
- `graphBackendSignalKind = embedded_graphdb`
9598
- `graphBackendIndependent = true`
9699
- 当前 `main` 的预期晋级阻塞项为:
97-
- `vector_backend_not_independent`
100+
-
98101
- 当前 `main` 的预期晋级条件矩阵为:
99-
- 通过 `6/7`
100-
- 已满足:`store_backend_evidence_present``graph_backend_independent``query_backend_boundary_present``vector_backend_present``docs_aligned``readiness_verifier_present`
101-
- 未满足:`vector_backend_independent`
102+
- 通过 `7/7`
103+
- 已满足:`store_backend_evidence_present``graph_backend_independent``query_backend_boundary_present``vector_backend_present``vector_backend_independent``docs_aligned``readiness_verifier_present`
104+
- 未满足:
102105
- 当前 `main` 的预期派生条件 ID 摘要为:
103-
- `promotionCriteriaSatisfiedIds = [store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, docs_aligned, readiness_verifier_present]`
104-
- `promotionCriteriaUnsatisfiedIds = [vector_backend_independent]`
106+
- `promotionCriteriaSatisfiedIds = [store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, vector_backend_independent, docs_aligned, readiness_verifier_present]`
107+
- `promotionCriteriaUnsatisfiedIds = []`
105108
- 当前主线预期的运行时/执行侧摘要措辞为:
106109
- `gates contract, core_behavior, persistence_safety, interaction_non_regression, documentation`
107110
- `criteria-detail 7`
108111
- `recommendations 1`
109-
- `satisfied store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, docs_aligned, readiness_verifier_present`
110-
- `unmet vector_backend_independent`
112+
- `satisfied store_backend_evidence_present, graph_backend_independent, query_backend_boundary_present, vector_backend_present, vector_backend_independent, docs_aligned, readiness_verifier_present`
113+
- `unmet none`
111114
- 当前预期 provenance 行为为:
112115
- 直接 verifier/utility 调用会报告 `runtimeProjectRootAligned = true`
113116
- hermetic runtime/API 调用可能报告 `runtimeProjectRootAligned = false`,但 readiness 载荷仍必须保持同一份 repo-truth 结论
114117
- 当前 `main` 的预期信号语义为:
115-
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_prefilter_content_bonus, relation_bonus]`
116-
- `vectorAdapterSignalKind = lexical_token_overlap`
118+
- `queryBackendScoreSignals = [keyword_matches, title_match_bonus, vector_ann_similarity_bonus, relation_bonus]`
119+
- `vectorAdapterSignalKind = embedding_ann`
117120
- 解读规则:
118121
- `embedded_graphdb` 表示主线图持久化已经不再以 legacy file snapshot 作为主后端。
119-
- `lexical_token_overlap` 只表示词法预过滤打分存在。
120-
-**不等于** embedding/ANN readiness 已经成立。
122+
- `embedding_ann` 表示向量路径现在已经切到确定性的本地 embedding + ANN bucket 选择,而不再只是词法预过滤重排。
121123

122124
## 防超前宣称策略
123125

0 commit comments

Comments
 (0)