feat(telemetry): performance statistics and failed builds, sent to the team #128

Open
gab9281 wants to merge 11 commits from gab9281/LongshotLauncher:feat/telemetry into main
Member

When a build fails, is stopped or takes an hour, or players opt in to performance statistics, the team only hears about it if someone files an issue by hand. This lets the launcher send both, with the player's consent, to Longshot-api. Crash reports are no longer here: the game now builds and sends its own from its own crash window (MagicBeanDev/Longshot#983), so the launcher's --crash-* commands are gone. This replaces #74 (performance statistics), which it contains, and #46 (the crash window drawn by the launcher), which the game's window supersedes.

What changes

  • Send performance statistics (#74's two commits, rebased): the Settings tick, and Keep a copy of what was sent. Its conflicts with main were the settings next to it (Download updates early) and the translations; both sides are kept.

  • Send to the team on a failed build's page. The problem page a stopped build ends on gets a card with Send to the team, Show what is sent (the report exactly as it goes, as JSON) and, once sent, See it. It posts to https://data-services.magicbean.dev/telemetry/build, where Longshot-api writes one comment per failure on MagicBeanDev/Longshot#987 and counts its repeats. Nothing is sent until the player presses it.

    • The report holds the launcher's and the game's versions, the channel, what the build was, the system, the PC's memory, threads and GPUs, the build's settings, why it stopped and its last error line, and the build log's last 200 lines, with the home folder as ~ (BugReport.Scrub). No game file and no save.
    • The launcher sends it itself (Core/BuildReports.cs), not through the version's tools as perf does, since a failed build may have failed in those tools.
    • See it opens only a link on MagicBeanDev/Longshot's issues.
    • Its 11 texts are translated in all 12 catalogs.
  • How every build ended, with the statistics ticked (4821a4c). When a build ends, the launcher sends a summary on its own (auto): how it ended, each stage's progress and time, and the CPU. It covers completed, failed, the player's Stop (cancelled) and SIGTERM (terminated).

    • SIGTERM on the launcher (Linux, macOS): the build gets up to 3 s to send its summary before it stops.
    • SIGTERM on make_game.py (exit 143): the build ends as terminated, with "make_game.py was stopped by a signal (SIGTERM) from outside the launcher." on its page, translated in the 12 catalogs.
    • When: once per build, never for a build shown again from its saved state, and only when the player has ticked statistics.
    • The tick's text now says builds are included: "…and how each build ended and how long its steps took, with your GPU, CPU, OS and settings… Sent for a game when it next starts, for a build when it ends." It is changed in every catalog.
    • The CPU: /proc/cpuinfo on Linux, the registry on Windows.
  • Send crash reports automatically (71daab7): a Settings tick under the statistics, off by default. When it's on, the game sends a crash's report without showing its crash window.

    • Before a game starts, the launcher writes longshot_crash.ini (send=1) in its folder (Core/CrashReports.cs), only when the answer changed. The performance tick works the same way.
    • After a crash, the game's crash helper posts the report that Report automatically would post (MagicBeanDev/Longshot#983). If it can't be sent, the window shows as usual. A version from before #983 ignores the file.
    • Its 2 texts are translated in the 12 catalogs.

    Settings, with Send crash reports automatically

The server side is live. Longshot-api's build statistics are deployed, and I validated them against data-services.magicbean.dev:

  • each ending was counted in Prometheus (longshot_builds_total, longshot_build_stage_*_total);
  • a manual SIGTERM report reached #987;
  • 11 malformed payloads were refused with their reason, and an oversized one got 413;
  • a report in today's format (no outcome, auto, cpu or stages) is still accepted.

What is sent

Everything goes to https://data-services.magicbean.dev/telemetry/build with no account, ID or path. Longshot-api caps each field and refuses a report that doesn't fit.

Report When Needs Becomes
Failed build When the player presses Send to the team on the failed build's page The player's click (the page shows the report first) A comment on MagicBeanDev/Longshot#987, one per failure, then a count on it
Build summary (auto) When any build ends: completed, failed, Stop, SIGTERM Send performance statistics ticked Counts only, for the dashboards: no comment
Crash report (/telemetry/crash) Sent by the game's crash helper after a crash, with no window Send crash reports automatically ticked (otherwise the player's Send in the crash window) A comment on MagicBeanDev/Longshot#81 (its fields: Longshot#983)
Performance summary (/telemetry/perf) Sent by the game's nx2/perf_report.py at the next start Send performance statistics ticked Totals on the dashboards (its fields: Longshot#983)

Build report (Core/BuildReports.cs, at most 128 KiB)

Field Type On Send Auto Kept to What it is
v number 1 1 The report's format
launcher string yes yes 40 The launcher's version
version string yes yes 40 The game's version being built
channel string yes yes 40 The channel it comes from (Stable, RC, Nightly)
kind string yes yes 20 What the build was (first build, update)
outcome string failed, terminated any completed, failed, cancelled (Stop) or terminated (SIGTERM)
auto boolean false true Sent on its own, with the statistics ticked
os string yes yes 200 The OS, its version and architecture
cpu string yes yes 120 The CPU's name
pc string yes yes 300 Memory, threads and GPUs: 15 GB, 16 threads, NVIDIA and AMD GPU
settings string yes yes 400 Memory, workers and upscalers: memory automatic, workers automatic, DLSS off, FSR 4 off, XeSS off
why string yes empty 300 Why the build stopped, in a sentence
error string yes empty 300 Its last error line
stages object yes yes 12 stages Each stage by its id, below
log array of strings the last 200 lines empty 300 a line The build log's end, the home folder as ~

Stages (stages, keyed by id)

Id Stage
download Download the build tools
read Read your game files
lift Translate the game to PC code
compile Compile
finish Put the game together
shaders Prepare the shaders, when the build does
Field Type Limits What it is
progress number 0 to 1 How far the stage got
seconds number 0 to a week How long it ran
kept boolean It kept an earlier build's work (an update's game files, tools already here): its time is no measure of the PC's pace

What the team sees from summaries

