Repository navigation
Normalize imported hashes to lower case and default their null fields [patch] - #199
Merged
Merged
Conversation
… [patch] An imported entry with an upper-case hash was stored under a key Scan never looks up, and a JSON null in Description, KnownPaths, SuggestedFileName or Model made Search, Stats, Export and Scan throw on every later run. Fixes #163 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015PVg1hwPKWXb1nLDuTQgYR
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Import.MergeEntriesnow:Get-FileHash) is stored under the key Scan looks up, and the same hash imported in both cases merges into one entry;KnownPaths,Description,SuggestedFileNameorModel(newRepairNullFields), so a JSON import with nulls can no longer make Search, Stats, Export or Scan throw on every later run. Partially filled entries still merge, as the triage note suggested.Tests
Two new tests in
SearchTests:MergeEntriesStoresAnUpperCaseHashAsTheLowerCaseHashScanLooksUp: upper- then lower-case import of one hash gives one lower-case key holding both pathsMergeEntriesRepairsNullFieldsSoSearchStatsAndExportStillRun: imports an all-null entry, then runs Search, Stats andExport.BuildCsvBoth fail on
mainand pass with the fix. Full suite: 87 passed, 1 skipped (that test skips when run as root), 0 warnings.Fixes #163
🤖 Generated with Claude Code
https://claude.ai/code/session_015PVg1hwPKWXb1nLDuTQgYR
Generated by Claude Code