Skip to content

Add Crashlytics auto-triage (function + workflow + docs)#83

Merged
stozo04 merged 7 commits into
mainfrom
feature/crashlytics-autotriage
Jun 23, 2026
Merged

Add Crashlytics auto-triage (function + workflow + docs)#83
stozo04 merged 7 commits into
mainfrom
feature/crashlytics-autotriage

Conversation

@stozo04

@stozo04 stozo04 commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Description

Adds the scaffold for Crashlytics → GitHub → Claude auto-triage. A new fatal Crashlytics issue fires a Cloud Function that files a GitHub issue (labeled crashlytics-auto); a label-gated GitHub Action then has Claude read the crash via the Firebase MCP server, post a root-cause comment, and open a draft PR with a first-pass fix when confident. Nothing is ever auto-merged — a human always reviews.

Design and rollout: docs/PRD-crashlytics-autotriage.md. Runbook: docs/FIREBASE.md.

Not yet enabled. The workflow needs repo secrets (ANTHROPIC_API_KEY, GCP_SA_KEY), the Claude GitHub App, and the function needs the GITHUB_TOKEN secret + deploy. See the PRD §10 checklist.

Files

  • functions/index.js, functions/package.jsononNewFatalIssuePublished handler (Node 22, firebase-functions v6)
  • firebase.json — declares the crashlytics-autotriage functions codebase (isolated; won't affect other deploys)
  • .github/workflows/crashlytics-autotriage.yml — the triage workflow (label-gated; runs Claude)
  • .github/firebase-mcp.json — Firebase MCP server config for the action
  • docs/PRD-crashlytics-autotriage.md, docs/FIREBASE.md

Related Issue

Tracking: #82

Type of Change

  • Feature
  • 📝 Documentation
  • 🔧 Chore (CI workflow + Firebase config)

How Has This Been Tested?

  • Automated Tests: workflow YAML parses; all JSON configs parse; functions/index.js passes node --check.
  • Manual Verification: none yet — this is scaffold pending the secrets/setup in the PRD. First real test is Phase 0 (workflow_dispatch on a test issue).

Open decision (see PRD §7)

A CI runner can't satisfy the full DEFINITION_OF_DONE gate (release build + emulator + screenshot) for an Android app, so the bot's output is an explicitly draft, non-mergeable triage PR. Consider amending DEFINITION_OF_DONE.md to recognize that state.

Checklist

  • 🔍 Self-review performed.
  • 📖 Generates no new compile/parse errors (configs validated).
  • 🧪 End-to-end verified — pending secrets/deploy (Phase 0).

stozo04 added 7 commits June 23, 2026 14:08
New fatal Crashlytics issue -> Cloud Function files a GitHub issue (labeled
crashlytics-auto) -> GitHub Action has Claude read the crash via the Firebase
MCP server, post a root-cause comment, and open a DRAFT PR when confident.
Nothing is auto-merged. Not yet enabled; pending secrets/setup per docs.

- functions/index.js + package.json: onNewFatalIssuePublished handler
- firebase.json: declares the crashlytics-autotriage functions codebase
- .github/workflows/crashlytics-autotriage.yml: label-gated triage workflow
- .github/firebase-mcp.json: Firebase MCP server config for the action
- docs/PRD-crashlytics-autotriage.md: design + rollout plan
- docs/FIREBASE.md: runbook (token-expiry is the first thing to check)
- docs/PRD-crashlytics-autotriage.md: problem, architecture, rollout, risks
- docs/FIREBASE.md: operational runbook; GITHUB_TOKEN 1-year expiry is the
  first thing to check if auto-triage goes quiet (~June 2027)
npm install in functions/ pulls thousands of files; they're rebuilt on demand
and excluded from deploy via firebase.json, so they should never be tracked.
Never commit the SA key JSON. Adds the specific filename plus defensive
patterns (*service-account*.json, *-DO-NOT-COMMIT.*).
@stozo04 stozo04 merged commit 39660c4 into main Jun 23, 2026
2 checks passed
@stozo04 stozo04 deleted the feature/crashlytics-autotriage branch June 23, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant