Skip to content

feat(error-tracking): add the error-tracking fixtures and workflow - #3742

Merged
ablaszkiewicz merged 46 commits into
mainfrom
error-tracking-command
Sep 15, 2026
Merged

ablaszkiewicz merged 46 commits into
mainfrom
error-tracking-command

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Part of a 3-PR set

Problem

wizard error-tracking (PostHog/wizard#1185) needs a workbench workflow and fixtures.

Changes

  • apps/manifest.json: registers the error-tracking workflow (ciCapable: false).
  • apps/error-tracking/: 36 fixtures and a README.
    • No PostHog (13): angular, django, express, fastify, hono, javascript-web, koa, next, node-http, nuxt, react-router, sveltekit, vue.
    • PostHog present (9): next, nuxt-3-6, nuxt-4-3, react-vite, node-raw, node-rollup, node-rollup-typescript-plugin, node-webpack, python-flask.
    • CI/CD (7): Docker, GitHub Actions (4 setups), GitLab, SSH.
    • Native (7): go, rust, ios-pod, ios-spm, android, react-native, react-native-expo. These are copies. The originals in apps/error-tracking-upload-source-maps/ do not change.

Squash merge this PR.

Test plan

The wizard ran on every fixture. See the Tests section of PostHog/wizard#1185.

🤖 Generated with Claude Code

https://claude.ai/code/session_01668rN31F4aotxmenNksz4Z

ablaszkiewicz and others added 30 commits September 1, 2026 18:04
Manifest entry for the new one-command error-tracking setup, plus the
apps/error-tracking/ fixtures README. Test apps land separately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copies of the source-maps fixtures for `wizard error-tracking`:
node-raw exercises the already-integrated branch, next-no-posthog the
install-first branch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
…xture

Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
…king fixture

Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
…r-tracking fixture

Pristine copy of the source-maps fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
The wizard writes env files during a run; ignoring them hid that part
of the diff from the runners and reviewers. next-env.d.ts and .venv/
stay ignored — they are not env-var files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
Pristine copy of the basic-integration fixture for `wizard error-tracking`.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
ablaszkiewicz and others added 11 commits September 2, 2026 12:51
…no-posthog

The ten fixtures copied from basic-integration exercise the
install-first branch; the prefix makes that readable in pickers. Drops
next-no-posthog — no-posthog-next-js covers the same case.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
@nuxtjs/i18n 8.5.6 imports getActiveHead from unhead, which unhead 2.x
removed. Nuxt 3.21 ships unhead 2, so `nuxt build` failed with a RollupError
before anything could be tested against this fixture.

Upgrade to @nuxtjs/i18n ^9.5.6 and set restructureDir: false, since v9 resolves
langDir under an i18n/ directory by default while this app keeps its locale
files in internationalization/.

Verified with a clean npm ci + nuxt build.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
@sveltejs/kit 2.49.5 imports `fork` and `settled` from svelte, which the
pinned svelte 5.14.0 does not export, so `vite build` failed before anything
could be tested against this fixture.

Bump svelte to ^5.57.0. Verified with a clean install + build (the build also
needs the PUBLIC_SUPABASE_* / PRIVATE_* values from .env.example, since
$env/static/public resolves at build time).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVXmLWB31CBujD2FJ2ogvY
None of the five javascript-node apps shipped a build, so every wizard run had
to invent an esbuild command. Four runs produced --format=esm; koa-notes did
not, and its CommonJS bundle could not boot in a "type": "module" package.

Ship the build with each fixture instead: an esbuild bundle whose --format
matches the package type, sourcemaps with sources content already enabled, and
a start:production that runs the output. The wizard now only has to append its
posthog-cli step. Verified: all five build and boot from dist/.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
The error-tracking flow deliberately skips the source-map uploader on Astro,
so these four apps can only ever demonstrate capture with unresolved frames.
They add run time without adding coverage.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
The Debian -slim variants ship no system CA store, so posthog-cli panics on its
first HTTPS call and takes the whole docker build with it (exit 101). That is a
property of the -slim tag rather than the Node major: node:24-slim is just as
bare. The Alpine images carry a store, so the fixtures exercise the CI wiring
without standing on that failure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
Neither reached a verifiable end state. The raw one has no root manifest, so
framework detection returns nothing and the orchestrator falls back to the
program id as the framework, aborting before any task is queued. The pnpm one
completes, but the flow picks one uploader variant by precedence — vite over
node — so it instruments the frontend while the repo's only pipeline deploys
the backend.

The equivalents under apps/error-tracking-upload-source-maps/ are untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
Both already carry a PostHog SDK, so they exercise the native debug-symbol
upload path rather than source maps. Their endpoint pointed at an internal host,
which would have sent verification events away from the test project; it now
points at the public US ingestion host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
The build job ran the source-map upload in node:22-slim, which carries no
system CA store, so posthog-cli panicked on its first request and failed the
pipeline. Reproduced by running the job in its own image; the same job on
node:24-alpine creates the release and uploads the chunk.

The deploy job moves too, so both jobs share an image; its before_script uses
apk rather than apt-get, verified to install openssh-client and rsync.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
…program

Three mobile fixtures - ios-pod, ios-spm and android - copied from the
upload-source-maps program, which keeps its own copies. Only tracked files come
across, so no Pods, build output, .env, local.properties, xcuserdata or
.DS_Store; the gradle wrapper keeps its executable bit.

Not yet run against the flow.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
The ios and android examples came over from the upload-source-maps program
still pointing at the internal ingest host, so nothing they captured could
land in the test project.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
ablaszkiewicz and others added 3 commits September 11, 2026 13:24
…apps

The PostHog-less fixtures were real-world starter templates — saas-template
alone was 59k lines across 437 files, over half the whole corpus, and the two
Nuxt apps carried a nested `proxy/` package. None of that bulk exercises the
flow: the wizard reads a manifest, finds an init point, and edits a build
config, so a landing page and a Playwright suite are dead weight a run has to
walk past.

One app per technology now, flat, named for the technology, and sized like the
already-minimal non-prefixed fixtures — 4 to 9 files each:

  no-posthog-angular          no-posthog-koa
  no-posthog-django           no-posthog-next
  no-posthog-express          no-posthog-node-http
  no-posthog-fastify          no-posthog-nuxt
  no-posthog-hono             no-posthog-react-router
  no-posthog-javascript-web   no-posthog-sveltekit
                              no-posthog-vue

The duplicates go: 4 Next apps → 1, 4 React Router apps → 1, 2 Nuxt apps → 1.
The five Node servers stay as five, because express/fastify/hono/koa/node:http
are five different init shapes, and they were already 3 files each.

Corpus drops from 113,409 to 3,487 lines of source across 34 fixtures, and
nothing nests any more. Every app installs and builds; the Node servers boot
and answer; Django boots and serves.

Also removes the untracked no-posthog-astro leftovers from before the Astro
fixtures were dropped in 249046d.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01X5Kw3YahYz9RiFeJ8r2hxY
The error-tracking fixtures were moved out of the upload-source-maps
workflow. Restore the originals there, unchanged, and keep the copies
under apps/error-tracking.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013SEsZQQrYjXPVEhQuoSwE6
@ablaszkiewicz ablaszkiewicz changed the title feat(commands): register wizard error-tracking in the pickers feat(error-tracking): add the error-tracking fixtures and workflow Sep 14, 2026
Copies of the upload-source-maps fixtures, which stay unchanged. They cover
the React Native uploader choice: a bare React Native repo carries ios/ and
android/ native shells, and an Expo repo carries a Gradle module.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01668rN31F4aotxmenNksz4Z
@posthog

posthog Bot commented Sep 14, 2026

Copy link
Copy Markdown

🦔 PostHog Review reviewed this pull request

Found 0 must fix, 3 should fix, 5 consider.

Published 8 findings (view the review).

@posthog

posthog Bot commented Sep 14, 2026

Copy link
Copy Markdown

PostHog Review alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏

@posthog posthog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PostHog Review

Found 3 should fix, 5 consider.

Comment thread apps/error-tracking/README.md
Comment thread apps/error-tracking/no-posthog-next/.gitignore
Comment thread apps/error-tracking/react-native/README.md Outdated
Comment thread apps/error-tracking/react-native-expo/app.json
Comment thread apps/error-tracking/react-native-expo/README.md Outdated
Comment thread apps/error-tracking/nuxt-4-3/nuxt.config.ts
Comment thread apps/error-tracking/nuxt-4-3/app/app.vue
Comment thread apps/error-tracking/react-native-expo/package.json
- The react-native and react-native-expo READMEs name the error-tracking
  command and describe what the fixture lacks.
- no-posthog-next ignores the generated next-env.d.ts, like the other Next.js
  fixtures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01668rN31F4aotxmenNksz4Z
@gewenyu99

Copy link
Copy Markdown
Contributor

Agent DAG for the error-tracking flow

context-mill agent DAGs — error-tracking flow

Generated with the repo's built-in visualizer on the PR branch:

git fetch origin pull/393/head && git checkout FETCH_HEAD
npm run visual-dags

Console output for error-tracking:

error-tracking: 9 agents in 6 waves — 3 → 1 → 1 → 1 → 1 → 1

The diagram is the full page for context (also shows integration-v2, metrics, replay-vision); the new error-tracking flow is the first section.


Created with PostHog Desktop

@ablaszkiewicz
ablaszkiewicz merged commit ae0b6d2 into main Sep 15, 2026
11 checks passed
@ablaszkiewicz
ablaszkiewicz deleted the error-tracking-command branch September 15, 2026 15:33
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.

2 participants