Say where to report something the CLI cannot fix - #145
Merged
Conversation
`UnhandledProtocolError` means Apple said something this library does not model: not the user's mistake, nothing for them to correct, and a bug report is the only useful next step. The handler asked for one - "include the output if you report this" - and never said where. `grep github.com python/exporter/cli.py` returned nothing at all. The window has named the URL in its error dialog for as long as it has had one. The headless half left somebody holding `-vv` output and no destination, which is not a hint they should have to take. Issue #140 is the worked example. `KeychainSessionError` is an `UnhandledProtocolError` by inheritance, so it lands here as "no keychain keys are held" - which reads as a broken account and is not one. That reporter found the issue tracker anyway; he also decoded protobuf by hand to write the report. The link moves to `version.py` rather than being duplicated. The CLI cannot import it from `wizard.py` without pulling in tkinter, which is the same reason `VERSION` lives there - and two copies of a URL is exactly what goes stale in one place without anybody noticing, because nothing tests a link. Asserted that importing `exporter.cli` still pulls in no tkinter. Four tests. One of them is the point of the other three: an `ExportSourceError` - a thing the user can fix, like stopping a sign-in - must *not* get the link. Sending somebody to file an issue about their own typo is wrong, and it teaches them to ignore the link on the day it matters. Verified by breaking both directions: removing the line reddens two, printing it unconditionally reddens the fourth. 512 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
UnhandledProtocolErrormeans Apple said something this library does not model: not the user's mistake, nothing for them to correct, and a bug report is the only useful next step.The handler asked for one — "include the output if you report this" — and never said where.
grep github.com python/exporter/cli.pyreturned nothing at all. The window has named the URL in its error dialog for as long as it has had one; the headless half left somebody holding-vvoutput and no destination.Before
After
#140 is the worked example:
KeychainSessionErroris anUnhandledProtocolErrorby inheritance, so it arrives as "no keychain keys are held" — which reads as a broken account and is not one. That reporter found the tracker anyway, but he also decoded protobuf by hand to write the report.Where the constant lives
version.py, not duplicated. The CLI cannot import it fromwizard.pywithout pulling in tkinter — the same reasonVERSIONlives there — and two copies of a URL is exactly what goes stale in one place without anyone noticing, because nothing tests a link. There is an assertion that importingexporter.clistill pulls in no tkinter.Testing
Four tests, and the fourth is the point of the other three: an
ExportSourceError— something the user can fix, like stopping a sign-in — must not get the link. Sending somebody to file an issue about their own typo is wrong, and it teaches them to ignore the link on the day it matters.Verified by breaking both directions: removing the line reddens two tests, printing it unconditionally reddens the fourth. 512 tests pass.
PR description summarised by Claude Code.