fix(preprod): Update default artifact type and label#109194
fix(preprod): Update default artifact type and label#109194cameroncooke merged 3 commits intomasterfrom
Conversation
Change the default artifact type for new status check rules from all_artifacts to main_artifact, aligning with DEFAULT_ARTIFACT_TYPE. Remove the now-unused ALL_ARTIFACTS_ARTIFACT_TYPE constant. Co-Authored-By: Claude <noreply@anthropic.com>
Better reflects the matching semantics of the option in the UI. Co-Authored-By: Claude <noreply@anthropic.com>
|
|
||
| const ARTIFACT_TYPE_LABELS: Record<ArtifactType, string> = { | ||
| all_artifacts: 'All Artifact Types', | ||
| all_artifacts: 'Any Artifact Type', |
There was a problem hiding this comment.
Are these used for display in the frontend? If so, we'll want to wrap with t(..) so they get translated
There was a problem hiding this comment.
Good catch. Didn't know about that.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| metric: updated.metric, | ||
| measurement: updated.measurement, | ||
| artifact_type: updated.artifactType ?? 'all_artifacts', | ||
| artifact_type: updated.artifactType ?? DEFAULT_ARTIFACT_TYPE, |
There was a problem hiding this comment.
Analytics fallback misreports existing rules' artifact type
Low Severity
The analytics fallback for artifact_type changed from the literal 'all_artifacts' to DEFAULT_ARTIFACT_TYPE (which is 'main_artifact'). This fallback activates when updated.artifactType is undefined, which would happen for existing rules that predate the artifact type field. For such legacy rules, the actual backend behavior is all_artifacts, but analytics would now incorrectly report 'main_artifact'. The "default for new rules" and the "fallback for legacy rules without a value" are semantically different — coupling them via DEFAULT_ARTIFACT_TYPE conflates the two.


Change the default artifact type for new status check rules from
all_artifactstomain_artifactand rename theall_artifactsdisplay label from "All Artifact Types" to "Any Artifact Type" for
clarity.
main_artifactinstead ofall_artifactsALL_ARTIFACTS_ARTIFACT_TYPEconstantRefs LINEAR-EME-871