Skip to content

Use Project VIC's category codes: 0 is Non-pertinent, 5 is Uncategorized - #251

Merged
charpy4n6 merged 3 commits into
mainfrom
fix/vic-category-codes
Oct 1, 2026
Merged

charpy4n6 merged 3 commits into
mainfrom
fix/vic-category-codes

Conversation

@charpy4n6

Copy link
Copy Markdown
Collaborator

GLEAPP stored the two Project VIC codes the wrong way round: 0 was Uncategorized and 5 was Non-pertinent. This swaps them to the Project VIC scheme.

Cases

  • New files start at 5 (Uncategorized). An NSRL known-good hit lands on 0 (Non-pertinent).
  • A case made before schema v18 has its 0s and 5s swapped once when it is opened, on files and on category rows, so every verdict keeps its meaning. A NULL category becomes 5.
  • Once opened by this version, a case should not be opened by an older one: an older build would read the codes the old way.

Project VIC

  • Import: Category 0 comes in as Non-pertinent (it used to fall through as uncategorized); null and 5 come in as Uncategorized.
  • Export: Uncategorized is written as null, 0 stays 0, and "only categorized" keeps Non-pertinent.
  • A notable hash set asserting 0 now counts, ranked below every other category. Cases matched before this need "Re-check known hashes" to pick that up.

Reports

  • HTML, CSV, JSON and LAVA, and the categorized / uncategorized scopes (web and CLI), use 5 for Uncategorized. Uncategorized is still listed last in the HTML report.
  • The hash-match text keeps a source's category 0 instead of dropping it.

UI

  • Number keys match the codes: 0 Non-pertinent, 1-4, 5 clears to Uncategorized, 6-9 the examiner's own categories. The selection bar, right-click menu and category editor show those keys, with the presets in code order.
  • The selection bar's "Clear cat" button sent 0 (it would now have meant Non-pertinent) and sends 5.

Help, manual and README are updated.

Testing

  • Full suite: 826 passed, 6 skipped. New tests/test_vic_category_codes.py covers the one-time swap (including that a second open does not swap back), VIC import/export and the severity order.
  • Generated HTML, CSV, JSON and LAVA reports on a scratch case and checked the category names, codes, order and scopes.

🤖 Generated with Claude Code

charpy4n6 and others added 3 commits September 30, 2026 22:38
GLEAPP had the two reversed (0 Uncategorized, 5 Non-pertinent). New files now
start at 5, an NSRL known-good hit lands on 0, and a case made before schema
v18 has its 0s and 5s swapped once on open (a NULL category becomes 5), so
every verdict keeps its meaning.

Project VIC import takes Category 0 as Non-pertinent (it used to fall through
as uncategorized); null and 5 are Uncategorized. Export writes Uncategorized as
null and keeps 0. A notable hash set asserting 0 now counts, ranked below every
other category. Reports, LAVA and the categorized/uncategorized scopes use 5.

Number keys match the codes: 0 Non-pertinent, 1-4, 5 clears, 6-9 the
examiner's own categories. The selection bar's Clear cat button sent 0 and now
sends 5. Help, manual and README updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Project VIC JSON mapping (0 Non-pertinent; null or 5 Uncategorized, written
back as null), the one-time swap an older case gets on open and what it means
for older builds, Non-pertinent ranking last when sources disagree, and 0 in
the VIC hash-set example. The category editor's intro now says the preset keys
are their codes. The Non-pertinent row no longer suggests what to put in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@charpy4n6
charpy4n6 merged commit 85d62da into main Oct 1, 2026
8 checks passed
@charpy4n6
charpy4n6 deleted the fix/vic-category-codes branch October 1, 2026 15:32
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