Skip to content

Conversation

@mgoldsborough
Copy link
Contributor

@mgoldsborough mgoldsborough commented Jan 7, 2026

Summary

  • Add ConfigCorruptedError class for clear error reporting when config is invalid
  • Add strict validation for ~/.mpak/config.json that checks required fields, types, and rejects unknown fields
  • Add JSON schema at src/schemas/config.v1.schema.json documenting the config format
  • Add comprehensive test coverage for all validation paths

Test plan

  • Tests pass (npm run test:all)
  • Manual: corrupt config file and verify clear error message
  • Manual: add unknown field to config and verify rejection

Add strict validation for ~/.mpak/config.json to catch corruption early:
- Add ConfigCorruptedError for clear error reporting with config path
- Validate required fields (version, lastUpdated) and types
- Reject unknown fields (additionalProperties: false)
- Add JSON schema at src/schemas/config.v1.schema.json
- Add comprehensive test coverage for validation
@mgoldsborough mgoldsborough self-assigned this Jan 7, 2026
@mgoldsborough mgoldsborough added this to the v0.0.2 milestone Jan 7, 2026
@mgoldsborough mgoldsborough merged commit 877b332 into main Jan 13, 2026
1 check passed
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.

2 participants