You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 531d617
Browse filesBrowse the repository at this point in the historyBrowse files
Resolves review findings on the telemetry `source` field:
- Read `Flag.ALTIMATE_CLI_CLIENT` live at envelope-build time instead of a
hardcoded `clientSource = "cli"` set only inside the prompt flow. Events
emitted before the first prompt (startup, connection setup, standalone CLI
subcommands) are now labelled with the real client instead of defaulting to
`"cli"`. Removes the now-redundant `clientSource` variable, `setSource()`,
and its call in `session/prompt.ts`.
- Type-guard `session.metadata?.source` in the `session_start` emit (was an
unchecked `as string`) so malformed client JSON falls back to the flag
instead of being routed to `measurements` downstream.
- Document `Session.Info.metadata` as an intentional open extension point.
- Add tests: telemetry envelope `source` behaviour (env-flag default, `"cli"`
fallback, per-event override, non-string routing contract) and session
`metadata` round-trip through `create` -> `get`.
Comments clarified per Codex review: events that carry their own `source`
field (session_start, and pre-existing `skill_*`/connections events) override
the injected process-level value.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
0 commit comments