From d53a3667185e37682606520c078f65eee56b4c6c Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Thu, 15 Oct 2026 02:33:04 +0200 Subject: [PATCH] Opt-in data collection (2/5): the launcher asks, and Settings changes it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - First run (and when CONSENT_VERSION changes): a question over the launcher with four switches, all off, what each sends in plain words, what is never sent, "View what would be sent" (the exact JSON), and "Send nothing" / "Save choices". - Settings → Data collection: the same switches any time, the install ID and what waits, "View what would be sent" and "Delete my data" (server deletion, outbox cleared, new install ID). - The outbox is sent at start and on close (at most 3 s), only when there is a server (none yet) and only what the player allows. - CLI `horizon-launcher data status|allow|deny|show|delete|send|bug|benchmark` and MCP tools data_collection, set_data_collection, data_preview, delete_my_data, report_bug. Bug reports and benchmark uploads are printed for the player to confirm; logs are scrubbed and lose chat lines. - horizon-telemetry joins the launcher's paths (launcher.yml, release_train, pr_ready). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/launcher.yml | 4 +- launcher/README.md | 27 ++- launcher/src/cli.rs | 120 +++++++++++++ launcher/src/collection.rs | 307 +++++++++++++++++++++++++++++++ launcher/src/lib.rs | 1 + launcher/src/main.rs | 17 +- launcher/src/mcp.rs | 47 +++++ launcher/src/telemetry.rs | 317 +++++++++++++++++++++++++++++++++ tests/test_pr_ready.py | 1 + tools/release_train.py | 2 +- 10 files changed, 836 insertions(+), 7 deletions(-) create mode 100644 launcher/src/collection.rs create mode 100644 launcher/src/telemetry.rs diff --git a/.github/workflows/launcher.yml b/.github/workflows/launcher.yml index f0ac59a2b..2ab491207 100644 --- a/.github/workflows/launcher.yml +++ b/.github/workflows/launcher.yml @@ -1,6 +1,7 @@ name: launcher # Builds the launcher on Linux, macOS and Windows, and releases it by itself (docs/release-flow.md): after a -# push to main that changes the launcher or what it builds in (crates/horizon-prepare, crates/horizon-theme), +# push to main that changes the launcher or what it builds in (crates/horizon-prepare, crates/horizon-theme, +# crates/horizon-telemetry), # every 10 minutes (a release waiting for merges to settle goes out) and by hand, tools/release_train.py decides as # for the game. # A release is launcher-vX.Y.Z: the patch after the last launcher tag, or the next minor when a merged pull @@ -16,6 +17,7 @@ on: - 'launcher/**' - 'crates/horizon-prepare/**' - 'crates/horizon-theme/**' + - 'crates/horizon-telemetry/**' - '.github/workflows/launcher.yml' schedule: - cron: '7-59/10 * * * *' diff --git a/launcher/README.md b/launcher/README.md index 232421b26..e5edba182 100644 --- a/launcher/README.md +++ b/launcher/README.md @@ -84,9 +84,15 @@ The same binary is a command-line tool; without a subcommand it opens the window horizon-launcher account select play as this account horizon-launcher account offline play without an account horizon-launcher benchmark [--repeats N] measure the launcher (see Performance log) + horizon-launcher data [status] what data collection is allowed, the install ID, what waits + horizon-launcher data allow|deny performance, crashes, bugs, benchmarks + horizon-launcher data show exactly what would be sent + horizon-launcher data delete delete what was sent and what waits; new install ID + horizon-launcher data bug "" [--log] a bug report, printed for you to confirm first + horizon-launcher data benchmark upload a benchmark report, printed first `--json` prints JSON where there is something to report (`versions`, `install`, `notes`, -`next`, `links`, `menu-style`, `update --check`, `logs`, `account`, `benchmark`). Errors go to stderr with exit code 1. `server` runs in the terminal, +`next`, `links`, `menu-style`, `update --check`, `logs`, `account`, `benchmark`, `data`). Errors go to stderr with exit code 1. `server` runs in the terminal, so lines you type reach its console. `HORIZON_LAUNCHER_HOME` replaces the data folder (for scripts and tests). @@ -100,7 +106,9 @@ scripts and tests). `install_version`, `remove_version`, `prepare_resources`, `launch_client`, `start_server`, `server_command`, `server_log`, `stop_server`, `patch_notes`, `links`, `menu_style`, `logs`, `check_updates`, `accounts`, `sign_in` (returns the link and code for the player; the sign-in -finishes in the background), `sign_out` and `select_account`. +finishes in the background), `sign_out`, `select_account`, and for data collection +`data_collection`, `set_data_collection`, `data_preview`, `delete_my_data` and `report_bug` +(only with the player's say-so). A server started through MCP stops (cleanly, with `stop`) when the session ends. Starting one needs `accept_eula`, which an agent should only pass with the player's consent. @@ -136,8 +144,19 @@ The game writes its log to `logs/latest.log` in the game folder (`HORIZON_HOME`, archives the previous one at start as `logs/-.log.gz`, as Minecraft does. When it crashes it writes `crash-reports/crash-_