Commit Graph

238 Commits

Author SHA1 Message Date
Youzini-afk
4ab2e0c3c9 perf: add native hydrate wasm path 2026-04-22 20:09:48 +08:00
Youzini-afk
e880fe0b39 perf: complete persist-load P2 hydration pass 2026-04-22 19:32:35 +08:00
Youzini-afk
cfc122244a perf: optimize persist/load P1 hot paths 2026-04-22 18:34:56 +08:00
Youzini-afk
b849117646 Add persistence load and commit attribution diagnostics 2026-04-22 17:12:09 +08:00
Youzini-afk
d2c3d1f5dd Add persistence and retrieval observability with native delta gating 2026-04-21 20:32:20 +08:00
Youzini-afk
50ab967d7b Optimize IndexedDB save snapshot reuse 2026-04-21 18:46:26 +08:00
Youzini-afk
6ddf3a7386 Optimize detached graph save path 2026-04-21 17:44:59 +08:00
Youzini-afk
4fd4786983 perf: reduce graph load memory and clone overhead 2026-04-21 16:57:42 +08:00
Youzini-afk
d3c199fee1 feat: 同批次节点默认弱关联边 + LLM 可增强/移除 + prompt 更新
- extractor: 批次操作完成后统一处理 links,再补默认弱 related 边(0.25)
- extractor: 支持 remove/delete/unlink/invalidate 语义显式移除边
- extractor: update 操作现在也能处理 links
- extractor: 边计数改为仅统计真正新增的边
- prompt: 输出格式示例加 links 字段,补 links/remove 语法说明
- prompt: 行为规则加关联边使用规范段落
- tests: 3 条回归覆盖默认弱边、显式覆盖、显式移除
2026-04-20 20:27:30 +08:00
Youzini-afk
37bada37b6 feat: add recall card editing and ENA preview UI 2026-04-20 16:39:29 +08:00
Youzini-afk
fb60502b55 Add cognition owner management flows 2026-04-20 15:35:49 +08:00
Youzini-afk
a35237ae6d fix: preserve history frontier in opfs delta commits 2026-04-17 20:17:45 +08:00
Youzini-afk
622f00620c fix: restore luker llm priority order 2026-04-16 01:05:14 +08:00
Youzini-afk
3feb7be760 fix: prefer luker host llm routing 2026-04-16 00:52:34 +08:00
Youzini-afk
3b5d008a6c fix: route luker extraction llm requests 2026-04-16 00:35:21 +08:00
Youzini-afk
e3b268bb04 fix: surface rerun extraction progress 2026-04-16 00:14:17 +08:00
Youzini-afk
e2e51c9508 fix: harden opfs capability recovery 2026-04-15 22:47:34 +08:00
Youzini-afk
c764a000c0 fix: keep luker host profile before chat selection 2026-04-15 22:05:10 +08:00
Youzini-afk
359a2a07b7 feat: deepen luker host integration 2026-04-15 21:20:08 +08:00
Youzini-afk
dc4eac4ced fix: harden luker sidecar persistence consistency 2026-04-15 17:36:36 +08:00
Youzini-afk
13d2b04e73 fix: fallback persistence chat identity on mobile 2026-04-15 16:20:11 +08:00
Youzini-afk
22bf3cf588 fix: clear stale recovery sources during graph cleanup 2026-04-15 15:43:12 +08:00
Youzini-afk
2ba374f4fb fix: harden mobile indexeddb persistence path 2026-04-15 15:14:24 +08:00
Youzini-afk
1f2cddb2a3 fix: settle mobile local persistence loading state 2026-04-15 15:02:28 +08:00
Youzini-afk
360dfe3f19 feat: harden Luker sidecar persistence flow 2026-04-15 13:46:27 +08:00
Youzini-afk
05d3fe3fbd fix: harden mobile local store recovery flow 2026-04-15 12:43:43 +08:00
Youzini-afk
4b19e978c7 fix: guard luker panel graph load retries 2026-04-14 22:03:07 +08:00
Youzini-afk
3356e809c7 fix: restore task timeline details and bump recall default 2026-04-14 20:15:43 +08:00
Youzini-afk
1867662653 fix: align cleanup actions with opfs storage 2026-04-14 19:55:30 +08:00
Youzini-afk
c12956f674 feat: promote opfs v2 as default local store 2026-04-14 19:34:44 +08:00
Youzini-afk
33b8d298f7 fix: harden persistence tiers and opfs durability 2026-04-14 15:44:21 +08:00
Youzini-afk
d39c16d8ff fix: restore missing runtime persistence helpers 2026-04-14 12:41:10 +08:00
Youzini-afk
77520dda50 Add focused OPFS persistence regression tests 2026-04-13 23:33:32 +08:00
Youzini-afk
74d661e433 Harden local store cache invalidation for storage mode switching 2026-04-13 23:03:43 +08:00
Youzini-afk
e4ab3ac41d perf: optimize persist-delta snapshot reuse and diagnostics 2026-04-13 18:21:32 +08:00
Youzini-afk
67cf5fe7fa perf: add hash compact persist-delta bridge mode 2026-04-13 16:37:59 +08:00
Youzini-afk
b16785e56f perf: optimize persist delta gating and diagnostics 2026-04-13 16:11:43 +08:00
Youzini-afk
5bd29c99d5 fix: orphan accepted commit marker self-healing — auto-clear stale marker when no recoverable graph source exists
- Add maybeResolveOrphanAcceptedCommitMarker() for conservative orphan detection:
  - Chat-state sidecar rescue first (preserves marker, keeps mismatch diagnostic)
  - Only clears marker when ALL local sources confirmed absent
  - Guards: shadow-available, migration-failed, chat-switched all block clearing
