[kimi] Fix triage_score.py to merge queue instead of overwrite (#1463) #1464
Reference in New Issue
Block a user
Delete Branch "kimi/issue-1463"
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?
Fixes #1463
Problem
triage_score.py was completely overwriting queue.json every 5 cycles, undoing all deep triage work. Queue regrew from 2 to 63 items repeatedly.
Solution
Changed queue write logic from OVERWRITE to MERGE:
Changes to scripts/triage_score.py:
EXCLUSIONS_FILEconstant for.loop/queue_exclusions.jsonload_exclusions()- loads excluded issue numbers (sticky removals)save_exclusions()- saves exclusions to persist deep triage removalsrun_triage()to use merge logic:New file: .loop/queue_exclusions.json
[]for nowTests added to tests/scripts/test_triage_score_validation.py:
test_exclusions_file_path()- verifies path configurationtest_load_exclusions_empty_file()- empty file returns empty listtest_load_exclusions_with_data()- loads integer listtest_load_exclusions_with_strings()- handles string numbers gracefullytest_load_exclusions_corrupt_file()- corrupt file returns empty listtest_save_exclusions()- saves sorted unique integerstest_merge_preserves_existing_queue()- merge logic preserves existing itemstest_excluded_issues_not_added()- excluded issues filtered outtest_excluded_issues_removed_from_scored()- exclusions applied before queue logictest_empty_queue_merge_adds_all_new_items()- empty queue adds all new itemstest_queue_preserved_when_no_new_ready_items()- queue preserved when no new itemsVerification