fix: prune star-scan ledger rows for repos no longer starred

The ledger kept screen-out rows for unstarred repos because the scan script only read it and the skill called it append-only, so dead rows piled up.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen 2026-11-08 21:42:57 +08:00
parent 40d1ddebe8
commit 66e177d983
3 changed files with 26 additions and 3 deletions

View file

@ -102,6 +102,15 @@ def test_parking_reopens_one_repo_from_rejected_organization(scan):
assert "rejected again" in run("--full").out
def test_unstarred_repos_are_pruned_from_ledger(scan):
module, _, run = scan
kept = "repo\tdate\treason\nexample/project\t2026-10-16\tno use case\n"
module.LEDGER.write_text(kept + "gone/repo\t2026-10-16\tno use case\ngone/repo\t2026-10-17\tparked\n")
assert "pruned 2" in run().err
assert module.LEDGER.read_text() == kept
def test_parking_keeps_other_exclusions(scan):
module, star, run = scan
now = datetime.now(UTC)