feat(build): build reports name their client, and a failed build's summary says why #162
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!162
Loading…
Reference in a new issue
No description provided.
Delete branch "gab9281/LongshotLauncher:codex/build-telemetry-toggle"
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?
#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 andBuildTelemetry.cs, duplicated #128 and is dropped.Changes
"client": "Longshot"(BuildReports.Client). Longshot-api counts a report without one as Longshot, so older launchers keep working.failedorterminatedbuild, the summary now sends why it stopped and its last error line.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.completedorcancelledsummary still sends no reason, even if an error line was seen earlier in the build.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.win-x64andlinux-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
Possibly related, for context:
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/Summaryon main postBuildReports.Json(..., auto: true)tohttps://data-services.magicbean.dev/telemetry/buildonce 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 frombfa24486, 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.axamlandLauncherSettings.csconflict where #128 added its ticks. With the conflicts resolved,BuildStepViewModelhas twovoid Summarize(string outcome)methods. If one is renamed, a completed build is summarized twice (inExitedand inComplete), and a player with both ticks on is counted twice inlongshot_builds_total.Its summary differs from #128's, so the same build would land under different labels:
kindisbuildfor a first build, and a go-back isupdate. Main sendsfirst build,update,go backandrebuild(BuildReports.KindOf).cpuis always empty. Main sends the CPU name, which the build series use as a label.pcandsettingsare written differently (GPU: A, BandDLSS True; main:A and B GPUandDLSS on).BuildReports.Cut), and the JSON does not go throughBugReport.Scrub.launcheris nowLongshot-<tag>(1114fa4d). Main sends the tag alone, andlauncheris 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:
BuildTelemetryChecksonly checksJson()with input it makes itself, so the "no paths or saves" check cannot fail. Nothing checks that an unticked box sends nothing.SendAsynctakes no address or client, so a test cannot point it at a fake server, asBuildReportChecksdoes forBuildReports.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.Summaryits own setting, keepBuildReportsas 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.)
Pushed
520fe4dfeat(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'sProcessorNameStringon Windows and the firstmodel namein/proc/cpuinfoon Linux, and returns "" when neither has one (ARM's/proc/cpuinfohas no model name).Tested on Linux:
python -I tests/test_launcher_core.py: 1379 checks passed, including a newCpuNameOfcheck.linux-x64andwin-x64with 0 warnings and 0 errors./proc/cpuinfogivesAMD 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
cpulabel shows the CPU model.No package lock changes:
Microsoft.Win32.Registryis part of the .NET 10 shared framework.520fe4d857f8a0786bfcfeat(build): add opt-in build telemetryto feat(build): build reports name their client, and a failed build's summary says whyFollow-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?