Files
zeekay bc4ddf332b chore: rebase the tree onto upstream master fa1a9a60
Mechanically re-derived: bin/debrand runs over a fresh import of
posthog/posthog@fa1a9a60d4 (2026-08-06).
The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker*
entrypoints, compose files, LLM.md and the squashed initial migration
are restored from the shipped tree, same as the previous import.

The prune's import-closure guard kept 21 products the new core now
imports; dropping them is a refactor now, recorded rather than forced.
2026-08-06 01:25:36 -07:00

6.7 KiB

Migration examples

These PRs show different migration shapes. Read the relevant diff before implementing a similar change because gateway contracts have continued to evolve. Use them for implementation decisions, not as an inventory of current rollout state.

Django and direct-provider callers

Incremental product rollout

Sandbox and deployment wiring

  • #72770: route selected sandbox products to the AI gateway treats migration as more than a client change. It pairs URL and product rollout settings, reserves them against user overrides, updates both egress enforcement layers, validates configured hostnames, extends startup diagnostics, and keeps rollback to clearing either setting.

Cross-repository patterns

Standalone TypeScript service

  1. Insights/SherlockHog #104: route the agent through the slugless AI gateway adds the paired Go settings, base URL translation, project-secret auth, Python fallback, and route-selection tests for a TypeScript Claude Agent SDK service.
  2. Insights/SherlockHog #111: boot with either complete gateway pair fixes the transitional startup contract so an AI-gateway-only deployment can boot while preserving the Python rollback route.
  3. Insights/SherlockHog #112: tag the AI product through X-Insights-Properties corrects attribution after the initial cutover reused Python's per-property headers. It keeps each gateway's metadata format separate and verifies that the Go route no longer emits the legacy form.
  4. Insights/charts #12919: cut development over to the slugless AI gateway wires the development URL and secret first, with explicit deployment rendering and rollback checks.
  5. Insights/charts #12920: cut production over to the slugless AI gateway applies the regional production configuration after the development stage.

Together these show the client, transitional boot contract, attribution correction, staged deployment, and rollback boundaries.

Per-product sandbox routing

  1. Insights/code #3659: route selected products to the AI gateway selects a gateway per sandbox request. It requires both the Go URL and an allowlist, keeps unlisted products on Python, converts attribution to one bounded ASCII-safe JSON header, and gives each workload a distinct product tag.
  2. Insights/insights #72770: route selected sandbox products to the AI gateway passes the settings into sandboxes, reserves them against user overrides, updates both egress enforcement layers, validates configured hostnames, and extends startup diagnostics.
  3. Insights/charts #13358: route Signals sandbox stages in development activates the client and Django support for four workloads in development.

These show how to select Go per request, pass configuration through a sandbox boundary, enforce egress, and activate a narrow set of workloads.

Standalone PR-review agent

Deployment activation

  • Insights/charts #13131: repoint worker deployments to the AI gateway demonstrates that merged client support does not move traffic by itself. It wires the regional URL and app-specific secret into every deployment that runs an already-migrated caller, with removal of either setting as rollback. Use it as deployment guidance, not as a standalone caller migration.

Post-migration parity checks

Use these examples for their decisions and verification boundaries. Re-check services/llm-gateway/PARITY.md before adopting an older pattern.