Skip to content

Validate historySize and maxDiffSize when loading config #105

@404-Page-Found

Description

@404-Page-Found

Task summary

Add validation logic when loading config so invalid numeric values for historySize and maxDiffSize are rejected (or safely defaulted) with clear behavior.

Why this is a good first issue

The work is scoped to one module (src/config/store.ts) and can be completed with a small implementation plus targeted tests.

Suggested files or areas

  • src/config/store.ts
  • New/updated tests around config loading behavior

Acceptance criteria

  • Define validation rules for historySize and maxDiffSize (e.g., must be positive integers).
  • Ensure invalid values do not flow into runtime prompt generation.
  • Add tests covering valid, missing, and invalid values.
  • Document the chosen behavior in code comments or docs (defaulting vs throwing).

Extra context

loadConfig() currently applies defaults for missing fields but does not enforce numeric bounds for existing fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions