feat(api): emit firecracker_version + kernel_version on created_instance posthog event#2583
Conversation
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit 0c12ada. Bugbot is set up for automated code reviews on this repo. Configure here. |
❌ 12 Tests Failed:
View the full list of 15 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
There was a problem hiding this comment.
LGTM, two-field analytics addition using already-populated sandbox struct fields.
Extended reasoning...
Overview
This PR adds two properties (firecracker_version and kernel_version) to the existing created_instance PostHog event in packages/api/internal/orchestrator/analytics.go. Both values come from fields already present on the sandbox.Sandbox struct, so there are no upstream changes needed.
Security risks
None. This is purely analytics emission of pre-existing internal version strings to PostHog. No new external input, no auth/permission changes, no data exfil concerns beyond what is already being emitted.
Level of scrutiny
Low. This is a 2-line additive change to a posthog properties builder, following the exact same .Set(key, sbx.Field) pattern as the surrounding lines. There are no logic branches, no error handling implications, and no behavior changes for existing consumers.
Other factors
The bug hunting system found no issues. Cursor Bugbot flagged only the theoretical risk that FirecrackerVersion/KernelVersion could be empty for some start paths, which would just produce blank PostHog properties rather than any functional bug. Codecov's failing tests are all known flaky integration tests with very high flake rates on main and are unrelated to this change.
Summary
Adds two properties to the
created_instancePostHog event inpackages/api/internal/orchestrator/analytics.go:firecracker_version—sbx.FirecrackerVersionkernel_version—sbx.KernelVersionBoth fields already exist on
sandbox.Sandbox(set from the build at sandbox start), so no upstream changes needed.