12c1af0261
crates/horizon-telemetry-server, its own workspace like the launcher's (the game's workspace never builds a web server): - POST /v1/batch (zstd, decoded and checked by horizon-telemetry), DELETE /v1/installs/<id>, GET /v1/aggregate (cached 10 min, CORS for the website), GET /healthz. - SQLite: machine descriptions stored once, one row of columns per session with 80-byte summary blobs, zstd bodies for crash/bug/benchmark, daily totals rebuilt when a day changes and kept after raw rows expire (180 days). About 190 bytes per session on disk. - Per-address token bucket (addresses in memory only), per-install daily cap, groups under 5 install-days hidden from the totals. - Tests: refusals, rate limit, daily cap, deletion (rows and totals), retention, storage size, and end to end with the launcher's uploader. - Dockerfile and a path-filtered CI workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.2 KiB
YAML
35 lines
1.2 KiB
YAML
name: telemetry-server
|
|
# The ingest server is its own workspace (crates/horizon-telemetry-server), so the checks job doesn't build
|
|
# it: this one does, when it or the crate it shares with the launcher and the game changes.
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'crates/horizon-telemetry/**'
|
|
- 'crates/horizon-telemetry-server/**'
|
|
- '.github/workflows/telemetry-server.yml'
|
|
pull_request:
|
|
paths:
|
|
- 'crates/horizon-telemetry/**'
|
|
- 'crates/horizon-telemetry-server/**'
|
|
- '.github/workflows/telemetry-server.yml'
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
defaults:
|
|
run:
|
|
working-directory: crates/horizon-telemetry-server
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: rustup toolchain install stable --profile minimal --component rustfmt --component clippy
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: crates/horizon-telemetry-server
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
|
- run: cargo +stable fmt --check
|
|
- run: cargo +stable clippy --all-targets --locked -- -D warnings
|
|
- run: cargo +stable test --locked
|