Repository navigation
[local-onboarding-funnel-telemetry-fill-gaps-in] Onboarding funnel telemetry: fill gaps in setup events - #849
Open
danii1 wants to merge 1 commit into
Conversation
Contributor
Author
Artifacts & verificationRun: 1712 · Commit: Verification reportProduced by Show artifactAuto-review summaryProduced by Show artifact |
…arding funnel telemetry: fill gaps in setup events
danii1
force-pushed
the
feature/local-onboarding-funnel-telemetry-fill-gaps-in
branch
from
December 4, 2026 12:39
d3dbbd3 to
1bab475
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Stacked on #846 (
feature/local-onboarding-try-it-on-this-repo-first-sug, task local-onboarding-try-it-on-this-repo-first-sug): this PR targets that branch. Review and merge #846 first.Task local-onboarding-funnel-telemetry-fill-gaps-in: Onboarding funnel telemetry: fill gaps in setup events
DevIntern already sent setup events, but nothing tied one
initrun's events together, and several steps had no event at all: host checks, tracker choice, credential and query checks, sign-in, service install, first task, and abandonment. The owner wants to see where real users stop during setup. The audit below lists the gaps.What changed
observability/setup-funnel.ts): one randomsetup_idper setup run, plus the last funnel step reached.runInitalways opens a fresh one.runWorkerInitandworker init --non-interactivejoin an open one or open their own.setup_idandfunnel_step:setup_startedandworker_init_started→init_startedsetup_completedandworker_init_completed→completedsetup_failedandworker_init_failed→failedsetup_declinedand a declined host check →declinedlast_step.setup_stephas onefunnel_stepper step:host_checked,tracker_chosen,credentials_checked,query_checked,sign_in,service_install,first_task_started.setup_abandonedfires on Ctrl+C, closed input, or too many invalid answers, withlast_step. It is only queued before the usual exit flush, so it never adds delay beyond the existing flush limit.worker-init-host.ts):agent_missing,agent_not_signed_in,git_missing,service_manager_unavailable, pluscheck_agent/check_git/check_servicestatuses.agent-reuse.tsgaineddefaultAgentProblem, so "signed out" is known even when no other agent could replace it.reused_config.try,sampleand the worker's own.task_runandworker_task_runnow carrypr_opened, set where a PR is created.DEVINTERN_SETUP_ID(UUID only) so itstask_runjoins the setup.worker_task_runfor the same anonymous id.ALLOWED_PROP_KEYSgainedsetup_id,funnel_step,last_step,harness,duration_ms,default_choice,try_mode,reused_config,pr_opened,task_kind,check_serviceanderror_code. Values are enums, booleans or numbers.docs/code/advanced-settings.mdlists the setup events under the analytics section.packages/code/AGENTS.mdhas a contributor note on keeping the names stable.tests/setup-funnel.test.tshas 13 tests.Audit gaps. Everything marked "missing" had no event before this change.
initstartedsetup_idhost_checkedtracker_chosencredentials_checkedquery_checkedlogin_result, outside initsign_inservice_installfirst_task_startedpr_openedon task eventsworker_task_runsetup_abandonedWebsite follow-up. The CLI docs are updated. The privacy page at https://devintern.com/privacy/ lives in the website repo and needs the same list of events and properties added there.
Scope
Included: the events above, the property allowlist, abandonment on prompt aborts, docs, the AGENTS.md note, and tests.
Excluded:
initwizard has nohost_checkedevent. It only lists agents after setup, so a host step there would break funnel order.--non-interactivesetup only getssetup_idandfunnel_stepon its existing started, completed and failed events. It has no per-step events. A failed run also sends the report'scodeaserror_code.setup_abandoned.agent_not_signed_inis only detected for the default agent with no explicitAGENT_HARNESS.Tradeoffs
tracker_chosenandcredentials_checkedare emitted insiderunTrackerSetup, which both wizards share, so they appear in both flows without duplicated code. The cost is that shared code now sends analytics.trackFunnelStepdoes nothing when no setup run is open, so the shared picker and sign-in code send nothing outside setup.first_pr_openedis not asetup_stepevent: it is a property ontask_run, so funnels must read it from there. This kept the event count down.Blast Radius
runTrackerSetup,runInit,runWorkerInit,hostStep,serviceStep,signInOnceand the first-task and try offers now send extra analytics calls. These are fire-and-forget, never throw, and skip when telemetry is off.findAgentReuseOfferwas refactored onto the newdefaultAgentProblem. The existingagent-reusetests pass.trackInteractiveTaskRunandtrackWorkerTaskRungainedpr_opened, which adds a field to the existing events.trackWorkerInitFailedgained an optional third parameter.worker/cli.tsnow opens the funnel for--non-interactive.--jsonoutput changed, so I didn't update the offline e2e tests.Verification
bun run typecheck: pass.bun run lint: oxlint, knip and the ratchet all pass. After the final cleanup I re-ran onlylint:knipandlint:ratchet, not the full lint.bun run format: ran.tests/setup-funnel.test.ts: 13 pass. Covered:setup_idand the funnel order;setup_abandonedonce, withlast_step;init→ worker sharing onesetup_id;init→ worker test only throws insiderunWorkerInit, so therunInitcatch path is not independently covered.bun run testinpackages/code: 6554 pass, 3 fail on the first run; 6500 pass, 12 fail on the second.cli-privacy-egressandworker-init-trypass (12 tests). I did not run the full offline e2e suite.🤖 Opened by DevIntern from local-onboarding-funnel-telemetry-fill-gaps-in