feat: diag_refs 對帳診斷 + ingest 進度可見性/Ctrl-C 安全 (Closes #2) #5
Reference in New Issue
Block a user
Delete Branch "feat/convert-verify-reconcile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
摘要
本 PR 含兩個獨立關注點,各一 commit。
1.
diag_refs— source_ref↔manifest 對帳診斷 (04f4fd5) — 回應 #4lint 的「source_ref 不在 manifest」只報對不上、不辨成因。新增
tools/diag_refs.py,把每個對不上的 source_ref 分成五類(hash 不符/路徑字串岔開/檔名 hash 後綴岔開/檔在磁碟未登記/完全無對應),各附修法,讓「補帳本(§14.3)」與「修規則(§12)」的相反處置不再混為一談。純唯讀、結束碼0/1,可當搬機或改 manifest 後的閘門。附 selfcheck 驗五型別分類、結束碼與零寫檔。README §3.3/§6/§7/§8 同步。2. ingest 進度可見性 + Ctrl-C 安全回復 (
4add7fa) — Closes #2--all-pending長時間本地 Ollama 攝入全程靜默,使用者不確定有沒有在跑、又不敢中斷:[i/N]、長文件逐段分段 k/n、每個 item↳ 新增/更新、完成✓,全flush=True即時顯示。KeyboardInterrupt(它不是Exception子類,原本會略過善後)。因 commit 在迴圈之後,main 必然未受影響;中斷時印可照做的回復指令並以結束碼 130 收場。測試
python tools/selfcheck_diag_refs.py— ALL PASSpython tools/selfcheck_ingest.py— ALL PASS(含進度標記、中斷後 main 未動、回復指令實測可回乾淨 main)Closes #2
🤖 Generated with Claude Code