Add Crashlytics auto-triage (function + workflow + docs)#83
Merged
Conversation
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.*).
…tozo04/OpenLoop into feature/crashlytics-autotriage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 theGITHUB_TOKENsecret + deploy. See the PRD §10 checklist.Files
functions/index.js,functions/package.json—onNewFatalIssuePublishedhandler (Node 22, firebase-functions v6)firebase.json— declares thecrashlytics-autotriagefunctions 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 actiondocs/PRD-crashlytics-autotriage.md,docs/FIREBASE.mdRelated Issue
Tracking: #82
Type of Change
How Has This Been Tested?
functions/index.jspassesnode --check.workflow_dispatchon a test issue).Open decision (see PRD §7)
A CI runner can't satisfy the full
DEFINITION_OF_DONEgate (release build + emulator + screenshot) for an Android app, so the bot's output is an explicitly draft, non-mergeable triage PR. Consider amendingDEFINITION_OF_DONE.mdto recognize that state.Checklist