Skip to content

feat(error-tracking): link Python, Ruby and PHP deploys to releases - #416

Merged
ablaszkiewicz merged 1 commit into
mainfrom
feat/error-tracking-link-releases
Oct 2, 2026
Merged

ablaszkiewicz merged 1 commit into
mainfrom
feat/error-tracking-link-releases

Conversation

@ablaszkiewicz

@ablaszkiewicz ablaszkiewicz commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Pull requests — release linking for Python, Ruby and PHP spans three repos:

  1. 👉 feat(error-tracking): link Python, Ruby and PHP deploys to releases #416: the error-tracking-link-releases skill and the link-releases flow task (this PR)
  2. feat(error-tracking): describe release linking for Python, Ruby and PHP wizard#1399: wizard copy and the linear-fallback prompt
  3. feat(error-tracking): add release-linking fixtures for Python, Ruby and PHP wizard-workbench#4266: the Python, Ruby and PHP test apps

Problem

Python, Ruby and PHP ship readable stack traces, so wizard error-tracking skips the upload subgraph on them, and their exceptions carry no release. PostHog now links releases for these SDKs: the production deploy resolves a release (PostHog/resolve-release or posthog-cli release resolve) and the app starts with its ID in POSTHOG_RELEASE_ID (releases, Python, Ruby, PHP).

Changes

  • Skill error-tracking-link-releases with python, ruby and php variants, built from the link-releases/<language>.md and releases.md docs. It covers:
    • the SDK floor (posthog 7.59.0, posthog-ruby 3.25.0, posthog/posthog-php 4.14.0), refreshed for one package only, never lowered to satisfy an old local interpreter, and not crossed into a new major version under existing code
    • resolving in the production deploy job only, with PostHog/resolve-release@v1 on GitHub Actions and posthog-cli release resolve elsewhere (the CLI installer on images without Node), never failing a deploy
    • getting the ID to the process that creates the client across each boundary: the Docker final stage, container start, SSH, a systemd EnvironmentFile, PHP-FPM clear_env, and Laravel config:cache
    • leaving local runs, tests, pull-request builds, .env and .env.example as they are
  • Task link-releases in the error-tracking flow.
  • Seed: a third fact, the release-linking variant, keyed on the language of the server app. A CocoaPods Gemfile beside a mobile app does not count. The task runs after capture-exceptions, and after wire-ci when both apply.
  • Report: the release-linking outcome, the secret and variable to create (POSTHOG_CLI_API_KEY, POSTHOG_PROJECT_ID), and how to verify.
  • CODEOWNERS, README and marketplace entries. @PostHog/team-error-tracking owns the skill, like the upload skill.

How it was tested

  • npm test (219 passed) and npm run build: 3 skill zips and the link-releases prompt.
  • Headless wizard error-tracking --ci --local-context-mill runs against the three fixtures in the workbench PR. After each run, a runtime check deploys the result the way its pipeline does and reads the events the SDK sends to a fake PostHog.
Fixture Deploy path SDK Where the ID goes Runtime check
Flask GitHub Actions → GHCR → SSH docker run none → posthog==7.59.0 -e POSTHOG_RELEASE_ID on docker run $release_id set; empty ID sends none
Sinatra GitLab CI (ruby:3.3-slim) → SSH → systemd posthog-ruby 3.20.0 → 3.26.1 swapped into the unit's EnvironmentFile before the restart the job script ran in its image: installs curl and the CLI, a real release resolve succeeds, and $release_id matches it; without the key the deploy still passes and sends none
Laravel GitHub Actions → php-fpm image → compose over SSH none → posthog/posthog-php 4.14.1 build-args → final-stage ARG/ENV, plus env[POSTHOG_RELEASE_ID] in the pool $release_id set through the FPM workers; empty ID sends none; control without the pool line sends none

In every run, the resolve step lands only in the production deploy job, test and pull-request jobs and local scripts are unchanged, and actionlint is clean. A seed-only run on a React Native app with a CocoaPods Gemfile queues no link-releases.

Note

Outside this change: in one of two Laravel runs, capture-exceptions wrote use Throwable; into the non-namespaced bootstrap/app.php. PHP emits a warning, Laravel turns it into an ErrorException, artisan config:cache fails, and the container restarts in a loop. The other run wrote \Throwable. This needs its own follow-up in the Laravel error-tracking guidance.

🤖 Generated with Claude Code

Add the error-tracking-link-releases skill (python, ruby, php variants) and a
link-releases task to the error-tracking flow. The seed queues it for Python,
Ruby and PHP server apps; the task raises the SDK to a release-aware version,
resolves the release in the production deploy job only, and passes its ID to
the running app as POSTHOG_RELEASE_ID. Local runs, tests and pull-request
builds stay as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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 ai-observability
  • /wizard-ci basic-integration
  • /wizard-ci feature-flags
  • /wizard-ci mcp-analytics
  • /wizard-ci replay-vision
  • /wizard-ci revenue
  • /wizard-ci self-driving
  • /wizard-ci warehouse
  • /wizard-ci warehouse-seeded

Test an individual app:

  • /wizard-ci ai-observability/anthropic
  • /wizard-ci ai-observability/google-adk
  • /wizard-ci ai-observability/groq
Show more apps
  • /wizard-ci ai-observability/manual-capture
  • /wizard-ci ai-observability/openai
  • /wizard-ci ai-observability/openai-agents
  • /wizard-ci ai-observability/opentelemetry
  • /wizard-ci ai-observability/vercel-ai
  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/flutter
  • /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 feature-flags/django
  • /wizard-ci feature-flags/next-js
  • /wizard-ci mcp-analytics/custom-dispatcher
  • /wizard-ci mcp-analytics/typescript-sdk
  • /wizard-ci replay-vision/javascript-node
  • /wizard-ci replay-vision/next-js
  • /wizard-ci replay-vision/react-vite
  • /wizard-ci revenue/stripe
  • /wizard-ci self-driving/astro
  • /wizard-ci self-driving/fastapi
  • /wizard-ci self-driving/nuxt
  • /wizard-ci self-driving/react-router
  • /wizard-ci self-driving/sveltekit
  • /wizard-ci warehouse/monorepo-env
  • /wizard-ci warehouse/multi-source-next
  • /wizard-ci warehouse/stripe-node
  • /wizard-ci warehouse/zero-source
  • /wizard-ci warehouse-seeded/next-stripe
  • /wizard-ci warehouse-seeded/next-stripe-declined

Test against a wizard branch:

  • /wizard-ci all wizard:my-branch

Add wizard:<branch> to any command above to pin the wizard branch. It defaults to main.

Results will be posted here when complete.

Comment thread context/agents/error-tracking/link-releases.md
@ablaszkiewicz
ablaszkiewicz merged commit 79c2dc5 into main Oct 2, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants