Follow-up to #253: error on invalid configured sort instead of defaulting#254
Merged
Conversation
…ting Add resolveIssueSort() so all issue-listing commands share one sort resolution path: --sort flag > LINEAR_ISSUE_SORT env > issue_sort config > priority default. Unlike the getOption fallback, an explicitly configured but invalid sort value now errors with guidance instead of silently sorting by priority; this also fixes the same latent silent downgrade in issue query. Also cover the gaps around the new default: a genuinely unconfigured subprocess test (the repo's own .linear.toml supplies issue_sort when tests run in-process, so the previous no-config tests were passing via that config file), a test that a configured sort order still wins over the default, and updated skill docs that no longer claim issue list requires a sort order.
schpetbot
marked this pull request as ready for review
July 23, 2026 15:33
schpetbot
force-pushed
the
oss-pr-lander/253
branch
from
July 23, 2026 15:33
76c250a to
991460e
Compare
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.
Follow-up to #253 — a corrective delta that will be rebased onto main once #253 lands, after which this PR's diff shrinks to just the delta. (Until then CI diffs the superset: #253's commit + this one.)
What this adds on top of #253
resolveIssueSort()shared byissue mine/list,issue start(viafetchIssuesForState), andissue query:--sortflag >LINEAR_ISSUE_SORT>issue_sortconfig >prioritydefault. Unlike thegetOption(...) || "priority"fallback, an explicitly configured but invalid sort value now errors with guidance instead of silently sorting by priority (per the repo's error-handling conventions). This also fixes the same latent silent downgradeissue queryalready had. Search mode never resolves sort, so an invalid env var can't breakissue query --search..linear.tomlsetsissue_sort = "priority", so in-process "nothing configured" tests were actually exercising the config-file path (they pass on trunk too). Added a subprocess test with a clean cwd/HOME/env that fails on trunk with "Sort must be provided" and passes with the default.LINEAR_ISSUE_SORT=manual(and by the same path,issue_sortconfig) sends the manual sort payload — the new default cannot override a configured sort order.issue listrequires a sort order (template updated + regenerated).