Repository navigation
feat(error-tracking): Next.js 14/15/16 fixtures with scenario manifests - #4805
Draft
ablaszkiewicz wants to merge 2 commits into
Draft
ablaszkiewicz wants to merge 2 commits into
ablaszkiewicz wants to merge 2 commits into
Conversation
…est schema Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FkuJAD3n8f6Ra7L9p2UmPw
This was referenced Oct 28, 2026
Open
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.
Pull requests: 1. PostHog/posthog-js#5472 2. PostHog/posthog-js#5473 3. PostHog/context-mill#446 4. 👉 this PR 5. PostHog/posthog#125314
Problem
The Next.js error-tracking fixtures (
next,no-posthog-next) have one page each, so a run touches almost none of the places a Next.js app throws: server components, route handlers, server actions, the proxy, edge routes,after(), background promises. Nothing records what each run should capture, so a run that loses every server error still looks like a pass.Changes
Four fixtures, one invoicing app (Ledgerly) so their scenarios line up. Each scenario is a plausible bug reached by a fixed input, with an opaque error code and its own error class.
no-posthog-next-16-apperror.tsxand at the root,onClick, Server Component render,generateMetadata, route handlers (tracing headers, page fetch), server action,proxy.ts, edge route,after(), fire-and-forget rejection, timer throw,notFound(),redirect()next-16-appglobal-error.tsxno-posthog-next-14-appmiddleware.tsonRequestErrorand no client error callbacks on this versionno-posthog-next-15-pagesgetServerSideProps, API routes, edge API route, edge middleware, the default_error404apps/error-tracking/.scenarios/<app>.json: one machine-checkable manifest per app (how to build and start it, how to trigger each error, what PostHog must receive). It sits outside the app directories, so the agent never sees it..scenarios/README.mddocuments the schema.apps/error-tracking/README.md: prose expectations for the four apps.npm install --before).How it was tested
wizard error-trackingon each app, then each instrumented copy was exercised in a browser and over HTTP and checked in PostHog: count, issue,$lib, distinct ID and session, request properties, release, top stack frame. The results drove the context-mill and docs changes above.🤖 Generated with Claude Code
https://claude.ai/code/session_01FkuJAD3n8f6Ra7L9p2UmPw