fix: correct download_left_hashes potfile merge bugs

- Delete block that wrongly appended found hashes back into the left
  (unsolved) file - found hashes belong only in the potfile
- Fix get_hcat_potfile_path() to return "" when config key is
  explicitly set to "", respecting user intent to disable potfile override
- Fix get_hcat_potfile_path() to resolve relative paths relative to the
  config file directory, matching main.py's hate_path resolution
- Add potfile_path parameter to download_left_hashes() and
  download_hashes_from_hashview() so CLI --potfile-path and
  --no-potfile-path overrides propagate to the API merge step
- Update main.py call sites to pass hcatPotfilePath through
- Add tests covering all four bug fixes
This commit is contained in:
Justin Bollinger
2026-03-19 19:13:41 -04:00
parent 8770a700df
commit e006833812
5 changed files with 82 additions and 21 deletions
+1 -1
View File
@@ -187,7 +187,7 @@ class DummyHashviewAPI:
def __init__(self, base_url, api_key, debug=False):
self.calls = []
def download_left_hashes(self, customer_id, hashfile_id, hash_type=None):
def download_left_hashes(self, customer_id, hashfile_id, hash_type=None, potfile_path=None):
self.calls.append(
("download_left_hashes", customer_id, hashfile_id, hash_type)
)