# Tasks — CLI-069: Corrupt settings.json fails fast (typed SettingsParseError)

Spec: `.agents/spec-docs/active/CLI-069-corrupt-settings-fail-fast.md`
Test Plan SSOT: the spec's TC table.

- [x] T1 (TC-01): typed `SettingsParseError` (filePath + parse message) in the framework
      config module; `provider-merge.readSettingsFile` throws it on an existing file that
      fails to parse — `robota -p "hi"` with corrupt user-level settings exits 1 naming the
      file, NOT "No provider configuration found".
- [x] T2 (TC-02): corrupt project-level `.robota/settings.json` → same fail-fast contract
      (reader is path-agnostic).
- [x] T3 (TC-03): missing files at both levels → unchanged behavior (env-default or
      ProviderConfigError per CLI-066 order).
- [x] T4 (TC-04): valid settings files → resolution unchanged (regression).
- [x] T5 (TC-05): error message carries remediation guidance (fix/delete or
      `robota diagnose`); `settings-io.readSettings` warn-and-continue fallback deleted
      (throws the same typed error); diagnose still reports rather than crashes (its
      API-key check catches and reports the parse error as the finding).
- [x] T6 (TC-06): framework SPEC error taxonomy lists `SettingsParseError`; CLI SPEC
      startup failure modes updated.
- [x] T7: wrap-up — framework + cli test/typecheck/lint/build green; PR to develop
      (squash); backlog scenario evidence + move to completed/.

## Test Plan

Authoritative TC table: `.agents/spec-docs/active/CLI-069-corrupt-settings-fail-fast.md`
(## Test Plan). Summary: TC-01..TC-05 via framework reader unit tests (corrupt/missing/valid
fixtures at both levels, typed error fields, message guidance) + diagnose regression;
TC-06 via SPEC.md diff review at GATE-COMPLETE. User-execution scenario: real binary
`robota -p "hi"` with `{ broken` user settings → named file + exit 1.
