Skip to content

Add ingestion-warnings skill#207

Draft
luke-belton wants to merge 2 commits into
mainfrom
posthog-code/ingestion-warnings-skill
Draft

Add ingestion-warnings skill#207
luke-belton wants to merge 2 commits into
mainfrom
posthog-code/ingestion-warnings-skill

Conversation

@luke-belton

Copy link
Copy Markdown

What

Adds a new stepwise context-mill skill, ingestion-warnings, that diagnoses and fixes the instrumentation behind a PostHog project's ingestion warnings — events PostHog had to drop, mis-merge, or degrade on the way in.

The skill is data-first:

  1. Triage — queries system.ingestion_warnings over the last 7 days to see which warning types are actually firing, with example payloads. Falls back to a code scan of all known anti-patterns if the data can't be read.
  2. Fix — works a per-type catalog (illegal / already-identified merges, invalid UUIDs and timestamps, future-dated events, the 1MB size limit, ingestion overflow, invalid replay timestamps, $set on exception events, and invalid heatmap data from a relative $current_url). Each entry has a locate-grep and a minimal fix; it only touches code tied to a firing warning.
  3. Report — writes posthog-ingestion-warnings-report.md (fixed / partial / needs-manual / not-found).

The cli: block registers it as wizard ingestion-warnings, so the command ships with a context-mill release. A companion wizard PR adds a first-class program (custom messaging + abort cases) on top of the generic agent-skill path.

Why

Ingestion warnings always trace back to an SDK misuse with a known fix, but today they surface as a generic health issue with no remediation path. This encodes the catalog once so an agent can fix the producing code directly. Raised in a Slack thread off the back of the recurring invalid_heatmap_data / relative-$current_url reports.

Testing

  • node scripts/build.js — skill assembles; chain links + preamble inject correctly (non-terminal steps get the "Read ONLY this file" preamble + continuation link; terminal step gets neither); skill-menu.json gets the ingestion-warnings command entry.
  • pnpm test:skills — green (70 tests).
  • node scripts/scan-warlock.js dist/skills — passed, no threats.

Created with PostHog from a Slack thread

A stepwise context-mill skill that diagnoses and fixes the instrumentation behind a project's ingestion warnings.

It queries `system.ingestion_warnings` to see which warning types are actually firing (with a code-scan fallback when the data can't be read), traces each one back to the producing code, applies the smallest fix, and writes a report. Covers illegal / already-identified merges, invalid UUIDs and timestamps, future-dated events, the 1MB size limit, ingestion overflow, invalid replay timestamps, $set on exception events, and invalid heatmap data (relative $current_url).

The `cli:` block registers it as `wizard ingestion-warnings`.

Generated-By: PostHog Code
Task-Id: 9e7dceff-bc33-4dcd-bf3d-aa14f0abee65
@github-actions

Copy link
Copy Markdown

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci mcp-analytics
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/cicd-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-nested-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-github-actions-single-stage-docker-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-gitlab-node-raw
  • /wizard-ci error-tracking-upload-source-maps/cicd-monorepo-pnpm-node-react
  • /wizard-ci error-tracking-upload-source-maps/cicd-monorepo-raw-node-react
  • /wizard-ci error-tracking-upload-source-maps/cicd-ssh-vps-node-raw
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

Generated-By: PostHog Code
Task-Id: 9e7dceff-bc33-4dcd-bf3d-aa14f0abee65
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