Skip to content

Major refactor for quality and cleanup#31

Merged
thevictorlopez merged 40 commits intomainfrom
refactor-parsing-validating-logic
Mar 20, 2026
Merged

Major refactor for quality and cleanup#31
thevictorlopez merged 40 commits intomainfrom
refactor-parsing-validating-logic

Conversation

@thevictorlopez
Copy link
Contributor

Type System & Spec Alignment

  • Aligned XARFEvidence and EvidenceSource enums to match actual spec values
  • Fixed hallucinated types; added missing types for nested objects (MessageInfo, swarm_info, etc.)
  • Removed SeverityLevel enum; fixed content_type injection in v3 Content reports
  • Made swarm_info required per spec

Public API (Parser / Generator / Validator) Refactor

  • Major refactor of Generator, Parser, and Validator to simplify codebase and remove type duplication
  • Fixed strict mode to work correctly with x-recommended properties
  • Evidence size calculated automatically on report generation
  • Replaced UUID generation with a sane method
  • Delegated schema lookup (category/types) to SchemaRegistry
  • Fixed collectMissingOptionalFields to follow $ref references
  • Several fixes to V3 → V4 Compatibility Layer
  • Barrel exports cleaned up
  • Removed sample generation helpers
  • Removed dead code and conditions
  • Removed unnecessary content_type top-level injection

Test Suite

  • Major test suite update alongside public API cleanup
  • Removed validator.edge-cases.test.ts (334 lines deleted)
  • Significantly expanded validator.test.ts and v3-legacy.test.ts

Documentation / Misc.

  • Cleaned up outdated docs; bumped spec version to 4.2.0
  • Updated email address; bumped dependencies
  • Removed stale Claude-generated artifacts

… unnecesary type duplication and overall code quality.
… validator to use the updated schema structure to catch invalid category+type combos.
…low other strings for report types that accept any string. Update eslint deps to boot to allow for some TS cleverness.
@thevictorlopez thevictorlopez changed the title Refactor parsing validating logic Major refactor for quality and cleanup Mar 19, 2026
@thevictorlopez thevictorlopez self-assigned this Mar 19, 2026
@thevictorlopez thevictorlopez merged commit 3ca9735 into main Mar 20, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants