Skip to content

Follow-up to #253: error on invalid configured sort instead of defaulting#254

Merged
schpetbot merged 1 commit into
mainfrom
oss-pr-lander/253
Jul 23, 2026
Merged

Follow-up to #253: error on invalid configured sort instead of defaulting#254
schpetbot merged 1 commit into
mainfrom
oss-pr-lander/253

Conversation

@schpetbot

Copy link
Copy Markdown
Collaborator

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

  • Strict sort resolution. New resolveIssueSort() shared by issue mine/list, issue start (via fetchIssuesForState), and issue query: --sort flag > LINEAR_ISSUE_SORT > issue_sort config > priority default. Unlike the getOption(...) || "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 downgrade issue query already had. Search mode never resolves sort, so an invalid env var can't break issue query --search.
  • Genuine no-config coverage. The repo's own .linear.toml sets issue_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.
  • Configured sort still wins. New test locks in that LINEAR_ISSUE_SORT=manual (and by the same path, issue_sort config) sends the manual sort payload — the new default cannot override a configured sort order.
  • Docs. Skill docs no longer claim issue list requires a sort order (template updated + regenerated).

…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
schpetbot marked this pull request as ready for review July 23, 2026 15:33
@schpetbot
schpetbot force-pushed the oss-pr-lander/253 branch from 76c250a to 991460e Compare July 23, 2026 15:33
@schpetbot
schpetbot merged commit 97d6077 into main Jul 23, 2026
15 checks passed
@schpetbot
schpetbot deleted the oss-pr-lander/253 branch July 23, 2026 15:37
Sign up for free to 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.

2 participants