Repository navigation
Return structured resolver errors and keep Rich/Typer rendering in the CLI layer - #48
Merged
Merged
Conversation
nicoloesch
force-pushed
the
22-structured-resolver-errors
branch
from
October 27, 2026 03:27
a80c399 to
8012328
Compare
3 tasks done
nicoloesch
marked this pull request as ready for review
November 7, 2026 17:38
1 task done
nicoloesch
force-pushed
the
22-structured-resolver-errors
branch
from
November 16, 2026 21:24
8012328 to
4969ae8
Compare
gkennos
approved these changes
Nov 17, 2026
gkennos
self-requested a review
November 18, 2026 07:26
gkennos
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Resolver and planner functions now raise structured issues instead of printing to a Rich console and raising
typer.Exit. The CLI catches them, renders the same output as before, and exits with status 1. Headless callers such asplan_configureread the issues directly.Changes
ConfigIssue,IssueCode,SeverityandConfigIssuesErrorinissues.py, exported from the package.ConfigIssuesErrorsubclassesConfigurationError.field_path,relatednames and the pydanticerror_type. A cross-field validator failure is an entry-level issue withfield_path=None. Issues are built from sanitized errors, so rejected values do not leak.headlessflag from the resolver helpers andresolve_fields. Nothing in the resolver prints or exits.cli_support.py(_exit_on_config_issues), used by_add_entryandPackageConfigBase.run_configure.PackageConfigInvalidErroraConfigIssuesError, so both failure paths ofplan_configureexpose.issues..errors()is kept.ConfigurationErrormoves toissues.pyand is still importable frompackage_base.issue_contextandConfigIssue.within, applied at the nested entry sites,resolve_fieldsand_add_entry. Issues from a nested entry get a dottedfield_pathand the package, section and entry of the outermost entry. The CLI shows a--sethint for dotted paths.typer.Exitcatch inplan_configure, which can no longer happen.docs/integration.mdand the affected tests, and add tests for each issue code.Behaviour
[renders literally.headless=is no longer accepted byresolve_fieldsand the private resolver helpers.Checklist
feature)pytest -q): 627 passedruff check .,ty check src/ tests/)