Skip to content

Add deterministic fallback hint mappings#17

Merged
sacchen merged 3 commits intomainfrom
codex/issue-13-fallback-hints
Apr 11, 2026
Merged

Add deterministic fallback hint mappings#17
sacchen merged 3 commits intomainfrom
codex/issue-13-fallback-hints

Conversation

@sacchen
Copy link
Copy Markdown
Owner

@sacchen sacchen commented Feb 24, 2026

Summary

  • add a deterministic fallback hint registry in diagnostics via explicit message-pattern mappings
  • keep hints short, single-line, and actionable for unknown parse/token failures
  • preserve no-noise behavior for errors that do not match known fallback patterns
  • add diagnostics tests for fallback matches and the no-hint case

Testing

  • uv run --group dev pytest tests/test_diagnostics.py tests/test_cli_unit.py -k "hint_for_error"
  • uv run --group dev pytest -q
  • uv run --group dev pytest --cov=calc --cov-report=term-missing --cov-fail-under=90

Closes #13

Introduce an explicit fallback hint pattern registry in diagnostics so unrecognized parse/token errors produce short, stable, actionable hints without traceback/docstring introspection. Add tests for fallback matches and a no-noise case where unknown errors still return no hint.
@sacchen sacchen requested a review from ulnbt February 24, 2026 08:53
@sacchen sacchen merged commit 405de25 into main Apr 11, 2026
10 checks passed
@sacchen sacchen deleted the codex/issue-13-fallback-hints branch April 11, 2026 06:01
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.

Add deterministic fallback hint registry for CLI errors

1 participant