- Enhance clearCurrentChatCommitMarker() with resetAcceptedRevision option
  - Resets lastAcceptedRevision and acceptedStorageTier when marker is orphan
- Integrate orphan resolution into loadGraphFromIndexedDb() empty+mismatch branch
- Update onDeleteCurrentIdbController/onDeleteAllIdbController to resetAcceptedRevision
- Update graph-persistence regressions:
  - Orphan marker scenario now auto-heals to EMPTY_CONFIRMED (was: permanently BLOCKED)
  - Add chat-state rescue guard test: sidecar data prevents marker clearing
2026-04-12 20:36:03 +08:00
Youzini-afk
05083ef5f0 fix: clear stale accepted commit marker after deleting local IndexedDB caches
When users delete local BME IndexedDB via UI actions (delete current/all
IDB), the chat metadata's st_bme_commit_marker was not cleared. This left
an accepted high-revision promise with no local DB backing, causing
persist-mismatch:indexeddb-behind-commit-marker and blocking graph load
indefinitely.

- index.js: add clearCurrentChatCommitMarker() helper and expose via runtime
- ui-actions-controller.js: call clearCurrentChatCommitMarker before
  syncGraphLoadFromLiveContext after IDB deletion
- p0-regressions.mjs: regression test asserting marker is cleared before
  reload after current-IDB deletion
2026-04-12 20:07:05 +08:00
Youzini-afk
913a102b39 fix: backend vector state marked dirty on sync/restore import and query failure
- sync/bme-sync.js: conservatively clear backend hash mappings and mark
  vectorIndexState dirty before importing remote snapshots via download,
  merge, and cloud backup restore, preventing stale clean-looking state
  after cross-device sync or restore
- vector/vector-index.js: mark backend vector state dirty on real backend
  query failures (HTTP/network) instead of silently returning empty results
- regression: indexeddb-sync.mjs covers download/restore/merge import
  dirty marking; p0-regressions.mjs covers backend query failure dirtying
