Skip to content

Normalize study log event-name conventions #485

Description

@kcarnold

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions