feat(build): build reports name their client, and a failed build's summary says why #162

Merged
HumanBean merged 1 commit from gab9281/LongshotLauncher:codex/build-telemetry-toggle into main 2026-11-17 16:02:46 +00:00
Member

#128 already sends a summary of every build when the player has ticked Send performance statistics: how it ended, each stage's time and progress, and the CPU. Two things were still missing for Longshot-api's dashboards. The report didn't name its client apart from the launcher's version. And an automatic failure summary sent no reason, so every failed build landed under signature="none" and failures couldn't be told apart.

This PR is now that small delta on main. The earlier version, with its own Settings tick, its own CPU reader and BuildTelemetry.cs, duplicated #128 and is dropped.

Changes

  • Client: every build report (Send to the team, and the automatic summary) carries "client": "Longshot" (BuildReports.Client). Longshot-api counts a report without one as Longshot, so older launchers keep working.
  • Why a build failed, in the automatic summary: for a failed or terminated build, the summary now sends why it stopped and its last error line.
    • Both go through BuildReports.Diagnostic. The home folder becomes ~ first (BugReport.Scrub), then every path becomes [path], every game file's name (.sarc, .bfstm, .nup…) becomes [game file], and the text is cut to the server's 300 characters.
    • A completed or cancelled summary still sends no reason, even if an error line was seen earlier in the build.
    • The log is still never sent automatically: it only goes with Send to the team, after the player has seen it.
  • The consent text is unchanged: it already says "how each build ended", with no paths, names or saves.