2026-04-12 19:42:45 +08:00
Youzini-afk
de7e598490 fix: graph load stuck in LOADING after IndexedDB cache deletion or commit-marker mismatch
- reconcileIndexedDbProbeFailureState now handles persist-mismatch:indexeddb-* reasons, ensuring bounded retries and transition to BLOCKED instead of hanging forever in LOADING
- expose clearCachedIndexedDbSnapshot, clearAllCachedIndexedDbSnapshots, closeBmeDb, closeAllBmeDbs, syncGraphLoadFromLiveContext in runtime context for UI actions
- onDeleteCurrentIdbController / onDeleteAllIdbController now clear in-memory caches, close DB handles, and force a fresh graph load sync after deletion
- humanize persist-mismatch:indexeddb-behind-commit-marker panel messages into user-friendly Chinese text
- add regression test for empty IndexedDB + accepted commit marker mismatch fallback-to-blocked scenario
2026-04-12 19:00:30 +08:00
Youzini-afk
47ffd5413d refactor(terminology): 层级总结为主路径,synopsis 标记为旧式全局概要
- README: 明确 summaryState 为主总结体系,legacy synopsis 为兼容兜底
- prompt-profiles: synopsis 任务标签改为「小总结」
- schema/task-graph-stats/panel: synopsis 节点显示为「全局概要(旧)」
- index.js: fallback 状态文案改为「旧式全局概要生成/更新中」
- p0-regressions: 同步更新断言字符串
2026-04-12 17:58:05 +08:00
Youzini-afk
b31088cc35 fix: IndexedDB probe 失败后不再永久卡在 loading,重试耗尽后回退到 blocked
- index.js: 新增 reconcileIndexedDbProbeFailureState,后台 probe 失败时先有限重试,耗尽后切到 blocked
- index.js: scheduleIndexedDbGraphProbe 的 .then/.catch 均接入 reconcile 逻辑
- index.js: createGraphLoadUiStatus blocked 文案更新
- ui/panel.js: _getGraphLoadLabel blocked 文案更新,不再误导为元数据未就绪
- tests/graph-persistence.mjs: 新增 manager-unavailable / read-failed 回归
- tests/graph-persistence.mjs: harness 支持 __indexedDbExportSnapshotShouldThrow / __indexedDbGetCurrentDbShouldThrow
2026-04-12 16:50:02 +08:00
Youzini-afk
5a53d010af fix: reconcile stale manualBackupBatchJournalCoverage when contiguous earlier journal coverage is rebuilt
- Add hasContiguousJournalCoverageThroughFloor to check if current
  batchJournal contiguously covers back through the old retained floor
- Add reconcileManualBackupBatchJournalCoverage that clears stale
  coverage when actual journals have bridged the gap
- Self-clean during normalizeGraphRuntimeState (load-time) and
  appendBatchJournal (write-time)
- findJournalRecoveryPoint now uses reconciled coverage so stale
  manual backup floors no longer block valid reverse-journal recovery
- Add regression tests for gap-not-yet-bridged and bridged scenarios
2026-04-12 16:35:04 +08:00
youzini
a4a11bb6d2 Merge pull request #31 from Hao19911125/main
手动存储的大小修剪
2026-04-12 16:16:35 +08:00
Youzini-afk
22f75e9660 tests: stub recall prompt headers in retrieval-config harness 2026-04-12 16:16:02 +08:00
Youzini-afk
64dec0df2b recall: sectioned recentMessages with context/target split for LLM prompt
- prompt-builder.js: add RECALL_TARGET_CONTENT_HEADER, update splitSectionedTranscriptPayloadMessage to recognize recall-specific target header
- retriever.js: add buildRecallSectionedTranscript helper, format recentMessages as sectioned transcript with context-review and recall-target headers for prompt building while keeping flat string[] for ranking
- p0-regressions.mjs: add testRecallUsesSectionedPromptMessagesForContextAndTarget regression asserting two system messages with correct transcriptSection and headers
2026-04-12 16:07:38 +08:00
Youzini-afk
96b43c7860 feat: migrate compress/consolidation/reflection graphStats to shared ranking core + prompt node refs
- New maintenance/task-graph-stats.js: shared helper wrapping rankNodesForTaskContext + createPromptNodeReferenceMap
- extractor.js: extract and reflection graphStats now use buildTaskGraphStats
- compressor.js: compression graphStats uses shared helper, excludes current batch from relevant ranking
- consolidator.js: consolidation graphStats uses shared helper, excludes new nodes from relevant ranking
- index.js: passes schema + embeddingConfig into generateReflection
- p0-regressions.mjs: added graphStats assertions for compress/consolidation/reflection (prompt-facing refs, no raw UUIDs)
2026-04-12 15:27:22 +08:00
Hao19911125
4b9668fdc5 Clear restored backup dirty history markers 2026-04-12 15:09:11 +08:00
Youzini-afk
dc5051f2ef feat: shared ranking core + prompt node references; recall reuses shared core for base query/vector/diffusion; remove retriever-local duplicate helpers; add regression tests 2026-04-12 14:59:37 +08:00