Skip to content

Name a Project VIC import after its JSON file - #220

Merged
charpy4n6 merged 1 commit into
mainfrom
fix/vic-source-name
Sep 27, 2026
Merged

charpy4n6 merged 1 commit into
mainfrom
fix/vic-source-name

Conversation

@charpy4n6

@charpy4n6 charpy4n6 commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Every file imported from a Project VIC JSON was registered under the source Project VIC, whatever the JSON was called. Project VIC is the format, not the source. Two JSONs in one case also looked like one source.

A VIC import's source is now the JSON's file name, for example iPhone XS.json, the same way a folder source is named after its folder. This is what the Source filter, the details pane and the reports show.

  • gleapp/projectvic.py: imported rows get source = <JSON file name>; the unused VIC_SOURCE_NAME constant is gone.
  • gleapp/case.py: the source handed to the ingest is named the same way (it was Project VIC (<name>)).
  • Unchanged: VIC detection, Export Project VIC, and the "Project VIC" label on hash-set matches, which names a hash list rather than an evidence source.
  • The Project VIC hash database is not affected. Importing a VIC hash set (Reference data for every case, or Import hash set for one) goes through the hash-set import code, which this does not touch, and a hash-set JSON handed to the evidence ingest is still refused before the changed line. Matching, the "Project VIC" hit label, categories, series, tags and Export Project VIC are unchanged; the hash-set import and match tests pass.
  • Cases already ingested keep the name they were given; re-ingesting the JSON gives the new name.
  • Relink finds a source's files by whatever its name is, so it works with both.

Tests: test_projectvic_detect_and_import now checks the source name on the parsed source and on every imported row; it fails on the old code. Full suite locally on Windows: 794 passed, 6 skipped; lint (changed files) and line endings pass. The manual's and help's Source filter line says a VIC JSON is listed by its file name.

🤖 Generated with Claude Code

Every file imported from a VIC JSON was registered under the source
"Project VIC", whatever the file was called. Project VIC is the format, not
the source, so the source is now the JSON's file name (iPhone XS.json), as a
folder source is named after its folder. Cases already ingested keep the name
they were given.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@charpy4n6
charpy4n6 merged commit 3864423 into main Sep 27, 2026
8 checks passed
@charpy4n6
charpy4n6 deleted the fix/vic-source-name branch September 27, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant