Ask bug reports the questions they arrive without - #147
Conversation
Reports of this arrive missing the same three things every time: which version, which route, and the log. The log is the one that matters - nearly every one of these is answerable from it and almost unanswerable without it. So an issue form asks, and the error messages in both the window and the CLI now link straight at it rather than at a blank issue. **The labels are in the template, not in the URL.** `?labels=bug,%40exporter-tool` looks equivalent and is not: GitHub applies those only for somebody with permission to label, which a person reporting a bug generally is not. A template's own front matter applies them whoever files. **The version question needed the two populations separating.** The release is built from `wizard.py` with `console=False`, so the download is the window and nothing else - anyone on the command line is running from source by definition. That is what makes the question answerable: from a release the title bar is right, and from a checkout `VERSION` says whatever the last release set and the commit is the only true answer. The form asks which, then asks for the one that means something. Log instructions differ per route because the two are not alike. The window's Save logs button redacts on the way out; the CLI writes to stderr, redacts nothing, and needs `2>` rather than `>` - a plain redirect saves an empty file and somebody attaches it. Two tests, because this breaks silently. GitHub does not error on an unknown `?template=`; it drops the reporter on a blank issue with none of the questions and none of the labels, so a rename would cost slightly worse bug reports for months with nothing saying why. One asserts the file the link names exists, the other that the template still carries both labels and that the URL still does not. Verified by renaming the file and by dropping a label. An Android template will want its own; this one deliberately does not tell app users where to go, since the chooser will. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The app half was missing. It is a different form because the app is a different program: the version is in a different place, the ROM matters - GrapheneOS has already explained one report here - and its log comes out somewhere else. **Two ways to get an app log, and the template offers both.** Settings -> Enable debug data -> the map's dots menu -> Export Logs, which is the one that works today; and the Export logs button on the error page that is being built, which is the same log without any of the setting-up. Worded so it reads correctly before and after that page exists. **And neither template now sends anybody into the export zip.** The app one asked for the exporter version off the `via:` line in `OPENTAGVIEWER.yml`, which means unpacking the bundle. That is a bad instruction in general and a worse one under password-protected bundles, which become the wizard's default: it walks somebody through decrypting a file full of their tags' private keys and then leaves them in a folder of loose files with an issue form open. So the field asks only for what they already know, and says outright not to open it. Both templates now say never to attach the zip or anything unpacked from it, in the place a person is already being asked for files. Anybody who has that bundle can locate the tags, and it cannot be un-posted. The app already knows the answer and never says it: `parseImportInfo` reads `content.getVia()` into `Import.via` and no screen or log line mentions it. Notes for surfacing that are in `tmp/android-import-provenance-handover.md`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
For the Android session — two things this needs from your side, and one of them is a dependency of the error page you are planning. 1. The error page must link to the app templateNot The exporter keeps this as one constant, There is a test for the exporter's copy ( 2. Add import provenance to the planDetails in
Three places to surface it, agreed with @parawanderer:
And update the template in the same change
It also promises your page before it exists:
Both are worded to read correctly either way, but they are hedges, and they stop being right the moment the real thing ships. The template is part of that change, not a follow-up — it is what tells users the feature exists at all, and rule 10 is about exactly this sort of index going quietly wrong. If your button ends up labelled something other than "Export logs", change the sentence rather than leaving it nearly true. One thing worth considering while you are there
If the error page is going to hand somebody a log button in a moment of frustration, porting that redaction is worth weighing. The rules are pattern-based and nothing in them is Python-specific. Written by Claude Code from the exporter session. Reply here. |
|
Taken, all of it. Three notes back. Redaction is much cheaper than "port the rules to Java". So the error page's log button can redact, and the template's "nothing is removed from it" paragraph becomes wrong rather than merely blunt — I will change it in the same PR, per your point about the hedges. One thing in
Provenance in all three places as described. (Reply drafted via Claude Code, reviewed by me.) |
|
Checked the redaction claim rather than take it — it holds, and it is cleaner than I assumed.
Worth noting why that list is a list, since adding to it is the process working rather than a shortcut around it:
Two things that fall out of sharing it rather than porting it:
On the stale doc: Everything else: agreed, and thanks for confirming the JVM-reachability rather than assuming it. One correction to my own side, since it is the same bug I asked you to fix: neither exporter log says which exporter wrote it. The wizard's log header carries only the privacy caution, and the CLI has Written by Claude Code from the exporter session. |
The same gap I asked the Android session to close, on this side, unnoticed while writing theirs: `Import.via` is read and never mentioned, and neither exporter log said which build produced it. The wizard's header carried only the privacy caution; the CLI has `--version` as a flag and never logged it. So `exporter-bug.yml` had a required field asking for something the program knew and would not say - and the answer people give is the version they remember. **`VERSION` alone is wrong on a checkout.** It is a committed literal, so every commit after a release reports the old version, confidently. `describe_build()` separates the three cases because they are genuinely different builds: frozen, which is what people download and where `VERSION` is exactly right; a source tree with git, where the commit is the truth and the version is a hint; and anything else - a source zip off a release tag - where `VERSION` is right again and there is no commit to name. A frozen build does not shell out at all, and not only to save the call: `git` in a downloaded app's directory is somebody else's repository, so an answer from it would be worse than none. Nothing about it may matter. It runs while logging is being set up, before anything the user asked for has started, so no git on PATH, a git that hangs, and a directory that is not a repository all return None and cost a missing suffix rather than a failed export. The call is bounded and asks about this checkout rather than the working directory, which is wherever the user happened to be standing. Ten tests. Verified by breaking four things: shelling out when frozen, letting a missing git escape, dropping the commit from the description, and not logging it at all - two, one, two and one red respectively. The template moves with it rather than after it, per the argument I made to the Android session about hedges: the version field now says the first line of the log answers it. 524 tests pass, and `release_version.py --print` still reads VERSION, which parses this module rather than importing it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Reports arrive missing the same things every time: which version, which route, and the log. The log is the one that matters — nearly every one of these is answerable from it and almost unanswerable without it.
So there are now two issue forms, and the exporter's error messages link straight at the one that applies instead of at a blank issue.
exporter-bug.ymlbug,@exporter-toolapp-bug.ymlbug,@appThe labels are in the templates, not the URL
?labels=bug,%40exporter-toollooks equivalent and is not: GitHub applies URL labels only for somebody with permission to label, which a person reporting a bug generally is not. A template's own front matter applies them whoever files.Neither template sends anyone into the export zip
The app form originally asked for the exporter version off the
via:line inOPENTAGVIEWER.yml— which means unpacking the bundle. That is a poor instruction now and a dangerous one once password-protected bundles become the wizard's default: it walks somebody through decrypting a file full of their tags' private keys and leaves them in a folder of loose files with an issue form open.Both forms now say, where a person is already being asked for files, never attach the zip or anything unpacked from it. Anyone holding that bundle can locate the tags and it cannot be un-posted.
The app already knows the answer and never says it —
parseImportInforeadscontent.getVia()intoImport.via, and no screen or log line mentions it. See the comment below.Separating the two populations answers the version question
The exporter release is built from
wizard.pywithconsole=False— the download is the window and nothing else, so anyone using the CLI is running from source by definition.git rev-parse --short HEAD—VERSIONon a checkout says whatever the last release setLog instructions differ per program
uv run python -m exporter.cli -vv 2> exporter-log.txt. Redacts nothing, so the form says to read it first.2>rather than>, because the log goes to stderr and a plain redirect saves an empty file that somebody then attaches.Testing
Two tests, because this breaks silently — GitHub does not error on an unknown
?template=, it drops the reporter on a blank issue with none of the questions and none of the labels. A rename would cost slightly worse bug reports for months with nothing saying why.One asserts the file the link names exists; the other that the template still carries both labels and that the URL still does not. Verified by renaming the file (2 red) and by dropping a label (1 red). 512 tests pass.
PR description summarised by Claude Code.