Skip to content

Prevent exclusive-label conflicts and improve label diagnostics - #63

Open
FelixLisczyk wants to merge 3 commits into
joa23:mainfrom
FelixLisczyk:tl-562
Open

Prevent exclusive-label conflicts and improve label diagnostics#63
FelixLisczyk wants to merge 3 commits into
joa23:mainfrom
FelixLisczyk:tl-562

Conversation

@FelixLisczyk

@FelixLisczykFelixLisczyk commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Problem

When users select multiple child labels from the same exclusive parent group, the CLI currently sends an invalid mutation to Linear. The resulting error is opaque, repeats the operation context, and may expose a truncated GraphQL mutation without identifying the conflicting labels or their shared group.

For example:

linear issues create "Issue title" --team SX --labels "Tests,Improvement"

The default label listings also render parent groups and child labels as a flat list, making invalid combinations difficult to recognize.

Changes

This PR:

  • Resolves labels with canonical names, IDs, and parent metadata.
  • Detects conflicting child-label selections before create, replace, and additive update mutations.
  • Reports all conflicting labels and their shared exclusive group deterministically.
  • Deduplicates label inputs and supports UUID and case-insensitive name resolution.
  • Handles unchanged default teams correctly for add/remove label updates.
  • Preserves explicit empty label updates for clearing all labels.
  • Renders parent groups and child alternatives clearly in text label listings.
  • Preserves the existing JSON label structure and parent metadata.
  • Removes raw GraphQL query previews from user-facing errors.
  • Removes duplicated create/update operation context.
  • Adds resolver, validation, service, formatter, client, and GraphQL regression tests.

Testing

  • make build passes.
  • make test passes.
  • Adds broad automated coverage for resolver/cache behavior, label conflict validation, mutation suppression, update modes, grouped formatting, JSON compatibility, and GraphQL error handling.
  • Some planned edge cases do not yet have dedicated service or CLI integration tests, including full replace-conflict suppression and exact operation-context counts.

FelixLisczykand others added 3 commits August 6, 2026 12:59
Validate label groups before issue mutations, preserve metadata through resolver caches, and render grouped label listings. Sanitize GraphQL errors and preserve explicit empty label updates while adding regression coverage.
Co-Authored-By: Claude <noreply@anthropic.com>
Allow label additions and removals when the requested team is unchanged, reject incomplete metadata safely, paginate label retrieval, and refresh resolver cache snapshots. Add update, pagination, cache, and CLI flag regression coverage while preserving valid empty-label and JSON behavior.
Co-Authored-By: Claude <noreply@anthropic.com>
@FelixLisczyk
FelixLisczyk marked this pull request as ready for review August 6, 2026 12:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@FelixLisczyk