Skip to content

Comments

added error reporter action#267

Merged
kfirstri merged 3 commits intomainfrom
posthog-error-reporter-action
Feb 18, 2026
Merged

added error reporter action#267
kfirstri merged 3 commits intomainfrom
posthog-error-reporter-action

Conversation

@kfirstri
Copy link
Collaborator

@kfirstri kfirstri commented Feb 18, 2026

Note

Description

This PR introduces a GitHub Actions workflow that runs daily at 08:00 UTC to automatically triage CLI errors captured in PostHog. It runs two HogQL queries to fetch aggregated error summaries and detailed event logs, then hands the data to Claude Code, which reads source files to perform root cause analysis, checks for recurring errors across previous daily reports and existing open issues, and creates a structured, labeled GitHub issue. If no significant errors are found, the workflow skips issue creation and writes a brief note to the Actions step summary instead.

Related Issue

None

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Other (please describe):

Changes Made

  • Added .github/workflows/daily-error-report.yml — a scheduled workflow (daily at 08:00 UTC) that also supports manual dispatch with a configurable hours look-back parameter (default: 24h)
  • Installs the PostHog CLI and executes two HogQL queries: an aggregated error summary (grouped by error_code / is_user_error) and a detailed per-event log (last 50 events), saved as JSONL to /tmp/
  • Passes both result files to anthropics/claude-code-action@v1, which is prompted to: check existing error-report issues for recurrence, search for matching open issues, read relevant source files for root cause analysis, classify system vs. user errors, and create a labeled GitHub issue following a structured template
  • Filters out low-signal user errors; only includes them when ≥5 unique users are affected or a CLI bug is suspected
  • Marks internal users (@wix.com / @base44.com) in reports without excluding them
  • Restricts Claude to a safe tool allowlist: Read, Glob, Grep, cat /tmp/*, and scoped gh issue commands
  • Skips issue creation and emits a step summary message when no errors are present

Testing

  • I have tested these changes locally
  • I have added/updated tests as needed
  • All tests pass (npm test)

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if applicable)
  • My changes generate no new warnings
  • I have updated docs/ (AGENTS.md) if I made architectural changes

Additional Notes

Three secrets/variables must be configured in the repository before this workflow can run:

  • POSTHOG_CLI_API_KEY — PostHog personal API token (secret)
  • POSTHOG_PROJECT_ID — PostHog project/environment ID (repository variable)
  • CLAUDE_CODE_OAUTH_TOKEN — OAuth token for the Claude Code GitHub Action (secret)

The workflow requires issues: write and id-token: write permissions. The id-token: write permission is needed by the Claude Code action for OIDC-based authentication.


🤖 Generated by Claude | 2026-02-18 23:30 UTC

@kfirstri kfirstri self-assigned this Feb 18, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 18, 2026

🚀 Package Preview Available!


Install this PR's preview build with npm:

npm i @base44-preview/cli@0.0.32-pr.267.87f4f96

Prefer not to change any import paths? Install using npm alias so your code still imports base44:

npm i "base44@npm:@base44-preview/cli@0.0.32-pr.267.87f4f96"

Or add it to your package.json dependencies:

{
  "dependencies": {
    "base44": "npm:@base44-preview/cli@0.0.32-pr.267.87f4f96"
  }
}

Preview published to npm registry — try new features instantly!

@kfirstri kfirstri merged commit b64ae93 into main Feb 18, 2026
7 checks passed
@kfirstri kfirstri deleted the posthog-error-reporter-action branch February 18, 2026 23:28
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