Data services API for crash reports, performance profiles, and querying, by @gab9281
  • Go 99%
  • Shell 0.7%
  • Dockerfile 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-17 02:58:14 -05:00
.claude ci(docs): the documents regenerate on every commit, and a stale one fails the pull request 2026-11-14 18:01:34 -05:00
.forgejo/workflows feat(mcp): /mcp/issue, the bug reporter people's AIs file Longshot's issues through 2026-11-15 03:35:14 -05:00
.githooks ci(docs): the documents regenerate on every commit, and a stale one fails the pull request 2026-11-14 18:01:34 -05:00
api fix(perf): accept summaries up to 192 KiB 2026-11-17 02:54:10 -05:00
cmd feat(telemetry): identify the game client in crash and perf reports 2026-11-17 01:55:54 -05:00
docs fix(perf): accept summaries up to 192 KiB 2026-11-17 02:54:10 -05:00
explanation feat(mcp): /mcp/issue signs in with Forgejo and files as the person 2026-11-15 15:14:56 -05:00
mcp feat: the public host is data-services.magicbean.dev 2026-11-15 15:55:24 -05:00
pkg feat(telemetry): /telemetry/build, the launcher's failed builds on their own issue 2026-11-15 19:23:23 -05:00
report feat(mcp): /mcp/issue signs in with Forgejo and files as the person 2026-11-15 15:14:56 -05:00
scripts ci: no SonarQube, golangci-lint alone 2026-11-14 18:03:30 -05:00
telemetry fix(perf): accept summaries up to 192 KiB 2026-11-17 02:54:10 -05:00
test/e2e fix(build): show a new label set at 0 on its first scrape 2026-11-17 02:10:24 -05:00
.containerignore ci: lint, tests, e2e, docs, SonarQube and the images 2026-11-14 17:35:24 -05:00
.gitignore ci: no SonarQube, golangci-lint alone 2026-11-14 18:03:30 -05:00
.golangci.yml ci: no SonarQube, golangci-lint alone 2026-11-14 18:03:30 -05:00
AGENTS.md ci: no SonarQube, golangci-lint alone 2026-11-14 18:03:30 -05:00
CLAUDE.md chore: bootstrap Longshot-api 2026-11-14 16:48:08 -05:00
Containerfile feat(mcp): /mcp/issue, the bug reporter people's AIs file Longshot's issues through 2026-11-15 03:35:14 -05:00
go.mod feat(pkg): authn identity tokens, and the OAuth, Discord and TTL store parts 2026-11-14 17:25:42 -05:00
go.sum feat(pkg): authn identity tokens, and the OAuth, Discord and TTL store parts 2026-11-14 17:25:42 -05:00
LICENSE chore: bootstrap Longshot-api 2026-11-14 16:48:08 -05:00
README.md docs(telemetry): every payload as a table, generated with telemetry.json 2026-11-16 01:35:55 -05:00

Longshot-api

Magic Bean's server side for Longshot, in Go, published on one host, https://data-services.magicbean.dev, a path prefix per root. Each root is its own service:

Root Binary What it does Public address
telemetry/ cmd/telemetry Crash reports in, one comment per crash on Longshot's issue 81 out; performance summaries in, Prometheus metrics out; the launcher's failed builds in, one comment per failure on the build issue out (BUILD_ISSUE), and with the statistics ticked how every build ended and its stages' times, counted for Prometheus /telemetry/crash, /telemetry/perf, /telemetry/build
mcp/ cmd/mcp-gate The sign-in in front of every MCP server (Discord's, and Forgejo's for /mcp/issue): the OAuth servers MCP clients log in with, and Traefik's check on each request /mcp/<name> (Grafana's: /mcp/grafana), and the sign-in at /oauth/ and /.well-known/
mcp/issue/ cmd/mcp-issue The bug reporter people's AIs talk to: it finds the issues and pull requests a problem already has, asks for what the issue forms need, and opens an issue or adds to one with the person's own forge login (the work is report/'s) /mcp/issue

Shared code is in pkg/, packages that know nothing of Longshot and that every service may reuse: an issue tracker interface with Forgejo behind it (pkg/issues, pkg/forgejo), identity tokens (pkg/authn), OAuth, Discord, OTLP, the Prometheus text format, and so on.

This repository is the app: code, tests and images. The Kubernetes definitions that run it are in Bean-Ops (deploy/).

Work on it

scripts/install-hooks.sh          once per clone: the pre-commit hook lints what you commit
scripts/lint.sh                   golangci-lint (pinned), gofmt/goimports, go vet
go test -race ./...               the unit tests, and the checks that generated docs are current
go test -tags e2e ./test/e2e/...  the binaries end to end, against fake Forgejo, Prometheus and Discord
scripts/docs.sh                   regenerates the docs under docs/ and api/ (go generate ./...); --check fails if stale
podman build --target telemetry . the images (targets telemetry, mcp-gate, mcp-issue): static, distroless, nonroot

CI (.forgejo/workflows/ci.yml) runs all of these on every pull request and builds the images; on main it pushes them to the forge's registry as longshot-api-telemetry, longshot-api-mcp-gate and longshot-api-mcp-issue, tagged by commit. It needs the repository's REGISTRY_TOKEN (package read/write). main takes reviewed pull requests only.

Documentation

License

GPL-3.0-or-later, as Longshot. See LICENSE.