Skip to content

Say where to report something the CLI cannot fix - #145

Merged
parawanderer merged 1 commit into
mainfrom
fix/cli-says-where-to-report
Aug 23, 2026
Merged

Say where to report something the CLI cannot fix#145
parawanderer merged 1 commit into
mainfrom
fix/cli-says-where-to-report

Conversation

@parawanderer

Copy link
Copy Markdown
Owner

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.

Before

Apple returned something unexpected: No keychain keys are held, so nothing can be decrypted.

Re-run with -vv and include the output if you report this. …

After

Apple returned something unexpected: No keychain keys are held, so nothing can be decrypted.

Re-run with -vv and include the output if you report this. …

Report it at: https://github.com/parawanderer/OpenTagViewer/issues/new

#140 is the worked example: KeychainSessionError is an UnhandledProtocolError by 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 from wizard.py without pulling in tkinter — the same reason VERSION lives 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 importing exporter.cli still 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.

`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>
@parawanderer
parawanderer merged commit 51b2863 into main Aug 23, 2026
5 checks passed
@parawanderer
parawanderer deleted the fix/cli-says-where-to-report branch August 23, 2026 11:12
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