The LogEventType union in experiment/types/study.ts mixes three naming conventions, which makes filtering/joining log events at analysis time more error-prone:
- Colon-namespaced:
view:consent, view:intro, surveyComplete:intro-survey, aiRequest:${string}, chatMessage:user
- camelCase:
launchConsentForm, taskStart, taskComplete, documentUpdate
- Title Case with a space:
'Started Study'
The space-containing 'Started Study' is the worst offender — spaces in event names make grep/jq filtering and joins awkward.
Suggestion
Pick one convention (the colon-namespaced category:detail style is already the most common and reads well for analysis) and normalize all event types. At minimum, rename 'Started Study' to remove the space.
Considerations
- This is an analysis-format change, not a code-logic change. Renaming affects every
log({ event: ... }) call site.
- Existing JSONL logs from prior waves (
pilot-3 and earlier) will use the old names — analysis code that spans waves will need to handle both, or the rename should be scoped to start at a new wave boundary.
Context: surfaced during review of commit 396345d. Not blocking the current pilot, but worth normalizing before the real study.
The
LogEventTypeunion inexperiment/types/study.tsmixes three naming conventions, which makes filtering/joining log events at analysis time more error-prone:view:consent,view:intro,surveyComplete:intro-survey,aiRequest:${string},chatMessage:userlaunchConsentForm,taskStart,taskComplete,documentUpdate'Started Study'The space-containing
'Started Study'is the worst offender — spaces in event names make grep/jq filtering and joins awkward.Suggestion
Pick one convention (the colon-namespaced
category:detailstyle is already the most common and reads well for analysis) and normalize all event types. At minimum, rename'Started Study'to remove the space.Considerations
log({ event: ... })call site.pilot-3and earlier) will use the old names — analysis code that spans waves will need to handle both, or the rename should be scoped to start at a new wave boundary.Context: surfaced during review of commit 396345d. Not blocking the current pilot, but worth normalizing before the real study.