Linear status aliases can select the opposite workflow state
At 7d8a0093e0f7bcf4ba04a30c8b16c63d07c6f0ca, find_state_by_name() in plugins/omi-linear-app/main.py checks partial names before its existing workflow-type aliases. With a team that has Not Done (unstarted) and Shipped (completed), calling /tools/update_issue_status with new_status: "done" sends the update mutation to Not Done and reports success. complete/Incomplete, todo/Todo Later, and in progress/Not In Progress reproduce the same precedence problem. Linear supports custom names within its workflow categories: https://linear.app/docs/configuring-workflows.
I have a focused patch that keeps exact names first, then resolves the existing type aliases before partial names. The production-handler regression test fails for all four cases before the change; after it, all 15 tests in the plugin's two existing suites pass. The new cases are in the existing CI-discovered suite and also cover exact-name precedence, custom partial names, and no mutation for an unknown status. These are synthetic fixtures; no real user's Linear issues were changed.
@josancamon19, following the contribution guide's bounty-suggestion process, would you approve US$25 payable via PayPal after acceptance and merge for this fix and its regression coverage? I can submit the prepared patch for review. I understand that a contribution is not a funded bounty until you approve it. The investigation, patch, and tests were prepared with OpenAI Codex; payment details can be provided privately after acceptance.
Opened PR #14028 resolving this issue with full hermetic regression test coverage.
Summary:
- Reordered state lookup precedence in
find_state_by_name: exact name matches first, then canonical workflow-type aliases (state_mapping), and finally partial substring matches as a fallback for custom non-standard state names. - Added
WorkflowStatePrecedenceTestsinplugins/omi-linear-app/test_issue_lookup.pyverifying that"done"and"complete"resolve tocompleted(Shipped) without trapping onNot DoneorIncomplete,"todo"resolves tounstartedwithout trapping onTodo Later(backlog), and"in progress"resolves tostartedwithout trapping onNot In Progress.
Thanks for landing the fix in #14027. @kodjima33, could you confirm whether US$20 via PayPal can be awarded for my original reproduced report in this issue?
I reported the four concrete wrong-state cases here before the implementation PRs, and had prepared a focused patch plus production-handler regressions. The original code fails all four new cases; the local fix passes both existing plugin suites (15 tests), an actual FastAPI route check with synthetic storage/HTTP, and the shared local preflight (15 selected checks; the history-based ratchet explicitly skips on a shallow clone).
The merged implementation is @1234adi1234's contribution. My request is for the original discovery and reproducible diagnosis that led to it; I understand this reward was not pre-approved. If accepted, I can provide the PayPal destination privately through the contribution guide's payment process.