sorter: write audit + low-confidence doc beside the library, never inside it
The library may be a seeded torrent whose file set is frozen; the sorter_applied.jsonl / sorter_low_confidence.txt bookkeeping now goes to <library>/../_logs/ by default. Explicit --audit still wins.
This commit is contained in:
@@ -15,7 +15,9 @@
|
|||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
--catalog FILE default data/library_catalog.json
|
--catalog FILE default data/library_catalog.json
|
||||||
--audit FILE default <library>/sorter_applied.jsonl
|
--audit FILE default <library>/../_logs/sorter_applied.jsonl
|
||||||
|
(bookkeeping stays OUT of the library, which may be a
|
||||||
|
seeded torrent; --audit still overrides)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
@@ -85,7 +87,11 @@ def main() -> None:
|
|||||||
catalog = load_catalog(args.catalog, dropped=dropped)
|
catalog = load_catalog(args.catalog, dropped=dropped)
|
||||||
if dropped:
|
if dropped:
|
||||||
log.info("Dropped systems: %s", ", ".join(sorted(dropped)))
|
log.info("Dropped systems: %s", ", ".join(sorted(dropped)))
|
||||||
audit = args.audit or (args.library / "sorter_applied.jsonl")
|
# Bookkeeping must never land inside the library itself (it may be a
|
||||||
|
# seeded torrent whose file set is frozen): default to a _logs folder
|
||||||
|
# beside it. An explicit --audit overrides this.
|
||||||
|
audit = args.audit or (args.library.parent / "_logs" / "sorter_applied.jsonl")
|
||||||
|
log.info("Audit file: %s", audit)
|
||||||
|
|
||||||
provenance = None
|
provenance = None
|
||||||
if args.provenance:
|
if args.provenance:
|
||||||
|
|||||||
Reference in New Issue
Block a user