教學項目：預覽後輸入變了，就拒絕舊計劃

這是自建 JSON 庫存樣例，不是真實業務資料。
預覽會建立計劃檔案，記錄原檔案、批次的 SHA-256 指紋及結果，不修改庫存副本。
提交時重新讀取兩份輸入、比較指紋，並再次檢查與計算；不一致就拒絕。

在一個新資料夾開啟 PowerShell，先建立可替換的測試副本：
Copy-Item fixtures/store.json test-store.json
Copy-Item fixtures/good-batch.json test-batch.json
python -B test_guarded_import.py
python -B guarded_import.py preview --store test-store.json --input test-batch.json --plan test-plan.json
檢查預覽後才提交，以下步驟會替換 test-store.json：
python -B guarded_import.py commit --store test-store.json --input test-batch.json --plan test-plan.json
Get-Content test-store.json -Raw

計劃檔案已存在時拒絕覆蓋；重新預覽要換一個新檔名。
驗收包含原檔案變化、批次變化、預覽被改、無效資料、路徑重疊及輸入未變等8項。
store_changed_after_preview 代表原檔案已變；batch_changed_after_preview 代表批次已變。
錯誤識別字、欄位名稱及指令保留英文原樣。

原實驗於2026-10-28在Windows / Python 3.13.5執行，本版本於2026-10-29整理。
腳本不呼叫API。指紋不是簽署或檔案鎖，不能保證併發安全。
沒有驗證真實庫存、磁碟故障或斷電恢復；變更後恢復相同位元組也無法發現。
