Skip to content

feat(cli)!: render native parse diagnostics - #8

Merged
zigai merged 6 commits into
masterfrom
feat/native-diagnostics
Oct 16, 2026
Merged

zigai merged 6 commits into
masterfrom
feat/native-diagnostics

Conversation

@zigai

@zigai zigai commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

Parse failures expose argparse or Click messages with an [interfacy] prefix. Give both backends concise errors, spelling suggestions, and help for the command that failed.

  • Show full parent help when a required subcommand is missing
  • Configure diagnostic presentation with diagnostic_layout, independently of help layouts
  • Let plugins change or render diagnostics through transform_diagnostic and render_diagnostic
  • Keep embedded invoke() silent and expose failure details through UsageError.diagnostic

Breaking Changes

  • Parse failures from Interfacy.run(), the interfacy command, and ArgumentParser use Interfacy messages instead of backend error strings and the [interfacy] prefix. Consumers matching the old text need updated expectations, including for str(UsageError)

Verification

  • just coverage verifies unknown-command suggestions on both backends
  • Under coverage run -m pytest, diagnostic hints identify the simulated script as tool
  • Direct pytest verifies the same hints on Python 3.10, 3.14, 3.15
  • The installed CLI omits private-input from the error for --unknown=private-input

@zigai
zigai merged commit eba24bb into master Oct 16, 2026
40 checks 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.

1 participant