Config schema lint — structural warnings beyond the JSON-repair layer #54

Closed
opened 2026-07-12 13:50:39 -04:00 by the_og · 0 comments
Owner

Roadmap §3.6. JSON repair fixes syntax; nothing checks structure. A config can save with "args": "-y foo" (string, not list), numeric env values, or env as a list — and only fail later inside Claude.

Design

  • Core: lint_server(name, data) -> list[str] returning human-readable warnings (non-blocking):
    • args present but not a list, or containing non-string items
    • env / headers present but not a dict, or with non-string values
    • command present but not a string
    • type present but not one of http / sse / stdio
    • unknown top-level keys (not in KNOWN_FIELDS) — informational: "preserved but not editable here"
  • Surface via validate_servers as warnings (keep save allowed — these are warnings, not the existing blocking problems) or a separate lint_servers() the GUI shows in the validation label with a distinct prefix. Prefer: separate function; GUI shows first warning in the validation label when there are no blocking problems.
  • Tests for each rule + a clean pass.

Acceptance: pasting a server with "args": "-y foo" shows a lint warning naming the server and field; a fully valid config shows none; save is never blocked by lint-level findings.

Roadmap §3.6. JSON repair fixes syntax; nothing checks structure. A config can save with `"args": "-y foo"` (string, not list), numeric env values, or `env` as a list — and only fail later inside Claude. **Design** - Core: `lint_server(name, data) -> list[str]` returning human-readable warnings (non-blocking): - `args` present but not a list, or containing non-string items - `env` / `headers` present but not a dict, or with non-string values - `command` present but not a string - `type` present but not one of `http` / `sse` / `stdio` - unknown top-level keys (not in KNOWN_FIELDS) — informational: "preserved but not editable here" - Surface via `validate_servers` as warnings (keep save allowed — these are warnings, not the existing blocking problems) or a separate `lint_servers()` the GUI shows in the validation label with a distinct prefix. Prefer: separate function; GUI shows first warning in the validation label when there are no blocking problems. - Tests for each rule + a clean pass. **Acceptance**: pasting a server with `"args": "-y foo"` shows a lint warning naming the server and field; a fully valid config shows none; save is never blocked by lint-level findings.
the_og added the P2 label 2026-07-12 13:50:39 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: the_og/better-claude-config#54