feat(labels): an unknown --label names the team's real labels (PHNX-4105) - #57
Merged
Merged
Conversation
create and update printed "label 'x' not found, skipping." and agents answered it with linear labels create x. The warning now adds a did-you-mean for a near miss and the team's labels, sorted, with the count and the full-list command, so the fix at that moment is picking one, not minting one. (PHNX-4105) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01FQ3w5SAvum8nShzmBo21Ar
Review finding on PR #57. (PHNX-4105) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01FQ3w5SAvum8nShzmBo21Ar
Contributor
Author
|
APPROVE — independent non-author review (code-reviewer subagent, session 87d560af, reviewed at 3768c4c; suite run on the PR head, 224 OK). Both call sites still skip the label and proceed, names come from the unfiltered team list, output is stderr only, bulk create is unaffected (verbose=False never prints), sorted() is safe because IssueLabel.name is a non-null String, tests cover the helper and the create path, only linear/test_linear.py/CHANGELOG.md changed, no version bump. One SHOULD (empty-team wording read "team's 0 ()" and the count lacked its noun) applied in 552a087 with a test; suite 225 OK, 4 skipped. |
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.
feature. The warning an agent sees when it passes a label that does not exist now tells it what to use instead.
Tracking: https://linear.app/getrush/issue/PHNX-4105
What changed
_unknown_label_message(label, names)next to_suggest:label 'x' not found, skipping.plus a did-you-mean for a near miss, thenLabels are owner-managed: pick one of the team's N (sorted, first 12, …); full list: linear labels.Both call sites use it:_build_create_input(create) viawarn, and theupdate --labelpath via itsWarning:print. No behavior change beyond the message: the label is still skipped, the create or update still proceeds. Nothing new is denied.UnknownLabelMessageTests: full-list text, did-you-mean, elision at 12, and the create path printing the hint while still building the input.Verification
Screenshot of the real run:
python3 -m unittest(224 OK, 4 skipped) and twolinear update PHNX-4105 --label …calls against the live team on my own closed ticket, where the update path prints the new warning with the team's 25 labels and, forbugs,Did you mean: Bug?. No label was added.🤖 Generated with Claude Code
https://claude.ai/code/session_01FQ3w5SAvum8nShzmBo21Ar