Testing

  • python -I tests/test_launcher_core.py: 1465 checks passed, including the new ones (client on every report; a failed summary's why and error with paths and game files taken out; no reason on a completed one).
  • python -I tests/test_release.py: passed.
  • The app compiles for win-x64 and linux-x64 (installed .NET 10.0.114; the lock files are left as they are).

Not tested: a real failed build (Linux or Windows) reaching the relay; the signature label is checked in Longshot-api's own tests.

🤖 Generated with Claude Code

#128 already sends a summary of every build when the player has ticked **Send performance statistics**: how it ended, each stage's time and progress, and the CPU. Two things were still missing for Longshot-api's dashboards. The report didn't name its client apart from the launcher's version. And an automatic failure summary sent no reason, so every failed build landed under `signature="none"` and failures couldn't be told apart. This PR is now that small delta on `main`. The earlier version, with its own Settings tick, its own CPU reader and `BuildTelemetry.cs`, duplicated #128 and is dropped. ## Changes - **Client:** every build report (Send to the team, and the automatic summary) carries `"client": "Longshot"` (`BuildReports.Client`). Longshot-api counts a report without one as Longshot, so older launchers keep working. - **Why a build failed, in the automatic summary:** for a `failed` or `terminated` build, the summary now sends why it stopped and its last error line. - Both go through `BuildReports.Diagnostic`. The home folder becomes `~` first (`BugReport.Scrub`), then every path becomes `[path]`, every game file's name (`.sarc`, `.bfstm`, `.nup`…) becomes `[game file]`, and the text is cut to the server's 300 characters. - A `completed` or `cancelled` summary still sends no reason, even if an error line was seen earlier in the build. - The log is still never sent automatically: it only goes with **Send to the team**, after the player has seen it. - The consent text is unchanged: it already says "how each build ended", with no paths, names or saves. ## Testing - `python -I tests/test_launcher_core.py`: 1465 checks passed, including the new ones (client on every report; a failed summary's why and error with paths and game files taken out; no reason on a completed one). - `python -I tests/test_release.py`: passed. - The app compiles for `win-x64` and `linux-x64` (installed .NET 10.0.114; the lock files are left as they are). Not tested: a real failed build (Linux or Windows) reaching the relay; the signature label is checked in Longshot-api's own tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(build): add opt-in build telemetry
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
8be51b6a04
Collaborator

Possibly related, for context:

  • PR #128 feat(telemetry): performance statistics and failed builds, sent to the team — Merged telemetry implementation already reports build outcomes and stage timings when performance statistics is enabled; possible duplicate or replacement.
  • PR #42 WIP: feat(launcher): Send report, to the website's inbox — Open reporting work also adds launcher reporting and Settings consent controls, potentially overlapping preferences and telemetry handling.
Possibly related, for context: - PR #128 feat(telemetry): performance statistics and failed builds, sent to the team — Merged telemetry implementation already reports build outcomes and stage timings when performance statistics is enabled; possible duplicate or replacement. - PR #42 WIP: feat(launcher): Send report, to the website's inbox — Open reporting work also adds launcher reporting and Settings consent controls, potentially overlapping preferences and telemetry handling.
fix(build): identify the Longshot telemetry client
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
1114fa4d1a
Member

Thanks for this. I read it against current main (676e300e), and I think it should not merge as it is.

It duplicates #128's automatic build summary. Main already sends this summary to the same address when "Send performance statistics" is ticked: BuildStepViewModel.Summarize / Summary on main post BuildReports.Json(..., auto: true) to https://data-services.magicbean.dev/telemetry/build once per build, for completed, failed, cancelled and terminated builds. That tick's text already says it sends how each build ended and how long its steps took. This branch starts from bfa24486, from before #128 merged, so it adds a second sender and a second tick for the same data.

It does not merge or compile on main. BuildStepViewModel.cs, SettingsViewModel.cs, SettingsView.axaml and LauncherSettings.cs conflict where #128 added its ticks. With the conflicts resolved, BuildStepViewModel has two void Summarize(string outcome) methods. If one is renamed, a completed build is summarized twice (in Exited and in Complete), and a player with both ticks on is counted twice in longshot_builds_total.

Its summary differs from #128's, so the same build would land under different labels:

  • kind is build for a first build, and a go-back is update. Main sends first build, update, go back and rebuild (BuildReports.KindOf).
  • cpu is always empty. Main sends the CPU name, which the build series use as a label.
  • pc and settings are written differently (GPU: A, B and DLSS True; main: A and B GPU and DLSS on).
  • No field is cut to the service's limits (BuildReports.Cut), and the JSON does not go through BugReport.Scrub.
  • There is no summary on SIGTERM.
  • launcher is now Longshot-<tag> (1114fa4d). Main sends the tag alone, and launcher is a label of the build series.

What I checked and found OK: the tick is off by default, and nothing is sent before it is ticked. The summary holds no log, path, save or game file. A send that fails or times out is dropped and does not change the build.

Tests: BuildTelemetryChecks only checks Json() with input it makes itself, so the "no paths or saves" check cannot fail. Nothing checks that an unticked box sends nothing. SendAsync takes no address or client, so a test cannot point it at a fake server, as BuildReportChecks does for BuildReports.SendAsync. The 3 new texts are not in the catalogs.

Suggestion: if the goal is to let players send build summaries without the frame statistics, that is a small change on main: give the gate in BuildStepViewModel.Summary its own setting, keep BuildReports as the only sender, and update the statistics tick's text. If not, I would close this as covered by #128.

(Read through the forge API and a 3-way merge of the changed files. I did not build or run it.)

Thanks for this. I read it against current main (676e300e), and I think it should not merge as it is. **It duplicates #128's automatic build summary.** Main already sends this summary to the same address when "Send performance statistics" is ticked: `BuildStepViewModel.Summarize` / `Summary` on main post `BuildReports.Json(..., auto: true)` to `https://data-services.magicbean.dev/telemetry/build` once per build, for completed, failed, cancelled and terminated builds. That tick's text already says it sends how each build ended and how long its steps took. This branch starts from bfa24486, from before #128 merged, so it adds a second sender and a second tick for the same data. **It does not merge or compile on main.** `BuildStepViewModel.cs`, `SettingsViewModel.cs`, `SettingsView.axaml` and `LauncherSettings.cs` conflict where #128 added its ticks. With the conflicts resolved, `BuildStepViewModel` has two `void Summarize(string outcome)` methods. If one is renamed, a completed build is summarized twice (in `Exited` and in `Complete`), and a player with both ticks on is counted twice in `longshot_builds_total`. **Its summary differs from #128's, so the same build would land under different labels:** - `kind` is `build` for a first build, and a go-back is `update`. Main sends `first build`, `update`, `go back` and `rebuild` (`BuildReports.KindOf`). - `cpu` is always empty. Main sends the CPU name, which the build series use as a label. - `pc` and `settings` are written differently (`GPU: A, B` and `DLSS True`; main: `A and B GPU` and `DLSS on`). - No field is cut to the service's limits (`BuildReports.Cut`), and the JSON does not go through `BugReport.Scrub`. - There is no summary on SIGTERM. - `launcher` is now `Longshot-<tag>` (1114fa4d). Main sends the tag alone, and `launcher` is a label of the build series. **What I checked and found OK:** the tick is off by default, and nothing is sent before it is ticked. The summary holds no log, path, save or game file. A send that fails or times out is dropped and does not change the build. **Tests:** `BuildTelemetryChecks` only checks `Json()` with input it makes itself, so the "no paths or saves" check cannot fail. Nothing checks that an unticked box sends nothing. `SendAsync` takes no address or client, so a test cannot point it at a fake server, as `BuildReportChecks` does for `BuildReports.SendAsync`. The 3 new texts are not in the catalogs. **Suggestion:** if the goal is to let players send build summaries without the frame statistics, that is a small change on main: give the gate in `BuildStepViewModel.Summary` its own setting, keep `BuildReports` as the only sender, and update the statistics tick's text. If not, I would close this as covered by #128. (Read through the forge API and a 3-way merge of the changed files. I did not build or run it.)
feat(build): report client and failure details
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
3634896da6
feat(build): send the CPU's model in build statistics
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
520fe4d857
The build statistics sent an empty cpu, so every build was "not known" on
the dashboards. SystemInfo.CpuName reads it from the registry's
ProcessorNameString on Windows and /proc/cpuinfo's model name on Linux.

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

Pushed 520fe4d feat(build): send the CPU's model in build statistics. Build statistics sent "cpu": "", so every build showed CPU "not known" on the dashboard. SystemInfo.CpuName() now reads the registry's ProcessorNameString on Windows and the first model name in /proc/cpuinfo on Linux, and returns "" when neither has one (ARM's /proc/cpuinfo has no model name).

Tested on Linux:

  • python -I tests/test_launcher_core.py: 1379 checks passed, including a new CpuNameOf check.
  • The app builds for linux-x64 and win-x64 with 0 warnings and 0 errors.
  • On this PC (CachyOS, Ryzen 7 6800H), /proc/cpuinfo gives AMD Ryzen 7 6800H with Radeon Graphics.

Not tested: the Windows registry read at runtime (I have no Windows PC). It needs one Windows build with build statistics ticked, then a check that the dashboard's cpu label shows the CPU model.

No package lock changes: Microsoft.Win32.Registry is part of the .NET 10 shared framework.

Pushed 520fe4d `feat(build): send the CPU's model in build statistics`. Build statistics sent `"cpu": ""`, so every build showed CPU "not known" on the dashboard. `SystemInfo.CpuName()` now reads the registry's `ProcessorNameString` on Windows and the first `model name` in `/proc/cpuinfo` on Linux, and returns "" when neither has one (ARM's `/proc/cpuinfo` has no model name). Tested on Linux: - `python -I tests/test_launcher_core.py`: 1379 checks passed, including a new `CpuNameOf` check. - The app builds for `linux-x64` and `win-x64` with 0 warnings and 0 errors. - On this PC (CachyOS, Ryzen 7 6800H), `/proc/cpuinfo` gives `AMD Ryzen 7 6800H with Radeon Graphics`. Not tested: the Windows registry read at runtime (I have no Windows PC). It needs one Windows build with build statistics ticked, then a check that the dashboard's `cpu` label shows the CPU model. No package lock changes: `Microsoft.Win32.Registry` is part of the .NET 10 shared framework.
gab9281 force-pushed codex/build-telemetry-toggle from 520fe4d857
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to f8a0786bfc
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
2026-11-17 07:42:43 +00:00
Compare
gab9281 changed title from feat(build): add opt-in build telemetry to feat(build): build reports name their client, and a failed build's summary says why 2026-11-17 07:43:09 +00:00
Member

Follow-up stacked on this PR: #164. It fixes the scrubber (paths with spaces, .nx and the other dump/game formats, slashes in prose, links), makes the summary's why required and in English (the launcher's own SIGTERM now says why), and adds checks for each. It is one commit on top of f8a0786: merge it after this one, or cherry-pick it onto this branch. It also leaves one open question for you: should ProblemKind plus the stage be the signature, instead of free text?

Follow-up stacked on this PR: #164. It fixes the scrubber (paths with spaces, .nx and the other dump/game formats, slashes in prose, links), makes the summary's why required and in English (the launcher's own SIGTERM now says why), and adds checks for each. It is one commit on top of f8a0786: merge it after this one, or cherry-pick it onto this branch. It also leaves one open question for you: should ProblemKind plus the stage be the signature, instead of free text?
HumanBean deleted branch codex/build-telemetry-toggle 2026-11-17 16:02:47 +00:00
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!162
No description provided.