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

1.2 KiB

Proto definitions

Adding or modifying RPCs

When you add or modify an RPC or message type in personinsights/ protos, you must update all downstream consumers before considering the change complete:

1. Python generated stubs

bin/generate_personinsights_proto.sh

Then update:

  • insights/personinsights_client/proto/__init__.py — add/remove re-exports for any new/removed message types
  • insights/personinsights_client/client.py — add/remove wrapper methods for any new/removed RPCs
  • insights/personinsights_client/fake_client.py — implement the new method for test use

2. Node.js generated stubs

cd nodejs && pnpm run generate:personinsights-proto

Then update:

  • nodejs/src/common/personinsights/client.test.ts — add a default stub to the SERVICE_DEFAULTS object for any new RPC

3. Rust

No codegen step needed (tonic regenerates on cargo build), but you must:

  • Implement the RPC in rust/personinsights-replica/ (storage layer + service handler)
  • Wire it through rust/personinsights-router/ (backend, router, and service layers)
  • Add tests (see Rust test conventions in rust/personinsights-replica/AGENTS.md)