Series Labels
longshot_builds_total outcome, stage (where it ended; done when completed), version, launcher, channel, os, cpu
longshot_build_stage_seconds_total, _progress_total, _runs_total stage, outcome, version, launcher, os, cpu, kept
Example: a build stopped after 25 minutes, sent on its own
{
  "v": 1, "launcher": "3.5.0", "version": "nightly-326-bbe421f5", "channel": "Nightly", "kind": "first build",
  "outcome": "cancelled", "auto": true, "os": "CachyOS (Linux 7.3.4-1-cachyos), X64",
  "cpu": "AMD Ryzen 7 6800H with Radeon Graphics", "pc": "15 GB, 16 threads, NVIDIA and AMD GPU",
  "settings": "memory automatic, workers automatic, DLSS off, FSR 4 off, XeSS off", "why": "", "error": "",
  "stages": {
    "download": {"progress": 1, "seconds": 0, "kept": true},
    "read": {"progress": 1, "seconds": 220, "kept": false},
    "lift": {"progress": 1, "seconds": 300, "kept": false},
    "compile": {"progress": 0.64, "seconds": 1200, "kept": false},
    "finish": {"progress": 0, "seconds": 0, "kept": false}
  },
  "log": []
}

Checks

  • python -I tests/test_launcher_core.py: 1430 checks passed, with CrashReportChecks (longshot_crash.ini read by the helper's rule, written only when the answer changes), BuildReportChecks (what a report holds, the home folder taken out, the log's last lines, each server answer from a fake server) and BuildStatisticsChecks (stage times and progress, the CPU's name, the outcome and auto fields, an auto summary without log, why or error). Built with SDK 10.0.114, not the pinned 10.0.404, which isn't installed on this PC.
  • python -I tests/test_release.py: OK.
  • Translations: no faults, and no more missing texts than main has.
  • Screenshot: tools/screenshots' launcher-settings scene, above. There's still no screenshot of the failed build's card.

🤖 Generated with Claude Code

When a build fails, is stopped or takes an hour, or players opt in to performance statistics, the team only hears about it if someone files an issue by hand. This lets the launcher send both, with the player's consent, to Longshot-api. Crash reports are no longer here: the game now builds and sends its own from its own crash window (MagicBeanDev/Longshot#983), so the launcher's `--crash-*` commands are gone. This replaces #74 (performance statistics), which it contains, and #46 (the crash window drawn by the launcher), which the game's window supersedes. ## What changes - **Send performance statistics** (#74's two commits, rebased): the Settings tick, and Keep a copy of what was sent. Its conflicts with main were the settings next to it (Download updates early) and the translations; both sides are kept. - **Send to the team on a failed build's page.** The problem page a stopped build ends on gets a card with **Send to the team**, **Show what is sent** (the report exactly as it goes, as JSON) and, once sent, **See it**. It posts to `https://data-services.magicbean.dev/telemetry/build`, where Longshot-api writes one comment per failure on MagicBeanDev/Longshot#987 and counts its repeats. Nothing is sent until the player presses it. - The report holds the launcher's and the game's versions, the channel, what the build was, the system, the PC's memory, threads and GPUs, the build's settings, why it stopped and its last error line, and the build log's last 200 lines, with the home folder as `~` (`BugReport.Scrub`). No game file and no save. - The launcher sends it itself (`Core/BuildReports.cs`), not through the version's tools as perf does, since a failed build may have failed in those tools. - See it opens only a link on MagicBeanDev/Longshot's issues. - Its 11 texts are translated in all 12 catalogs. - **How every build ended, with the statistics ticked** (4821a4c). When a build ends, the launcher sends a summary on its own (`auto`): how it ended, each stage's progress and time, and the CPU. It covers completed, failed, the player's Stop (`cancelled`) and SIGTERM (`terminated`). - **SIGTERM on the launcher** (Linux, macOS): the build gets up to 3 s to send its summary before it stops. - **SIGTERM on `make_game.py`** (exit 143): the build ends as `terminated`, with "make_game.py was stopped by a signal (SIGTERM) from outside the launcher." on its page, translated in the 12 catalogs. - **When:** once per build, never for a build shown again from its saved state, and only when the player has ticked statistics. - **The tick's text** now says builds are included: "…and how each build ended and how long its steps took, with your GPU, CPU, OS and settings… Sent for a game when it next starts, for a build when it ends." It is changed in every catalog. - **The CPU:** `/proc/cpuinfo` on Linux, the registry on Windows. - **Send crash reports automatically** (71daab7): a Settings tick under the statistics, off by default. When it's on, the game sends a crash's report without showing its crash window. - Before a game starts, the launcher writes `longshot_crash.ini` (`send=1`) in its folder (`Core/CrashReports.cs`), only when the answer changed. The performance tick works the same way. - After a crash, the game's crash helper posts the report that **Report automatically** would post (MagicBeanDev/Longshot#983). If it can't be sent, the window shows as usual. A version from before #983 ignores the file. - Its 2 texts are translated in the 12 catalogs. ![Settings, with Send crash reports automatically](https://git.magicbean.dev/attachments/82bee253-42c8-4b75-882d-324b0f909a86) The server side is live. Longshot-api's build statistics are deployed, and I validated them against `data-services.magicbean.dev`: - each ending was counted in Prometheus (`longshot_builds_total`, `longshot_build_stage_*_total`); - a manual SIGTERM report reached #987; - 11 malformed payloads were refused with their reason, and an oversized one got 413; - a report in today's format (no outcome, auto, cpu or stages) is still accepted. ## What is sent Everything goes to `https://data-services.magicbean.dev/telemetry/build` with no account, ID or path. Longshot-api caps each field and refuses a report that doesn't fit. | Report | When | Needs | Becomes | |---|---|---|---| | Failed build | When the player presses **Send to the team** on the failed build's page | The player's click (the page shows the report first) | A comment on MagicBeanDev/Longshot#987, one per failure, then a count on it | | Build summary (`auto`) | When any build ends: completed, failed, Stop, SIGTERM | **Send performance statistics** ticked | Counts only, for the dashboards: no comment | | Crash report (`/telemetry/crash`) | Sent by the game's crash helper after a crash, with no window | **Send crash reports automatically** ticked (otherwise the player's Send in the crash window) | A comment on MagicBeanDev/Longshot#81 (its fields: Longshot#983) | | Performance summary (`/telemetry/perf`) | Sent by the game's `nx2/perf_report.py` at the next start | **Send performance statistics** ticked | Totals on the dashboards (its fields: Longshot#983) | ### Build report (`Core/BuildReports.cs`, at most 128 KiB) | Field | Type | On Send | Auto | Kept to | What it is | |---|---|---|---|---|---| | `v` | number | 1 | 1 | | The report's format | | `launcher` | string | yes | yes | 40 | The launcher's version | | `version` | string | yes | yes | 40 | The game's version being built | | `channel` | string | yes | yes | 40 | The channel it comes from (Stable, RC, Nightly) | | `kind` | string | yes | yes | 20 | What the build was (`first build`, `update`) | | `outcome` | string | `failed`, `terminated` | any | | `completed`, `failed`, `cancelled` (Stop) or `terminated` (SIGTERM) | | `auto` | boolean | false | true | | Sent on its own, with the statistics ticked | | `os` | string | yes | yes | 200 | The OS, its version and architecture | | `cpu` | string | yes | yes | 120 | The CPU's name | | `pc` | string | yes | yes | 300 | Memory, threads and GPUs: `15 GB, 16 threads, NVIDIA and AMD GPU` | | `settings` | string | yes | yes | 400 | Memory, workers and upscalers: `memory automatic, workers automatic, DLSS off, FSR 4 off, XeSS off` | | `why` | string | yes | empty | 300 | Why the build stopped, in a sentence | | `error` | string | yes | empty | 300 | Its last error line | | `stages` | object | yes | yes | 12 stages | Each stage by its id, below | | `log` | array of strings | the last 200 lines | empty | 300 a line | The build log's end, the home folder as `~` | #### Stages (`stages`, keyed by id) | Id | Stage | |---|---| | `download` | Download the build tools | | `read` | Read your game files | | `lift` | Translate the game to PC code | | `compile` | Compile | | `finish` | Put the game together | | `shaders` | Prepare the shaders, when the build does | | Field | Type | Limits | What it is | |---|---|---|---| | `progress` | number | 0 to 1 | How far the stage got | | `seconds` | number | 0 to a week | How long it ran | | `kept` | boolean | | It kept an earlier build's work (an update's game files, tools already here): its time is no measure of the PC's pace | #### What the team sees from summaries | Series | Labels | |---|---| | `longshot_builds_total` | `outcome`, `stage` (where it ended; `done` when completed), `version`, `launcher`, `channel`, `os`, `cpu` | | `longshot_build_stage_seconds_total`, `_progress_total`, `_runs_total` | `stage`, `outcome`, `version`, `launcher`, `os`, `cpu`, `kept` | <details><summary>Example: a build stopped after 25 minutes, sent on its own</summary> ```json { "v": 1, "launcher": "3.5.0", "version": "nightly-326-bbe421f5", "channel": "Nightly", "kind": "first build", "outcome": "cancelled", "auto": true, "os": "CachyOS (Linux 7.3.4-1-cachyos), X64", "cpu": "AMD Ryzen 7 6800H with Radeon Graphics", "pc": "15 GB, 16 threads, NVIDIA and AMD GPU", "settings": "memory automatic, workers automatic, DLSS off, FSR 4 off, XeSS off", "why": "", "error": "", "stages": { "download": {"progress": 1, "seconds": 0, "kept": true}, "read": {"progress": 1, "seconds": 220, "kept": false}, "lift": {"progress": 1, "seconds": 300, "kept": false}, "compile": {"progress": 0.64, "seconds": 1200, "kept": false}, "finish": {"progress": 0, "seconds": 0, "kept": false} }, "log": [] } ``` </details> ## Checks - `python -I tests/test_launcher_core.py`: 1430 checks passed, with `CrashReportChecks` (`longshot_crash.ini` read by the helper's rule, written only when the answer changes), `BuildReportChecks` (what a report holds, the home folder taken out, the log's last lines, each server answer from a fake server) and `BuildStatisticsChecks` (stage times and progress, the CPU's name, the outcome and auto fields, an auto summary without log, why or error). Built with SDK 10.0.114, not the pinned 10.0.404, which isn't installed on this PC. - `python -I tests/test_release.py`: OK. - Translations: no faults, and no more missing texts than main has. - Screenshot: `tools/screenshots`' `launcher-settings` scene, above. There's still no screenshot of the failed build's card. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Longshot's crash window (MagicBeanDev/Longshot#593) gets Send to the team
(MagicBeanDev/Longshot#141). The game folder has no Python, so the window starts
the launcher that made the build (sender= in longshot_version.txt, from
LONGSHOT_CRASH_SENDER, which MakeGameCommand now sets): --crash-preview makes the
report with the build's own nx2/crash_report.py, --crash-send sends that file.
No window, no lock: answered before Avalonia starts, beside a launcher that may be
open. The launcher's own crash window of the earlier design is gone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmeEEMir1hCDFZ8BmR
The game's helper starts `<launcher> --crash-window <folder> <window.txt>` and the launcher draws the
window, the same on Windows and Linux, in the launcher's look and the player's language: what went
wrong, Report automatically (the card of everything it would send, sent only when pressed) and
Report manually (the report on the clipboard and the prefilled issue form). It exits 0 once shown,
3 when it can't be, and then the game shows its own boxes.

- Core/CrashWindowInfo.cs: window.txt, the card (crash_report.py --card) and the send's answer read
- App/CrashWindow.cs: the window, in the old crash window's look, with its two pictures back
- the translations for all 15 catalogs
- checks in tests/launcher_core/CrashChecks.cs

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmeEEMir1hCDFZ8BmR
A tick on the Settings page, off by default, for Longshot's performance statistics
(MagicBeanDev/Longshot#206). Before a game starts, the launcher makes the folder's
longshot_perf.ini agree with it (perf_report.py --tick on|off, waited for at most
5 s) and, with it on, sends what the game left in perf_pending/ (perf_report.py
--send, in a process of its own). Only the folder's own version's tools run it, and
a version without perf_report.py is left as it is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmeEEMir1hCDFZ8BmR
Under Send performance statistics, a second tick, on by default: each summary
sent is kept as sent in the game folder's perf_sent/, for the player to read.
Off, the launcher writes keep_sent=0 with the tick (perf_report.py --tick on
--keep-sent off, Longshot#206), which keeps no more copies and deletes those
kept. --keep-sent is passed only when off, so a perf_report.py from before it
takes the rest as it did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmeEEMir1hCDFZ8BmR
feat(build): Send to the team, on the page a failed build ends on
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
6eb4efefcd
A build that fails tells only the player, unless they copy the report and
open an issue themselves. The problem page now has Send to the team: it
posts the report to Longshot-api's /telemetry/build
(data-services.magicbean.dev), which writes one comment per failure on the
build issue at git.magicbean.dev and counts its repeats there, as #81 does
for crashes.

Nothing is sent until the player presses it, and Show what is sent shows
the report as it goes: the launcher's and the game's versions, the
channel, what the build was, the system, the PC's memory, threads and
GPUs, the build's settings, why it stopped and its last error line, and
the build log's last 200 lines, the home folder as ~ (BugReport.Scrub). No
game file, no save. Once sent, See it opens the comment; a link that isn't
on the build issue is not offered.

The launcher sends it itself (Core/BuildReports.cs), not the version's
tools as for a crash or the performance statistics: a failed build may
have failed in those tools. Copy for a bug report shares the PC and
settings lines with it.

Checks: BuildReportChecks (what a report holds, the home folder taken out,
the log's last lines, and each of the server's answers from a fake one).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator

Possibly related, for context:

  • PR #42 WIP: feat(launcher): Send report, to the website's inbox — Earlier overlapping report submission for stopped builds
Possibly related, for context: - PR #42 WIP: feat(launcher): Send report, to the website's inbox — Earlier overlapping report submission for stopped builds
gab9281 force-pushed feat/telemetry from 6eb4efefcd
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to 777ae2679e
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
2026-11-16 01:31:36 +00:00
Compare
gab9281 changed title from feat(telemetry): crash window, performance statistics and failed builds, sent to the team to feat(telemetry): performance statistics and failed builds, sent to the team 2026-11-16 01:31:52 +00:00
gab9281 force-pushed feat/telemetry from 777ae2679e
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to 70afec7e4e
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
2026-11-16 05:56:00 +00:00
Compare
feat(build): how each build ended, its stages' progress and time, and the CPU, for the team
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 2s
4821a4c34e
A build report now says how the build ended (outcome: completed, failed, cancelled when the player pressed Stop,
terminated when make_game.py got SIGTERM, exit code 143, or the launcher did while it built), this PC's CPU
(/proc/cpuinfo's model name, Windows' ProcessorNameString) and each stage by its id with its progress (0..1), its
seconds and whether it kept an earlier build's work: {"read": {"progress": 1, "seconds": 212.4, "kept": false}, ...}.
BuildProgress times each stage from its start to the next one's, stopping where the build stopped.

Send on the problem page sends it with the log, as before. With Settings' "Send performance statistics" ticked, every
build's end is also sent on its own (auto: true), without the log, why or error line, so cancels and SIGTERM reach
the team too; Longshot-api only counts those. The setting's text says so, in every catalog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
madebyjordan left a comment

Reviewed the diff at 4821a4c, read against main (bfa2448), HumanBean's review of #74, and what Longshot-api already posted on Longshot#987.

Run here (Windows 11, SDK 10.0.404):

  • dotnet build App/LongshotLauncher.csproj: 0 warnings, 0 errors.
  • PerfChecks and BuildReportChecks, run early (right after ReleaseNotesChecks): they pass, including the home-folder scrub on a Windows path inside the JSON (BugReport.Scrub matches the doubled \). The full core run stops at ShellLinkChecks, the same as on main.
  • translations.py: the same 26 missing texts per catalog as main.

CI has not run the tests on this PR. Forgejo's "Compile and test" skips pull requests, and 4821a4c has no CircleCI status, so your Linux run is the only full one so far.

Two things to fix before merge (inline):

  1. Turning the statistics off still isn't honoured when the folder's tools are gone. This is HumanBean's point 1 on #74, and #74's commits came over unchanged. BeforePlay returns before --tick off runs, so the folder keeps send=1 and the game keeps writing summaries. If the player ticks it again later, the summaries from the time it was off get sent.
  2. Send's text doesn't say the report is public. Longshot#987 can be read without signing in. The card says "who see it on git.magicbean.dev", which reads as the team only. #46's window said "posted publicly", and HumanBean counted that toward its consent.

Also worth a look (inline):

  • BeforePlay still blocks the window's thread for up to 5 s when Play is pressed (HumanBean's point 2 on #74).
  • kind sends the button's verb: Build, Update to, Go back to (#119), Rebuild. It does not send first build / update, as the description's table and example say.
  • Log lines aren't cut to the server's 300 characters, so one long line (a compiler command line) could push a report over 128 KiB. The player would then get "refused: HTTP 413" with no way to send it.
  • The launcher's SIGTERM now stops make_game.py even with the statistics unticked. Before, the build carried on. That's probably right, but it isn't a statistics change, so it's worth a line in the description. When the system stops the whole session, make_game.py gets the same SIGTERM, so Exited(143) on the window's thread and Terminated() on the signal's thread can both pass the summarized check.
  • A stage that make_game runs again keeps timing from its first start, so stage seconds can add up to more than the build took.

Merges: #59, #55 and #49 merge cleanly with this PR. #130 conflicts with it, in the 12 catalogs only, because both PRs append at the end. Putting the new texts after a related key in the middle of each file would avoid that.

Reviewed the diff at 4821a4c, read against main (bfa2448), HumanBean's review of #74, and what Longshot-api already posted on Longshot#987. **Run here (Windows 11, SDK 10.0.404):** - `dotnet build App/LongshotLauncher.csproj`: 0 warnings, 0 errors. - `PerfChecks` and `BuildReportChecks`, run early (right after `ReleaseNotesChecks`): they pass, including the home-folder scrub on a Windows path inside the JSON (`BugReport.Scrub` matches the doubled `\`). The full core run stops at `ShellLinkChecks`, the same as on main. - `translations.py`: the same 26 missing texts per catalog as main. CI has not run the tests on this PR. Forgejo's "Compile and test" skips pull requests, and 4821a4c has no CircleCI status, so your Linux run is the only full one so far. **Two things to fix before merge** (inline): 1. **Turning the statistics off still isn't honoured when the folder's tools are gone.** This is HumanBean's point 1 on #74, and #74's commits came over unchanged. `BeforePlay` returns before `--tick off` runs, so the folder keeps `send=1` and the game keeps writing summaries. If the player ticks it again later, the summaries from the time it was off get sent. 2. **Send's text doesn't say the report is public.** Longshot#987 can be read without signing in. The card says "who see it on git.magicbean.dev", which reads as the team only. #46's window said "posted publicly", and HumanBean counted that toward its consent. **Also worth a look** (inline): - `BeforePlay` still blocks the window's thread for up to 5 s when Play is pressed (HumanBean's point 2 on #74). - `kind` sends the button's verb: `Build`, `Update to`, `Go back to` (#119), `Rebuild`. It does not send `first build` / `update`, as the description's table and example say. - Log lines aren't cut to the server's 300 characters, so one long line (a compiler command line) could push a report over 128 KiB. The player would then get "refused: HTTP 413" with no way to send it. - The launcher's SIGTERM now stops `make_game.py` even with the statistics unticked. Before, the build carried on. That's probably right, but it isn't a statistics change, so it's worth a line in the description. When the system stops the whole session, `make_game.py` gets the same SIGTERM, so `Exited(143)` on the window's thread and `Terminated()` on the signal's thread can both pass the `summarized` check. - A stage that `make_game` runs again keeps timing from its first start, so stage seconds can add up to more than the build took. **Merges:** #59, #55 and #49 merge cleanly with this PR. #130 conflicts with it, in the 12 catalogs only, because both PRs append at the end. Putting the new texts after a related key in the middle of each file would avoid that.
@ -243,2 +246,4 @@
if (OperatingSystem.IsWindows())
foreach (var line in CarryDriverSettings(folder)) said = said == null ? line : said + " " + line;
// (the performance statistics: the folder's tick made the player's answer, and what the last sessions left sent)
PerfReports.BeforePlay(folder, Settings.SendPerformanceStatistics, Settings.KeepSentPerformanceStatistics, Tools);
Member

This runs on the window's thread: HomeViewModel.Play and the Ready page's Play call Service.Play directly. So the first Play after the tick changes can freeze the window for up to 5 s while Python starts (longer on Windows with Defender scanning). HumanBean's point 2 on #74 is still open.

This runs on the window's thread: HomeViewModel.Play and the Ready page's Play call `Service.Play` directly. So the first Play after the tick changes can freeze the window for up to 5 s while Python starts (longer on Windows with Defender scanning). HumanBean's point 2 on #74 is still open.
@ -508,0 +514,4 @@
/// The report Send on the problem page sends (BuildReports), with the build's last error line; auto: the statistics' summary
public BuildReports.Failure Failure(string why, string outcome = BuildReports.Failed, bool auto = false) =>
new(Job.Service.OwnTag, Job.Version, Job.Channel, Job.Verb.Trim(), BugReport.System(), PcLine(), SettingsLine(), why,
Member

Job.Verb.Trim() is the start button's English verb: Build, Update to, Go back to (#119) or Rebuild. The description's table and example say first build / update, and the comments on #987 so far came from the manual test. Sending an id made from Job.Kind (plus Job.Older) would keep the label the same if the button's words change.

`Job.Verb.Trim()` is the start button's English verb: `Build`, `Update to`, `Go back to` (#119) or `Rebuild`. The description's table and example say `first build` / `update`, and the comments on #987 so far came from the manual test. Sending an id made from `Job.Kind` (plus `Job.Older`) would keep the label the same if the button's words change.
@ -508,0 +544,4 @@
}
/// The launcher was sent SIGTERM while this build ran: its summary sent (waited for, briefly), then the build stopped
public void Terminated()
Member

Two things here.

  1. This cancels the build even with the statistics unticked (Summarize returns early, then cancel.Cancel() kills make_game's tree). Before, SIGTERM to the launcher left make_game.py running. Probably the better behaviour, but worth saying in the description.

  2. This runs on the signal's thread. When the system stops the whole session, make_game.py gets the same SIGTERM, and Exited(143) runs on the window's thread at the same time. summarized is a plain bool, so both can send. Interlocked.Exchange on it would make it once only.

Two things here. 1. This cancels the build even with the statistics unticked (Summarize returns early, then `cancel.Cancel()` kills make_game's tree). Before, SIGTERM to the launcher left `make_game.py` running. Probably the better behaviour, but worth saying in the description. 2. This runs on the signal's thread. When the system stops the whole session, `make_game.py` gets the same SIGTERM, and `Exited(143)` runs on the window's thread at the same time. `summarized` is a plain bool, so both can send. `Interlocked.Exchange` on it would make it once only.
@ -705,0 +786,4 @@
/// What became of Send, under it ("" before it is pressed)
public string SendSaid => answer switch
{
null => Tr.T("Sends the report below to the Longshot team, who see it on git.magicbean.dev. Nothing is sent until you press it."),
Member

Longshot#987 is public: it can be read without signing in. This sentence reads as "only the team sees it". Something like "Posts the report below publicly on Longshot's build-failures issue at git.magicbean.dev, for the team. Nothing is sent until you press it." would say where it goes, as #46's window did. The 12 catalogs would need it too.

Longshot#987 is public: it can be read without signing in. This sentence reads as "only the team sees it". Something like "Posts the report below publicly on Longshot's build-failures issue at git.magicbean.dev, for the team. Nothing is sent until you press it." would say where it goes, as #46's window did. The 12 catalogs would need it too.
@ -0,0 +41,4 @@
/// The report as it is sent, and as the page shows it: JSON, the home folder as ~
public static string Json(Failure f, string? home)
{
IEnumerable<string> log = f.Auto ? [] : f.Log.Count > LogLines ? f.Log.Skip(f.Log.Count - LogLines) : f.Log;
Member

The lines aren't cut to the server's 300 characters here. One long line (a compiler command line, a Python traceback's repr) can push the report past 128 KiB. The player then gets "The server refused the report: HTTP 413" and has no way to send it. If each line (and why/error) is cut to the server's limits here, Show what is sent also matches what the server keeps.

The lines aren't cut to the server's 300 characters here. One long line (a compiler command line, a Python traceback's repr) can push the report past 128 KiB. The player then gets "The server refused the report: HTTP 413" and has no way to send it. If each line (and `why`/`error`) is cut to the server's limits here, Show what is sent also matches what the server keeps.
@ -168,2 +177,4 @@
current = stage;
stage.State = StageState.Running;
stage.Began ??= now;
stage.Ended = null; // (make_game may run a stage again: its time runs on from its first start)
Member

A stage that is run again times from its first start, so its seconds include the stages between. Stage seconds can then add up to more than the build took, which longshot_build_stage_seconds_total would add up. Minor, if make_game rarely does it.

A stage that is run again times from its first start, so its seconds include the stages between. Stage seconds can then add up to more than the build took, which `longshot_build_stage_seconds_total` would add up. Minor, if make_game rarely does it.
@ -0,0 +78,4 @@
{
var plan = Plan(on, keep, Ticked(folder), KeptSent(folder), Waiting(folder));
if (plan.Tick == null && !plan.Send) return;
if (ToolsFor(folder, tools) is not { } mine) return;
Member

With the tick turned off (plan.Tick == false) and this version's tools gone (ToolsFor is null), this returns, so the folder keeps send=1. The game keeps recording into perf_pending/, and if the player ticks it again, what it recorded while off gets sent. The off case doesn't need perf_report.py: the launcher could write send=0 into longshot_perf.ini itself and delete perf_pending/ (HumanBean's point 1 on #74).

With the tick turned off (`plan.Tick == false`) and this version's tools gone (`ToolsFor` is null), this returns, so the folder keeps `send=1`. The game keeps recording into `perf_pending/`, and if the player ticks it again, what it recorded while off gets sent. The off case doesn't need perf_report.py: the launcher could write `send=0` into `longshot_perf.ini` itself and delete `perf_pending/` (HumanBean's point 1 on #74).
feat(settings): send crash reports automatically, without the game's crash window
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
71daab70b9
A Settings tick under the performance statistics, off by default. When on, each game folder gets longshot_crash.ini
(send=1) before its game starts (CrashReports.BeforePlay, written only when the answer changes), and after a crash
the game's crash helper sends the report it would send from Report automatically, with no window. A report that can't
be sent shows the window as usual. Versions from before the game's side ignore the file.

The two texts are translated in the 12 catalogs that have the statistics' texts.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015KgSKmKkUWA2ugWzrw7GN4
HumanBean left a comment

Re-review at 71daab7. I read the code only: no tests or builds run. I read it against madebyjordan's review at 4821a4c, HumanBean's review of #74, and the game side in MagicBeanDev/Longshot#983 (host/hos_crash_dialog.c/.h, nx2/perf_report.py).

For a player, this adds three things: a Send to the team card on a failed build's page; a summary of how each build ended, sent when performance statistics are ticked; and a new Send crash reports automatically tick, off by default.

The earlier review: nothing has changed

71daab7 adds only the crash tick, its file and its texts. It changes none of the code madebyjordan commented on, so all of those points still stand. I won't repeat them:

  • Blocking: turning statistics off isn't honoured when the version's tools are gone (Core/PerfReports.cs:81, still return before --tick off). This is also HumanBean's point 1 on #74. 71daab7 shows the fix is easy: CrashReports.BeforePlay writes its ini itself, with no Python. The off case for perf can do the same: remove longshot_perf.ini and empty perf_pending/ and perf_sent/, as set_sending(folder, False) in 983 does.
  • Blocking: Send's text still doesn't say the report is public (BuildStepViewModel.cs:789, "who see it on git.magicbean.dev").
  • Still open: BeforePlay can block the window's thread for up to 5 s. kind still sends the button's verb, not first build/update as the description says. Log lines, why and error are not cut to 300 characters, so a report can go over 128 KiB and get a 413. summarized is a plain bool, so the signal thread and the window's thread can both send. A stage that runs again keeps the time from its first start. The launcher's SIGTERM now stops make_game.py even with statistics off, and the description doesn't say so.

New findings

Blocking: the crash tick has the same problem as Send, and it's worse here. The Settings text (SettingsView.axaml:114) says the game "sends its report to the team". With the tick on, the helper posts the report to Longshot's issue 81 (MagicBeanDev/Longshot#81), which anyone can read without signing in, and the player never sees the report first. Send at least shows the report on the page before it goes. For consent, this text has to say where the report goes, for example "...posts its report publicly on Longshot's crash issue at git.magicbean.dev, for the team: ...". The 12 catalogs would need it too. Whatever wording is chosen for Send should be used here as well.

The signal thread reads the window's data (BuildStepViewModel.cs:547). Terminated() runs on the signal's thread. It calls Failure(), and Failure() enumerates log.Last(200) and progress.Times() while Line/ErrorLine are still being added through Ui.Post. The JSON then drops the log anyway, because auto is true. If BuildLog throws "collection was modified", the exception goes unhandled in the signal handler: the summary isn't sent and cancel.Cancel() never runs. Building the auto summary without reading the log, or posting Terminated to the window's thread and waiting for it there, would avoid this. This goes with the summarized race above.

The description gets the --crash-* commands wrong. It says the launcher's --crash-* commands "are gone". They were never on the launcher's main (I grepped main@origin), and the game on Longshot's main doesn't call the launcher. They existed only in #46. Nothing is removed, so there's no compatibility to keep. The description should say the commands aren't added.

71daab7, Send crash reports automatically

The code is correct:

  • BeforePlay writes before the game starts, and only when the answer differs.
  • Turned off after being on, it writes send=0. It doesn't delete the file, and the helper reads send=0 as "ask". Off and never chosen, it writes no file.
  • The file goes in the game folder (PlayFolder's folder), the same folder the helper reads (hos_crash_record_dir(), the game folder).
  • The parsing rules agree. The launcher uses Trim() == "send=1" per line. The helper skips spaces and tabs before send=1 and spaces, tabs and \r after it. The launcher only ever writes send=0 or send=1.
  • Every way the game starts (Home's Play, the Ready page, --play, --launch, and so the shortcuts) goes through PlayFolder.
  • A version from before 983 ignores the file. That's harmless: the old window still asks.

The check in PerfChecks.cs covers all of this. Putting CrashReportChecks in PerfChecks.cs is odd, but that's a nit.

Contract with Longshot 983

The contract is OK:

  • longshot_crash.ini with send=1 in the game folder.
  • perf_report.py <folder> --tick on|off [--keep-sent off] and <folder> --send.
  • longshot_perf.ini with send=1 / keep_sent=0, plus perf_pending/ and perf_sent/.

Both sides use the same names, keys, folder and arguments. perf_report.py is new in 983 and isn't on Longshot's main. Until 983 ships in a version, no game folder has it, so the performance tick sends no game summaries. The build summaries and Send don't depend on 983.

Merge order: they can merge in either order without breaking anything. 983 first is better: until a game version has 983, the two ticks promise something that doesn't happen yet.

Overlaps

  • #74 and #46 are already closed. Nothing to do.
  • #42 (WIP) sends stopped-build and crash reports to the website's inbox. This PR's Send and 983's crash window replace it. A maintainer should close it as superseded, or its author should say what it still adds.
  • #130 conflicts with this PR in the 12 catalogs, where both append at the end. It's a textual conflict, and keeping both sides resolves it.

Testing

The author ran the core checks on Linux. madebyjordan built it on Windows and ran PerfChecks and BuildReportChecks. Nobody has posted a run of the crash tick with a 983 game that actually crashes. There's still no screenshot of the failed build's card.

Re-review at 71daab7. I read the code only: no tests or builds run. I read it against madebyjordan's review at 4821a4c, HumanBean's review of https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/74, and the game side in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/983 (`host/hos_crash_dialog.c/.h`, `nx2/perf_report.py`). For a player, this adds three things: a **Send to the team** card on a failed build's page; a summary of how each build ended, sent when performance statistics are ticked; and a new **Send crash reports automatically** tick, off by default. ## The earlier review: nothing has changed 71daab7 adds only the crash tick, its file and its texts. It changes none of the code madebyjordan commented on, so all of those points still stand. I won't repeat them: - **Blocking:** turning statistics off isn't honoured when the version's tools are gone (`Core/PerfReports.cs:81`, still `return` before `--tick off`). This is also HumanBean's point 1 on https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/74. 71daab7 shows the fix is easy: `CrashReports.BeforePlay` writes its ini itself, with no Python. The off case for perf can do the same: remove `longshot_perf.ini` and empty `perf_pending/` and `perf_sent/`, as `set_sending(folder, False)` in 983 does. - **Blocking:** Send's text still doesn't say the report is public (`BuildStepViewModel.cs:789`, "who see it on git.magicbean.dev"). - Still open: `BeforePlay` can block the window's thread for up to 5 s. `kind` still sends the button's verb, not `first build`/`update` as the description says. Log lines, `why` and `error` are not cut to 300 characters, so a report can go over 128 KiB and get a 413. `summarized` is a plain bool, so the signal thread and the window's thread can both send. A stage that runs again keeps the time from its first start. The launcher's SIGTERM now stops `make_game.py` even with statistics off, and the description doesn't say so. ## New findings **Blocking: the crash tick has the same problem as Send, and it's worse here.** The Settings text (`SettingsView.axaml:114`) says the game "sends its report to the team". With the tick on, the helper posts the report to Longshot's issue 81 (https://git.magicbean.dev/MagicBeanDev/Longshot/issues/81), which anyone can read without signing in, and the player never sees the report first. Send at least shows the report on the page before it goes. For consent, this text has to say where the report goes, for example "...posts its report publicly on Longshot's crash issue at git.magicbean.dev, for the team: ...". The 12 catalogs would need it too. Whatever wording is chosen for Send should be used here as well. **The signal thread reads the window's data** (`BuildStepViewModel.cs:547`). `Terminated()` runs on the signal's thread. It calls `Failure()`, and `Failure()` enumerates `log.Last(200)` and `progress.Times()` while `Line`/`ErrorLine` are still being added through `Ui.Post`. The JSON then drops the log anyway, because `auto` is true. If `BuildLog` throws "collection was modified", the exception goes unhandled in the signal handler: the summary isn't sent and `cancel.Cancel()` never runs. Building the auto summary without reading the log, or posting `Terminated` to the window's thread and waiting for it there, would avoid this. This goes with the `summarized` race above. **The description gets the `--crash-*` commands wrong.** It says the launcher's `--crash-*` commands "are gone". They were never on the launcher's `main` (I grepped `main@origin`), and the game on Longshot's `main` doesn't call the launcher. They existed only in https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/46. Nothing is removed, so there's no compatibility to keep. The description should say the commands aren't added. ## 71daab7, Send crash reports automatically The code is correct: - `BeforePlay` writes before the game starts, and only when the answer differs. - Turned off after being on, it writes `send=0`. It doesn't delete the file, and the helper reads `send=0` as "ask". Off and never chosen, it writes no file. - The file goes in the game folder (`PlayFolder`'s `folder`), the same folder the helper reads (`hos_crash_record_dir()`, the game folder). - The parsing rules agree. The launcher uses `Trim() == "send=1"` per line. The helper skips spaces and tabs before `send=1` and spaces, tabs and `\r` after it. The launcher only ever writes `send=0` or `send=1`. - Every way the game starts (Home's Play, the Ready page, `--play`, `--launch`, and so the shortcuts) goes through `PlayFolder`. - A version from before 983 ignores the file. That's harmless: the old window still asks. The check in `PerfChecks.cs` covers all of this. Putting `CrashReportChecks` in `PerfChecks.cs` is odd, but that's a nit. ## Contract with Longshot 983 The contract is OK: - `longshot_crash.ini` with `send=1` in the game folder. - `perf_report.py <folder> --tick on|off [--keep-sent off]` and `<folder> --send`. - `longshot_perf.ini` with `send=1` / `keep_sent=0`, plus `perf_pending/` and `perf_sent/`. Both sides use the same names, keys, folder and arguments. `perf_report.py` is new in 983 and isn't on Longshot's `main`. Until 983 ships in a version, no game folder has it, so the performance tick sends no game summaries. The build summaries and Send don't depend on 983. **Merge order:** they can merge in either order without breaking anything. 983 first is better: until a game version has 983, the two ticks promise something that doesn't happen yet. ## Overlaps - https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/74 and https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/46 are already closed. Nothing to do. - https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/42 (WIP) sends stopped-build and crash reports to the website's inbox. This PR's Send and 983's crash window replace it. A maintainer should close it as superseded, or its author should say what it still adds. - https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/130 conflicts with this PR in the 12 catalogs, where both append at the end. It's a textual conflict, and keeping both sides resolves it. ## Testing The author ran the core checks on Linux. madebyjordan built it on Windows and ran PerfChecks and BuildReportChecks. Nobody has posted a run of the crash tick with a 983 game that actually crashes. There's still no screenshot of the failed build's card.
@ -508,0 +544,4 @@
}
/// The launcher was sent SIGTERM while this build ran: its summary sent (waited for, briefly), then the build stopped
public void Terminated()
Owner

This runs on the signal's thread. Summarize -> Failure() enumerates log.Last(200) and progress.Times() while the window's thread is still adding lines (Ui.Post(() => Line(line))). The auto JSON drops the log anyway. If that enumeration throws, the exception goes unhandled here, so the summary isn't sent and cancel.Cancel() is skipped. Build the auto summary without the log, or post this to the window's thread and wait for it (which also settles the summarized race).

This runs on the signal's thread. `Summarize` -> `Failure()` enumerates `log.Last(200)` and `progress.Times()` while the window's thread is still adding lines (`Ui.Post(() => Line(line))`). The auto JSON drops the log anyway. If that enumeration throws, the exception goes unhandled here, so the summary isn't sent and `cancel.Cancel()` is skipped. Build the auto summary without the log, or post this to the window's thread and wait for it (which also settles the `summarized` race).
@ -102,0 +111,4 @@
<StackPanel Spacing="4">
<CheckBox Classes="tick" Content="{c:T 'Send crash reports automatically'}" IsChecked="{Binding SendCrashReportsAutomatically}"/>
<TextBlock FontSize="12" Foreground="{StaticResource InkSoft}" TextWrapping="Wrap" Margin="28,0,0,0"
Text="{c:T 'After a crash, the game sends its report to the team without showing its crash window: the version, your GPU, CPU, OS and settings, and the end of the log, with no paths or names. If it cannot be sent, the window shows as usual.'}"/>
Owner

With this tick on, the report is posted without the player seeing it, to Longshot's issue 81 (MagicBeanDev/Longshot#81), which anyone can read. "Sends its report to the team" reads as private. Say where it goes, e.g. "...posts its report publicly on Longshot's crash issue at git.magicbean.dev, for the team: ...", in the 12 catalogs too, with the same wording as Send's card.

With this tick on, the report is posted without the player seeing it, to Longshot's issue 81 (https://git.magicbean.dev/MagicBeanDev/Longshot/issues/81), which anyone can read. "Sends its report to the team" reads as private. Say where it goes, e.g. "...posts its report publicly on Longshot's crash issue at git.magicbean.dev, for the team: ...", in the 12 catalogs too, with the same wording as Send's card.
@ -0,0 +78,4 @@
{
var plan = Plan(on, keep, Ticked(folder), KeptSent(folder), Waiting(folder));
if (plan.Tick == null && !plan.Send) return;
if (ToolsFor(folder, tools) is not { } mine) return;
Owner

Still the blocker from the last review. CrashReports.BeforePlay in this PR now shows the way: for the off case, the launcher can remove longshot_perf.ini and empty perf_pending/ and perf_sent/ itself (what 983's set_sending(folder, False) does), without needing the version's tools.

Still the blocker from the last review. `CrashReports.BeforePlay` in this PR now shows the way: for the off case, the launcher can remove `longshot_perf.ini` and empty `perf_pending/` and `perf_sent/` itself (what 983's `set_sending(folder, False)` does), without needing the version's tools.
With the tick off, longshot_perf.ini is removed and perf_pending/ and
perf_sent/ emptied, as Longshot's perf_report.py set_sending does, with
no Python: a folder whose version's tools were let go no longer keeps
send=1. The tick on is written the same way, for a version with
perf_report.py, so Play no longer waits up to 5 s for a Python on the
window's thread. Only --send still runs perf_report.py, in a process
left running.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Send's text on a failed build's page now says the report is posted
publicly on Longshot's build-failures issue at git.magicbean.dev, for the
team, and that nothing is sent until it is pressed. The Send crash reports
automatically tick says the game posts its report publicly on Longshot's
crash issue, without showing its window. Both are translated in the 12
catalogs, and the texts this pull request adds now sit after the Settings
page's Check for updates, not at the catalogs' end.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
kind is first build, update, go back or rebuild, made from the job's
kind and whether it goes back (BuildReports.KindOf), so the server's
labels stay the same when the buttons' words change.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Each log line, why and the error line are cut to 300 characters, and the
other texts to Longshot-api's limits (40 for the versions and the
channel, 20 the kind, 200 the OS, 120 the CPU, 300 the PC, 400 the
settings), on a whole character, never half a surrogate pair. The home
folder is taken out before a text is cut, so no cut leaves part of the
user's name. A log of long lines in a script of 3 bytes a character
loses its oldest lines until the report fits in 128 KiB. Show what is
sent is the report as it goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The summary is claimed once only (BuildReports.Once, Interlocked), so
the window's thread ending the build on make_game.py's exit 143 and the
signal's thread can't both send it. Terminated, on the signal's thread,
no longer reads the build log or the stages there: the summary is made
on the window's thread and waited for at most 1 s
(BuildReports.OnWindow), then its answer at most 2 s. An auto summary
reads no log at all. Anything thrown on the way is caught, and the build
is stopped all the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(build): a stage make_game runs again is timed by its runs added up
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 2s
f0f0803831
Its seconds were timed from its first start, so they took in the stages
run between, and the stages' seconds could add up to more than the build
took. Each run's time is now added to the earlier ones'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Owner

I pushed fixes for the review's points as six commits on top of yours (head f0f08038). Your five commits are unchanged, and main (5d86f319) doesn't conflict, so there was no rebase.

  • bbe57801 The launcher writes longshot_perf.ini itself (PerfReports.SetSending), the way perf_report.py's set_sending does. Off removes the file and empties perf_pending/ and perf_sent/ even when the version's tools are gone. On is written only for a version that has perf_report.py. Play no longer waits up to 5 s for Python on the window's thread; only --send still runs it, detached.
  • f7cab4a3 Send's card and the "Send crash reports automatically" text say the report is posted publicly on Longshot's issues. The 12 catalogs are updated, and this PR's keys now sit after "Check for updates when the launcher starts" instead of at the end, so they no longer conflict with #130.
  • 65802415 kind is an id: first build, update, go back or rebuild, not the button's verb.
  • 3dfb2edf Each field is cut to the server's limit, on a whole character, after the home folder is taken out. If a report is still over 128 KiB, its oldest log lines are dropped until it fits.
  • d04f7f10 On SIGTERM, the summary is sent once (Interlocked). It is made on the window's thread (waiting at most 1 s), anything thrown is caught, and cancel.Cancel() is in a finally. Auto summaries don't read the log.
  • f0f08038 A stage that runs again is timed as the sum of its runs.

Each one has checks in tests/launcher_core. None of this has been compiled or run on my side, so please build and run test_launcher_core.py before merging.

The description needs updating to match:

  • the kind values;
  • the enforced limits;
  • the launcher now writing the perf tick itself;
  • SIGTERM now stopping make_game.py even with statistics off;
  • the --crash-* commands "aren't added" rather than "are gone": they were never on main;
  • stage seconds are now summed.
I pushed fixes for the review's points as six commits on top of yours (head f0f08038). Your five commits are unchanged, and main (5d86f319) doesn't conflict, so there was no rebase. - **bbe57801** The launcher writes `longshot_perf.ini` itself (`PerfReports.SetSending`), the way `perf_report.py`'s `set_sending` does. Off removes the file and empties `perf_pending/` and `perf_sent/` even when the version's tools are gone. On is written only for a version that has `perf_report.py`. Play no longer waits up to 5 s for Python on the window's thread; only `--send` still runs it, detached. - **f7cab4a3** Send's card and the "Send crash reports automatically" text say the report is posted **publicly** on Longshot's issues. The 12 catalogs are updated, and this PR's keys now sit after "Check for updates when the launcher starts" instead of at the end, so they no longer conflict with https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/130. - **65802415** `kind` is an id: `first build`, `update`, `go back` or `rebuild`, not the button's verb. - **3dfb2edf** Each field is cut to the server's limit, on a whole character, after the home folder is taken out. If a report is still over 128 KiB, its oldest log lines are dropped until it fits. - **d04f7f10** On SIGTERM, the summary is sent once (`Interlocked`). It is made on the window's thread (waiting at most 1 s), anything thrown is caught, and `cancel.Cancel()` is in a `finally`. Auto summaries don't read the log. - **f0f08038** A stage that runs again is timed as the sum of its runs. Each one has checks in `tests/launcher_core`. **None of this has been compiled or run on my side**, so please build and run `test_launcher_core.py` before merging. The description needs updating to match: - the `kind` values; - the enforced limits; - the launcher now writing the perf tick itself; - SIGTERM now stopping `make_game.py` even with statistics off; - the `--crash-*` commands "aren't added" rather than "are gone": they were never on main; - stage seconds are now summed.
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 2s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/telemetry:gab9281-feat/telemetry'
git switch 'gab9281-feat/telemetry'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!128
No description provided.