fix: tools/bugreport launcher finds a Python 3.8+ itself and never starts a Store alias (#166)
CI / verify (push) Successful in 5m20s
CI / pwsh (push) Successful in 1m53s
Release / release (push) Successful in 36s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2

Files changed:
- .gitea/workflows/ci.yml
- CHANGES.md
- INSTALL.md
- VERSION
- instructions/bug-report.md
- tools/README.md
- tools/bugreport
- tools/bugreport.ps1
- tools/bugreport.py
- tools/chemenu/tests/test_bugreport_launcher.py
- tools/chemenu/tests/test_instructions_shell.py
- tools/chemenu/tests/test_portability.py
This commit is contained in:
torben committed 2026-10-02 13:12:19 +02:00
1 parent c77bda2004
commit 5d937233b1
12 files changed
+539 -21

No files matched your search

+13 -7
View File
@@ -1,7 +1,7 @@
---
type: types/instruction.md
name: bug-report
description: How to collect a bug-report bundle when the stack misbehaves on this machine - run tools/bugreport.py, write a fact-only chronology, tell the user what the bundle contains, and stop short of sending it anywhere.
description: How to collect a bug-report bundle when the stack misbehaves on this machine - run tools/bugreport, write a fact-only chronology, tell the user what the bundle contains, and stop short of sending it anywhere.
manual: true
---
# Collect a bug report
@@ -32,7 +32,9 @@ the pointers at the failure decision points of [setup-instance.md](setup-instanc
`tools/bugreport.py` is a standalone script. It uses the standard library only and imports nothing
from the stack, so it still runs when `wikitool` does not start - no venv, a broken package, a Python
that is too old for the stack. It writes `reports/bugreport-<UTC stamp>/` and a zip beside it, in
that is too old for the stack. Its launcher `tools/bugreport` assumes no more than that: it looks for
a Python 3.8 or later on `PATH` itself, skipping the Microsoft Store's aliases, and needs neither
the preflight nor `.wikitool-tools.json`. It writes `reports/bugreport-<UTC stamp>/` and a zip beside it, in
four layers:
| Layer | Files | Holds |
@@ -94,16 +96,20 @@ session. The bundle does not leave that place because of it.
[template](#chronology-template) below. Facts only - no diagnosis. If the session's own history is
too long to reconstruct, say what is missing instead of filling the gap.
3. **Run the collector**, with whichever Python 3.8 or later the machine has:
3. **Run the collector** through its launcher, which finds a Python 3.8 or later itself:
```bash
python3 tools/bugreport.py --chronology reports/chronology.md
tools/bugreport --chronology reports/chronology.md
```
Add `--no-trace` if the user declined the trace, `--titles` if titles may stay,
`--transcript <file>` (repeatable) for a transcript the user pointed at, `--session <id>` to take a
trace other than the caller's, `--pseudonymise` if the user chose it (stage 1). `python3` may be `python` or `py -3` on Windows. If no Python starts
at all, that is the report: give the user the exact error text, verbatim.
trace other than the caller's, `--pseudonymise` if the user chose it (stage 1). Do not call a Python yourself: on Windows,
`python3` - and in PowerShell also `python` - can be the Microsoft Store's alias, which the
launcher skips. If the launcher finds no Python, it exits 1 and says why; that is the report -
give the user its text verbatim. If the user then names a working Python by its full path, run
the collector with it directly (`<full path to python> tools/bugreport.py` and the same
options).
4. **Stage 2, only if the bundle was pseudonymised.** Read, in the bundle: `CHRONOLOGY.md` and
`MANIFEST.md` completely; the review list `reports/bugreport-<stamp>.review.txt` completely; the
@@ -112,7 +118,7 @@ session. The bundle does not leave that place because of it.
domain, or project - one per line in `reports/candidates.txt`; `#` starts a comment. Then run:
```bash
python3 tools/bugreport.py --bundle reports/bugreport-<stamp> --candidates reports/candidates.txt
tools/bugreport --bundle reports/bugreport-<stamp> --candidates reports/candidates.txt
```
The script applies the candidates with the machinery of stage 1, reports which it did not apply