feat(reports): the local bug report lists what it holds and what it left out in manifest.json #575
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!575
Loading…
Reference in a new issue
No description provided.
Delete branch "mooki/Longshot:feat/problem-report-next-44"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type: feat · Risk: low · Tested on: Linux, RTX 4090 (game-free tests with GCC and Clang, one windowless run); Windows compile only · Needs: Windows (NVIDIA and AMD), and anyone with a game that crashed last time (T-RZPN, T-Y95P)
Why
A local bug report is a folder of loose files, and nothing in it says what is missing: a picture that never came, a log cut in the middle or a copy that failed look like a complete report until someone opens every file (#44). This adds
manifest.jsonnext toreport.txt: every file with its size, whether it was included, left out or failed and why, and the categories that are never collected. Nothing new is collected and nothing is sent.What is measured: a game-free test of the report writer fails on main and passes here with GCC and Clang; the Windows-target compile of its fixture passes; one windowless run on Linux (RTX 4090) made a report from the menu and its manifest agrees with the four files it wrote; the whole game-free suite on the final head (below). Not measured: anything on Windows (the fixture was only compiled for it), AMD, Intel, the Steam Deck, a report made in play (the run stood on the title screen of a new profile), a crash, a cut log or a failed copy in the game itself (the test covers them with made-up files), and speed.
What changed
This adds
manifest.jsonnext toreport.txtin the local bug report: every file with its size, whether it was included, omitted or failed and why, and the categories that are never collected, written from the same list of entries thatreport.txtprints under "What this folder holds", so the two cannot disagree. The manifest is published last, so a report that cannot be completed leaves none. Nothing new is collected and nothing is sent; a second commit makes a missing log saylog file not found.gpu/vk/vk_bug_report.cpp: the existing writer keeps its collection (current and previous log, one picture, path redaction, the menu's current settings, the Forgejo form link) and now also keeps one list of what it did with each file: name, size,included,omitted(missing, or deliberately excluded) orfailed, a reason, and whether the file is a candidate for attaching.report.txtprints that list under "What this folder holds" and writesmanifest.json(schema 1:schema,report_id,when,files) from the same entries, so the two cannot disagree. Sizes are the bytes actually written, counted while the log is copied (no second read), and each copy's reads, writes and close are checked: a copy that failed is listed asfailedand its file is removed, not listed as an attachment. A log shortened by the existing first 1 MiB plus last 9 MiB rule saysmiddle omitted (bounded copy). A log that does not exist sayslog file not found, which is different from a failed copy.manifest.json.newand renamed oncereport.txtis written. If either file cannot be written the existing failed-report message is shown (it names the file) and no completed manifest is left.omittedandshareable: falsewith a reason beginningexcluded;:save/,game-files/, the rawlongshot_options.iniandlongshot_env.txt,pending/,running/andlocal-only/. None of these is scanned, copied or acknowledged. The crash and unclean-end texts inbug-reports/pending, the running markers and the local-only dumps (#75) stay separate and untouched.shareablemeans a candidate for a person to review, never permission to send.gpu/vk/vk_bug_report.h: a comment on the two inventories.docs/development.md(new section "Local bug-report inventory": the schema, the statuses, who may read it) andREADME.md(the Bug report bullet, and its link to the Longshot issue form) describe the file.tests/test_bug_report.py: the existing assertions stay (form fields, redaction, settings, NUL bytes, long log, picture lifecycle, wiring); added: aninventory()check run on every report the test makes (schema, identity, entries against the real files, sizes, human text equal to the manifest, no staged file left), an empty log (size 0, included), an absent log, a failed log copy, a report and a manifest that cannot be written (nothing completed is left), and the pending, running and local-only files unchanged afterwards.--source-rootruns the same test against another source tree (used for the main comparison below).docs/tested/2026-11-14-bug-report-manifest-mooki-run01.md: the run below, as the new one-file format asks.The manifest of the run described below, as written (its
report.txthas the same twelve entries, one per line, under "What this folder holds"):Reviewer notes:
render_report,render_manifest) and the publication at the end ofwrite()ingpu/vk/vk_bug_report.cpp, theninventory()in the test.log file not found) is separate on purpose and can be dropped without touching the first.git apply --check): #218 replaces the log copy's and report'sfopenwith no-follow helpers in the lines this change rewrites; that hunk applies on main and fails here, so whichever lands second keeps those helpers for the manifest's andreport.txt's writes too. This change makes no link-hardening claim. #141 adds a bullet right after the Bug report bullet inREADME.md(context conflict only; its changes tovk_bug_report.cppapply cleanly on both). #53 only adds historicaldocs/tested/files and does not touch this branch's lines.Later work, not started here
Sizes are from the earlier implementation, as it was written (lines of runtime code in the writer unless noted), not estimates for a rebased patch. Each slice would carry its own tests and docs.
Measurements
Verdict: the new test of the report writer fails on main (the report folder holds no
manifest.json) and passes with this PR with GCC and Clang, the Windows-target compile of its fixture passes (compile only), and one windowless Linux run (RTX 4090) made a report from the menu whose manifest agrees with the four files it wrote (all seven checks held). Not a speed change: the manifest is written only when a player makes a Bug report, so there is nothing to time. Windows execution, AMD, Intel, the Steam Deck, a report made in play and a crash, a cut log or a failed copy in the game itself are not measured.Branch state: on main
7ff5256e000671d0fccf27f77ba41275916b21df; head14223d6a32440dd6d03b666b543bd260aea9604d; whole game-free suite on this head:553 passed, 2 failed, 16 skipped(main7ff5256e000671d0fccf27f77ba41275916b21df:553 passed, 2 failed, 16 skipped). The 2 failing tests fail on main the same way:tests/test_cpm_discovery.py,tests/test_walk_key.py. The commits are unchanged by rebases apart from the results table.main:
543846ebb0(2026-11-14)this PR: feat/problem-report-next-44-m543846eb @
d05d8d52cHardware: Arch Linux, kernel 7.2.15, Core i9-13900K, 94 GB, RTX 4090 with NVIDIA 615.78.08 for the game run (the tests use no GPU); g++ 16.2.1 and clang++ 23.1.3
Scene: the test makes reports from made-up game folders and logs; the game run is the title screen of a new profile, not gameplay
Method: the new test compiles the real writer with a small driver and checks every report folder it writes; the same test file is run against main's source for the comparison. The game run used the Insert menu's own keys (
RX_VK_MENU_SCRIPT), windowless, once. No timing is compared.How to reproduce:
python -I -B tests/test_bug_report.py --cxx g++(and--cxx clang++); for the main column add--source-rootwith the path of a checkout of main; the game run needs a built game, a new profile andRX_VK_MENU_SCRIPT=55:INS,57:TABR,58:TABR,60:UP,61:UP,62:UP,65:ENTER,80:ESC(the menu opens at 55 s, goes two tabs right to Gameplay, up three rows from the top row to Bug report, and presses Enter at 65 s)543846ebbd05d8d52ctests/test_bug_report.py(the version of this PR)manifest.jsonreport.txtlists the same entriesWhich head each result was made at: the focused test runs, the Windows-target compile, the native build and the game run were made at
06e8c8d70(the first two commits);d05d8d52cadds only thedocs/tested/file, so the compiled source is the same. The whole suite ran atd05d8d52c, wheretests/test_bug_report.pyandtests/test_tested_configurations.pyboth pass.The second commit makes a missing log say
log file not foundinstead oflog could not be read or copied. Its two new assertions were run against the first commit's source: the one for the missing log fails there (bug report: a log file that does not exist is not said to be missing) and both pass here.The game run (native Linux build of the first two commits, version
v3.0.0-rc.3-79-g06e8c8d70 (source 9b23b78d), one run, windowless, an empty profile,RX_VK_PRECOMPILE=0):The seven checks the run script made on the folder all held: schema 1 and
report_idequal to the folder name; the included entries are exactly the four files in the folder; each included size equals the file's size on disk;report.txtlists every entry with the same status, size and reason;picture.pngandlongshot_log.txtare included;pending/,running/andlocal-only/are omitted and not shareable; nomanifest.json.newis left. The folder's files were 213803 bytes (log), 2765798 (picture), 5353 (report.txt) and 1943 (manifest.json). No kernel or NVRM line, no core dump. The frame counts in the run's summary are not a measurement: the machine was shared and pipelines compiled on demand.Screenshots
Nothing on screen changes. The Bug report row, its help and its saved message are the same as before.
Flags and settings
None. The existing Gameplay, Bug report row writes the extra file. Nothing is switched on or off and nothing new is collected.
Testing
Tested: the new test both ways (table above), with GCC and Clang, through the shared measuring lock; the compile of the fixture and the writer for the Windows target; a native Linux build of the first two commits and the one windowless game run described above (a new profile at the title screen, report made from the menu, folder and manifest read back and checked, the menu's saved message and the report's own picture looked at); the new
docs/tested/file builds into the assembled table (python -I scripts/tested_configurations.py, exit 0) andtests/test_tested_configurations.pypasses. The whole game-free suite on the final headd05d8d52c(Clang for the C++ fixtures, a fresh home folder, idle class, 6 at once,--strict):554 passed, 1 failed, 16 skipped in 158 s. The one failure,tests/test_walk_key.py(its fixture no longer links:undefined reference to hos_oot_autoload_input), fails the same way on main543846ebbwhen run alone; #497 fixes it. The skipped tests are the ones the suite itself reports as Windows-only or missing a local prerequisite. No core dump came from the run.Built for Windows and Linux at the current head, not run: At
14223d6a32440dd6d03b666b543bd260aea9604d, the Windows x86-64 Vulkan renderer DLL and all 50 selected host translation units were cross-built on Linux with llvm-mingw 20261104 (Clang 23.1.5), using the project's production flags and pinned dependencies (renderer: 35 newly compiled / 170 reused; host: 1 newly compiled / 49 reused; lifted C: 0 newly compiled / 80 reused; all Windows units: 36 newly compiled / 613 reused from matching object-cache entries), the renderer DLL linked and the full game executable linked; nothing was run on Windows or under Wine, and this is neither the project's hosted builder run nor a Windows UTF-8 run-time path test.The exact same head
14223d6a32440dd6d03b666b543bd260aea9604dalso compiled and linked its full native Linux executable and renderer with Clang 23.1.3 through the documented resume path (490 newly compiled units, 1 matching Linux-cache units, source stampe545bf33), using the verified target-neutral C from lift5c175a4727d82f85e425e85400dca17fea0750fbrather than carrying the patch onto another commit; neither Linux binary was run.CPU target (this revision builds the game for the build PC's own CPU, #524; the two builds differ on purpose): the Windows cross-build keeps the builder's pinned
-march=x86-64-v3 -ffp-contract=off(488 of its 649 compile commands carry it; the other 161 carry no-marchflag; none carries-march=native,-mtuneor-DLONGSHOT_NATIVE_CPU), so the Windows binaries are not built for this PC's CPU. The native Linux build used the revision's default-march=native, which clang resolved on this PC (13th Gen Intel(R) Core(TM) i9-13900K) toraptorlake_raptorlake_5fe3e3650f(build log line:build: the game is built for this PC's CPU (raptorlake_raptorlake_5fe3e3650f)), so the Linux binaries are built for that CPU's instruction set and tuning; neither binary was run.Not tested: native Windows execution of the fixture or of the game; a Windows game build; AMD, Intel and the Steam Deck; a report made in play with a map, a previous log and a long log in the game itself (the test makes them with made-up files); a game that crashed or ended unclean before the report (the pending files are only checked in the test); a full disk or a read-only game folder in the game; a real window and a controller. The run was at the title screen, so
longshot_log.1.txtwas absent and listed asomitted.Must be tested:
manifest.jsonwith the files in the folder, expecting the same names and sizes and the excluded categories listed asomitted(test request T-RZPN; by hand).bug-reports/pendingis unchanged andpending/is listed asomitted, expecting no pending text in the folder (test request T-Y95P; by hand).Risks
What could break: A full or unwritable drive can stop the manifest from being written. The row then shows the existing failed message with the file's name, rather than claiming a complete report. The inventory adds nothing to what is collected, and the logs still carry the register and memory rows they carried before;
shareableis a hint for a person reviewing the files, never consent to send them. The writer runs on its own thread when the menu asks for a report, not per frame.Turning it off: Reverting the commits removes
manifest.jsonand leaves existing report folders alone.Compatibility:
save/is excluded and listed asomitted, and no save content is read or copied. Existing report folders are left alone.longshot_options.ini: no new key; nothing is switched on or off, and the raw options file stays excluded (only the existing safe settings summary is collected).manifest.jsontoo, andreport.txtlists the same entries under "What this folder holds".gpu/vk/vk_api.h.Issues
See #44. It stays open: the slices above, the launcher and the sending policy are still to do.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.docs/tested/for each new measured run (format indocs/tested-configurations.md; no appended row or assembled view).mainand passing here.tests/that reads changed source updated in this PR, not weakened.14223d6a32440dd6d03b666b543bd260aea9604d(under Testing); nothing was run on Windows at this head, so UTF-8 path behavior at run time is not claimed.New on this forge; not opened on GitHub.
Carried onto current main
7ff5256e0(no conflict; main's new commits do not touch the bug report files). Head14223d6a3; whole game-free suite on it: 553 passed, 2 failed, 16 skipped. The build for both systems follows.d05d8d52cb14223d6a32WIP: feat(reports): the local bug report lists what it holds and what it left out in manifest.jsonto feat(reports): the local bug report lists what it holds and what it left out in manifest.jsonBuilt at the current head
14223d6a32440dd6d03b666b543bd260aea9604dfor Windows (llvm-mingw cross-build) and Linux (native); both linked without errors, nothing was run. The build box is ticked for this head and the details are under Testing. Every box is done, so this is ready for review.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.