Move the invariant checks into the importers and drop find_violations

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 15:34:36 +08:00
co-authored by Claude Fable 5
parent 8fdd21f8a2
commit a534b1b70b
3 changed files with 142 additions and 65 deletions
+8
View File
@@ -216,6 +216,14 @@
拆成個人後,男女混合是歌曲層(song_artists+各歌手
gender)可推導的事實,不屬歌手實體。非人非團體者
Pinkfong)type 留空由人工判定,維持現狀。
- **獨立驗證步驟解散,不變量檢查歸屬各匯入工作**:榜單
覆蓋((year, rank) 網格恰好齊全、無缺漏、無多出、無
重複)檢在 `SongImporter` 匯入結尾;署名解析結果(至少
一人、含 primary、名字非空白)檢在 `ArtistImporter` 逐筆
解析後立即失敗。違規拋 `BuildError` 走既有的失敗路徑,
`find_violations` 刪除。理由:檢查跟著產生資料的工作走,
main 不再有驗證分支;逐筆即時失敗使錯誤指向出錯的那筆
署名。
- **fetch-lyrics 移除缺漏報表**:刪去 `missing_csv` 位置引數
與缺漏報表 CSV 輸出。理由:該報表只寫不讀(指令從未讀取
它),缺漏數字每次執行皆由工作儲存比對歌詞目錄重新算出;