Repository navigation
test(agent): clarify absent and unknown placement flags #19839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ import type { AgentFreeUsePlacement } from '@/platform/telemetry/types' | |
| import { getDevOverride } from '@/utils/devFeatureFlagOverride' | ||
| import { getSessionOverride } from '@/utils/sessionFeatureFlagOverride' | ||
|
|
||
| const FREE_USE_PLACEMENT_FLAG = 'agent-free-use-message-placement' | ||
| export const FREE_USE_PLACEMENT_FLAG = 'agent-free-use-message-placement' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit-pick (non-blocking): The test is the only importer of this export. Keeping the constant module-private, and writing the literal |
||
|
|
||
| export const FREE_USE_PLACEMENTS = [ | ||
| 'control', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Building the expected telemetry key from
FREE_USE_PLACEMENT_FLAGcomputes the expectation with the same value production uses, whichtesting-principles.mdasks us to avoid ("Expected values are literal"). If the constant changes, the PostHog$feature/...key changes with it and these two cases still pass. Only the first case's literal would catch it. Could both use the literal'$feature/agent-free-use-message-placement', as the first case does? The same applies at line 71.