docs(wiki): /wiki-update — 記 issue #1 T3 session 結果 + 4 決策 + 2 mistakes

- status.md:2026-06-26 進度(PR #2、T3 A/B/C 段完成、跨 repo 待接、缺口表)
- decisions-summary.md:先 append 後 deprecate / idempotency slot / ensureTemplate
  slot-diff / refresh 純被動代轉
- mistakes.md:照字面刪 action 沒查反向依賴 / 拿錯 gate(tsc) 誤判改壞

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-26 19:22:16 +08:00
parent 613071f41d
commit fbd375f7ac
4 changed files with 63 additions and 44 deletions
+20
View File
@@ -40,6 +40,26 @@
**原因**:當初 monorepo→多 worker 的 Actions 自動同步 + 高頻 API 害帳號被 flag。
**詳細**InkStoneCo 頂層 CLAUDE.md。
## ingest 取代用「先 append 後 deprecate」— 2026-06-26(總管採納,優於頂層原寫法)
**結論**`POST /triplets/ingest` 同 source.uri 出新 content_hash 時,**先 append 新批 active,再翻舊批 status=deprecated**。非頂層 SDD 原寫的「deprecate-then-append」。
**原因**:先翻舊批會出現「全無 active」的中途空窗(若 append 失敗);先 append 保證任一時刻都有 active 集合可查。總管已回頭把頂層 design §5 對齊成此寫法。
**詳細**`docs/3-specs/ingest-contract/design.md` §5issue #1 總管確認 comment。
## idempotency 鍵存進 triplet template slot — 2026-06-26
**結論**triplet template 增 `source_uri`+`content_hash`+`source_anchor` 供 get_sourceslot 承載 ingest idempotency;按 `source_uri` 分組 deprecate、同 hash no-op。`source_block_id`Logseq)不夠用。
**原因**:純 plugin 領域 slotbase 不需知道),合鐵律(slot 非建表);contract `ingest-candidate.json` 本就有 source.uri+content_hash,落地存進 slot 是自然動作,**不改 contract**。
**詳細**`design.md` §3/§5issue #1
## ensureTemplate 改 slot-diff 補丁 — 2026-06-26
**結論**`ensureTemplate` 命中既有 template 時,比對 slot 差集 → 缺的走 base `PATCH /templates/:id` 補上(**取代原 early-return**)。
**原因**:原 early-return 不補新 slot → seed 後新增的 slotstatus/gloss…)對既有環境永遠進不來。slot-diff 讓既有+全新環境都自動收斂,免另跑一次性遷移腳本。
**詳細**`src/lib/kbdb-client.ts`issue #1 前置警示1。
## refresh 純被動代轉(人發起,守 fan-out 紅線)— 2026-06-26
**結論**`POST /graph/refresh` 只代轉 ingest 重抓+萃,**只能人發起調用觸發**,禁排程/webhook/cron 自動 refresh。graph 自己不抓不萃(ingest 純餵食器職責)。
**原因**:自動 fan-out 正是當初害 GitHub flag 的模式。`KBDB_INGEST_URL` 未設時誠實回 `forwarded:false`,不假綠。
**詳細**`src/actions/graph-refresh.ts`issue #1 T3.6b。
---
格式: