Skip to content

chore(proto): package personhog bindings without import rewriting - #99350

Merged
trunk-io[bot] merged 45 commits into
masterfrom
rauln/proto-drop-protoletariat
Sep 21, 2026
Merged

trunk-io[bot] merged 45 commits into
masterfrom
rauln/proto-drop-protoletariat

Conversation

@rnegron

@rnegron rnegron commented Sep 11, 2026 •

Copy link
Copy Markdown
Member

Problem

  • The Python 3.14 upgrade needs protobuf 6, but the archived protoletariat generator dependency requires protobuf below 6.

Changes

  • Install generated PersonHog bindings as a local package so protoc's imports work without rewriting.
  • Share one locked codegen dependency group between development and CI.
  • Review package installation and regeneration. File moves and application import updates are mechanical; protocol definitions and RPC behavior stay unchanged.

How did you test this code?

  • Regeneration, wheel imports, message round-trip, lane tests, mypy, workflow lint, and preflight.
  • Database suites and the application image build were not rerun locally.

Automatic notifications

  • Publish to changelog?

Docs update

  • Package README, proto guide, and person-data-access guide.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Codex, GPT-6, simplified the original Claude Code change (original model unrecorded).
  • Skills: simplify, stacking-prs, writing-pr-descriptions, writing-user-facing-copy, authoring-ci-workflows, hogli, running-ci-preflight. CodeRabbit pass remains paused.

@rnegron rnegron added the skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs label Sep 11, 2026
@rnegron rnegron self-assigned this Sep 11, 2026
@rnegron
rnegron added this pull request to stack #99352 September 11, 2026 15:19
@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

🤖 CI report

🚨 Trunk lane — universal lane

This PR is assigned to the universal lane. It cannot merge in parallel with other PRs, so it can take longer to merge. Ask dev-ex if you think this is wrong.

✅ Duplication (Python) — clean

New Python code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Duplication (TypeScript) — clean

New TypeScript code duplication introduced by this branch. Fails at 70+ tokens in app code, or 150+ tokens when both copies live in test files. Advisory while the gate proves itself: extract a shared helper instead of copying.

✅ Comment density — 19% of added code lines are comments (5 of 26)

This section warns when comments are more than 3% of the code lines a PR adds, and alerts above 6%. Before agent-assisted PRs, the typical share was about 2%. Only full-line comments count. Docstrings, generated files, snapshots, migrations, and workflow files are left out.

Comments that restate the code, record how the change came about, or narrate the next line add noise for the next reader. Keep the comments that explain a reason the code cannot show, and remove the rest. See .agents/skills/writing-code-comments/SKILL.md for the house rules.

Files with the most added comment lines:

File Comment lines Added lines
tools/hogbox-preview/hogbox_preview/stack.py 3 9
tools/snob_backend_test_selection_shadow.py 2 3

This check does not block merging. It updates on every push and clears when the share drops.

✅ Bundle size — 🟢 -6 B (-0.0%)

Uncompressed size of every built .js bundle, compared against the base branch.

Total: 69.19 MiB · 🟢 -6 B (-0.0%)

No file changed by more than 1000 B.

Posted automatically by build-bundle-size-report · uncompressed bytes from dist-report

✅ Eager graph — within budget

How much code each root ships on the eager path — downloaded and parsed before the surface is interactive. Measured from the esbuild output chunks (post-tree-shake, static imports only); lazy import() / React.lazy chunks are not counted.

Root Eager (shipped) Δ vs base Budget
entry (logged-out pages, app bootstrap)
src/index.tsx
1.56 MiB · 22 files no change ████████░░ 84.5% of 1.84 MiB
logged-out boot: index + App + bootApp (preloaded by every page, including /login)
src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
3.55 MiB · 628 files 🔺 +36 B (+0.0%) █████████░ 88.2% of 4.03 MiB
authenticated shell (every logged-in page)
src/scenes/AuthenticatedShell.tsx
8.39 MiB · 2,772 files 🟢 -1 B (-0.0%) █████████░ 88.3% of 9.51 MiB

