fix: report user errors once at the terminating boundary - #82
Merged
Merged
Conversation
ColliderUserError raise sites no longer log CRITICAL themselves; the entrypoint logs the carried message once when the error terminates the command. Callers that deliberately swallow the error and continue no longer leave CRITICAL lines in the output of a successful command, and propagating paths keep a single accurate message. - from_path logs at debug so best-effort readers stay quiet; config load logs the message itself since SystemExit bypasses the entrypoint handler. - Setup folds its two-line separator hint into the exception message. - run_prune re-raises an unreadable lock as PruneLockUnreadableError after the skip summary, so direct prune fails with a visible cause while remove --prune tolerates exactly that skip (issue #46) without swallowing real deletion failures. - The resolver scan raise site keeps a debug log so swallowed failures stay discoverable with --verbose. Closes #79
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
ColliderUserErrorraise sites no longer log CRITICAL; the entrypoint reports the carried message once when the error actually terminates the command. Best-effort paths that swallow the error and continue (upgrade/remove/prune lock refresh checks, colliderfile scoping) no longer print CRITICAL lines on successful runs, while every failing path keeps a single, accurate message. Directpkg pruneon an unreadable lock now shows the cause without--verbose;remove --prunetolerates exactly the lock-skip (via a dedicatedPruneLockUnreadableError) so real deletion failures still propagate honestly. Closes #79Adversarially reviewed in two passes; both reviewer gates (order-dependent test, over-broad swallow in
remove --prune) are fixed and pinned by tests.Type of change
Checklist
uv run pytest).uv run ruff format --check .,uv run ruff check .,uv run ty check collider,uv run pylint --rcfile=pyproject.toml ./collider).AI disclosure (Tick all that apply)