fix: propagate implicit @CrewBase names to crew events#5574
Merged
renatonitta merged 3 commits intomainfrom Apr 21, 2026
Merged
fix: propagate implicit @CrewBase names to crew events#5574renatonitta merged 3 commits intomainfrom
renatonitta merged 3 commits intomainfrom
Conversation
greysonlalonde
approved these changes
Apr 21, 2026
vinibrsl
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the case where OpenTelemetry logs and traces report the crew or automation name as
"crew"instead of the actual@CrewBaseautomation name.@CrewBaseclass name onto the returnedCrewinstance only whennamewas not explicitly providedCrew(name=...)valuesCrew.namesemantics or adding newCrewstate just for tracingRoot Cause
For
@CrewBaseprojects, the@crewfactory could return aCrewinstance that still had the default name"crew". That value was then emitted through kickoff events and consumed downstream by tracing/logging, causing OTel metadata to show the wrong automation name.Changes
@crewdecorator to apply the@CrewBaseclass name only whennamewas implicitCrew(name=...)untouchedNote
Low Risk
Low risk: narrowly changes
@crewdecorator behavior to setCrew.nameonly when the name was implicit, and adds tests to prevent regressions in event/tracing display names.Overview
Fixes incorrect crew display names (e.g., defaulting to
"crew") for@CrewBaseprojects by having the@crewdecorator copy the@CrewBaseclass name onto the returnedCrewinstance only whennamewas not explicitly set (checked viaCrew.model_fields_set).Adds focused tests ensuring implicit class-name propagation, explicit
Crew(name=...)preservation, and thatCrewKickoffStartedEventemits the expected display name for tracing/logging.Reviewed by Cursor Bugbot for commit cd1c792. Bugbot is set up for automated code reviews on this repo. Configure here.