🟢 node_modules/monaco-editor/ stays out of src/index.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 [object Object] stays out of src/index.tsx
🟢 node_modules/monaco-editor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/layout/navigation-3000/navigationLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/scenes/dashboard/dashboardLogic.tsx stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/lemon-ui/LemonMarkdown/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/RichContentEditor/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/lib/components/CodeSnippet/ stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 src/taxonomy/core-filter-definitions-by-group.json stays out of src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
🟢 node_modules/monaco-editor/ stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/lib/components/ActivityLog/describers stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 src/scenes/session-recordings/player/sessionRecordingPlayerLogic.ts stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx
🟢 [object Object] stays out of src/scenes/AuthenticatedShell.tsx

Largest files eagerly shipped from src/index.tsx
Size File
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
24.6 KiB ../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js
6.3 KiB ../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js
4.5 KiB ../node_modules/.pnpm/@jspm+core@2.1.0/node_modules/@jspm/core/nodelibs/browser/process.js
3.9 KiB ../node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.production.min.js
1.4 KiB ../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1.3 KiB src/index.tsx
1.3 KiB src/RootErrorBoundary.tsx
912 B ../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js
854 B src/scenes/ChunkLoadErrorBoundary.tsx
Largest files eagerly shipped from src/index.tsx + src/scenes/App.tsx + src/scenes/bootApp.ts
Size File
301.9 KiB ../node_modules/.pnpm/posthog-js@1.434.4_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
104.4 KiB src/lib/api.ts
82.6 KiB src/products.tsx
68.5 KiB src/lib/lemon-ui/icons/icons.tsx
63.4 KiB src/lib/utils/eventUsageLogic.ts
38.8 KiB ../node_modules/.pnpm/@dnd-kit+core@6.0.8_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
33.9 KiB ../node_modules/.pnpm/kea@4.0.0-pre.6_patch_hash=139b8d1f1304f9d9da452a9a1244c94ea679dbcb85687d8999563146879fb6f5_react@18.3.1/node_modules/kea/lib/index.cjs.js
28.5 KiB src/scenes/scenes.ts
Largest files eagerly shipped from src/scenes/AuthenticatedShell.tsx
Size File
301.9 KiB ../node_modules/.pnpm/posthog-js@1.434.4_@types+react@18.3.27_react@18.3.1/node_modules/posthog-js/dist/module.mjs
267.7 KiB ../node_modules/.pnpm/@posthog+icons@0.38.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@posthog/icons/dist/posthog-icons.es.js
265.0 KiB src/taxonomy/core-filter-definitions-by-group.json
153.8 KiB ../node_modules/.pnpm/re2js@0.4.1/node_modules/re2js/build/index.esm.js
126.8 KiB ../node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.production.min.js
104.4 KiB src/lib/api.ts
98.4 KiB ../packages/quill/packages/quill/dist/index.js
93.3 KiB ../node_modules/.pnpm/prosemirror-view@1.40.1/node_modules/prosemirror-view/dist/index.js
90.6 KiB ../node_modules/.pnpm/@tiptap+core@3.20.6_@tiptap+pm@3.20.6/node_modules/@tiptap/core/dist/index.js
82.6 KiB src/products.tsx

Posted automatically by check-eager-graph · sizes are eager output bytes (shipped, post-tree-shake) from the esbuild metafile · part of #32479

✅ Toolbar bundle — eager 2.36 MiB within budget

What the toolbar ships to customer pages, measured from the esbuild output (minified, post-tree-shake). The eager set is the entry plus everything statically imported from it — fetched before any feature runs; deferred chunks load lazily. The eager guardrail is 5.72 MiB. Each output file must also stay below 10 MB, where CloudFront stops compressing it. The module boundary is enforced separately by check-toolbar-graph.

Metric Size Δ vs base Budget
Eager (shipped)
entry + static imports
2.36 MiB · 19 files no change ████░░░░░░ 41.2% of 5.72 MiB
Deferred (lazy) 2.09 MiB · 44 files no change n/a — loads on demand
Loader dist/toolbar.js 1.2 KiB no change █░░░░░░░░░ 6.0% of 19.5 KiB
Largest eagerly-shipped chunks
Size File
782.0 KiB dist/toolbar/toolbar-app-4ETWL57N.css
649.5 KiB dist/toolbar/chunk-chunk-P7IKRP4P.js
483.6 KiB dist/toolbar/chunk-chunk-2PKLVDXN.js
138.1 KiB dist/toolbar/chunk-chunk-KOHCSBFQ.js
131.8 KiB dist/toolbar/chunk-chunk-FDH2IBXT.js
75.1 KiB dist/toolbar/toolbar-app-IVILVF5I.js
69.0 KiB dist/toolbar/chunk-chunk-TSAL54PB.js
35.6 KiB dist/toolbar/chunk-chunk-X65JHURO.js
21.0 KiB dist/toolbar/chunk-chunk-GGKNXRH2.js
6.8 KiB dist/toolbar/chunk-chunk-DV7IWQNF.js

