[raycicmd] Add prefix: token to RAYCI_SELECT for prefix matching#489
Merged
Conversation
Adds a prefix:<value> token to the -select flag and RAYCI_SELECT env var. The token hits a step when <value> is a string prefix of either the step's id or its key, letting one entry pick a family of related step keys. - Bare tokens remain exact-match against id or key (back-compat). - tag:<value> is unchanged. - Empty prefix:<> is dropped at parse time and filtered defensively in the consumer (prefixHit). - Help text for -select enumerates the three forms, notes that group keys are also matched (pulling in sub-steps), and that prefix:/tag: are reserved namespaces. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces prefix-based selection for steps using the "prefix:" keyword in the -select flag, alongside existing exact matches and tag-based selection. It includes updates to the CLI help text, the step filtering logic, and comprehensive unit tests. Feedback was provided to ensure that empty tag selectors are ignored during parsing to maintain consistency with the new prefix selection logic.
Addresses PR review feedback: an empty tag:<> token would otherwise land in tagSelects as a "" entry. It does not match any real step tag today (so this is not a behavior change), but the symmetry with how prefix:<> handles empty values is worth preserving. Test parameterized over both tokens. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comments out the released-binary install path so CI builds rayci from source on this branch. Temporary; revert before merging. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ba6f8d4 to
6f8bc80
Compare
6f8bc80 to
3ab6afc
Compare
elliot-barn
approved these changes
May 8, 2026
andrew-anyscale
approved these changes
May 8, 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
prefix:<value>token to-selectandRAYCI_SELECTthat hits a step when<value>is a string prefix of the step's id or key, letting one entry pick a family of related step keys.tag:<value>is unchanged.prefix:value is dropped at parse time and filtered defensively in the consumer (prefixHit).-selecthelp text enumerates the three forms, notes that group keys are also matched (pulling in sub-steps), and thatprefix:/tag:are reserved namespaces.Test plan
go test ./...go vet ./...go fmt ./...TestStepNodePrefixHitandTestStepFilter_prefixSelectscover prefix-on-id, prefix-on-key, reflexive equality, longer-than-key, non-prefix, empty-prefix at parse time and at consumer, OR composition with bare/tag/prefix paths, and a paired prefix-on-id miss.TestStepNodeSelectHitandTestStepFilter_selectsextended to lock in that bare tokens stay exact-match.rayci -select prefix:<known-prefix>against a sample pipeline and confirm only steps with matching id/key prefixes are emitted. : https://buildkite.com/ray-project/release-tests/builds/6🤖 Generated with Claude Code