Posted automatically by check-toolbar-size · sizes are toolbar output bytes (shipped, post-tree-shake) from the esbuild metafile

✅ Dist folder size — 🔺 +1.3 KiB (+0.0%)

Total size of the built frontend/dist folder (all assets), compared against the base branch.

Total: 1512.00 MiB · 🔺 +1.3 KiB (+0.0%)

✅ Playwright — all passed

All tests passed.

View test results →

ℹ️ Docs preview — preview build triggered

Docs from this PR will be published at posthog.com.

Project Preview Updated (UTC)
posthog.com Open preview Sep 21, 2026, 3:53 PM

The preview should be ready in about 10 minutes. Open the preview at /handbook/engineering/.

✅ Hobby preview — passed

Hobby deployment smoke test passed successfully.


Run 35621883880

@rnegron rnegron mentioned this pull request Sep 11, 2026
9 of 17 tasks
@trunk-io

trunk-io Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Static Badge   Static Badge   Static Badge

Failed Test Failure Summary Logs
Scenes-App/SidePanels SidePanelNotebooks smoke-test The test timed out while waiting for loading indicators to disappear. Logs ↗︎
flags::feature_flag_list::tests::test_fetch_flags_from_redis The test failed because fetching flags from Redis timed out. Logs ↗︎

View Full Report ↗︎ ⋅ Docs

# Conflicts:
#	products/warehouse_sources/backend/models/table.py
@rnegron rnegron changed the title chore(proto): replace protoletariat with an import rewriter chore(proto): ship personhog stubs as a workspace package Sep 11, 2026
@rnegron rnegron added the run-ci-backend Force ci-backend's full test matrices to run even on a draft PR label Sep 11, 2026
Comment thread pyproject.toml Outdated
Comment thread .github/scripts/trunk-impacted-targets.test.js Outdated
@rnegron
rnegron requested a review from a team September 16, 2026 15:54
# Conflicts:
#	products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/source.py
#	products/warehouse_sources/backend/temporal/data_imports/sources/mongodb/test_mongo.py
…ln/proto-drop-protoletariat

# Conflicts:
#	posthog/personhog_client/proto/generated/personhog/service/v1/service_pb2.py
#	posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py

@nickbest-ph nickbest-ph left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think there are some blocking changes that need to be addressed. a couple ones from the bots that I seem to be accurate and a couple other ones.

Comment thread packages/personhog-proto/pyproject.toml
Comment thread .github/workflows/ci-proto.yml
Comment thread .github/scripts/trunk-impacted-targets.test.js Outdated
# Conflicts:
#	products/signals/dags/inbox_ranking/dataset/dag.py
…ln/proto-drop-protoletariat

# Conflicts:
#	packages/personhog-proto/personhog/types/v1/person_pb2.pyi
#	posthog/personhog_client/proto/generated/personhog/types/v1/person_pb2.py
@rnegron rnegron added build-llm-analytics-image Trigger LLM Analytics Docker image build from PR and removed build-llm-analytics-image Trigger LLM Analytics Docker image build from PR labels Sep 17, 2026
@rnegron
rnegron requested a review from nickbest-ph September 21, 2026 14:13
Base automatically changed from rauln/py314-wheel-deps to master September 21, 2026 14:26
@trunk-io

trunk-io Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

😎 Stack merged successfully - details.

@trunk-io
trunk-io Bot merged commit cbcab39 into master Sep 21, 2026
337 checks passed
@trunk-io
trunk-io Bot deleted the rauln/proto-drop-protoletariat branch September 21, 2026 18:24
@deployment-status-posthog

deployment-status-posthog Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-09-21 18:51 UTC Run
prod-us ✅ Deployed 2026-09-21 19:09 UTC Run
prod-eu ✅ Deployed 2026-09-21 19:09 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-ci-backend Force ci-backend's full test matrices to run even on a draft PR skip-agent-review Save $$$, skip auto agent reviews (Greptile) — use for trivial or chore PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants