Conversation
Introduces the LinearIssues trigger backend as a foundational type for the Linear integration epic (#472). All fields are optional so workflows can narrow by team, project, status, labels, and assignee without requiring every filter to be set. Changes: - scheduler/types.rs: new LinearIssues variant with team_key, project, status, labels, and assignee fields; all serde-defaulted to None/empty - trigger_type() returns "linear_issues" (snake_case, consistent with existing variants) - is_implemented() converted from matches\! to explicit match and returns false for LinearIssues until LinearIssueSource lands in issue #475 - scheduler/api.rs: explicit LinearIssues arm in the validation match (no field-level validation yet — all fields optional) - cli/orchestrator.rs: display_workflow() arm prints each non-empty field; four new unit tests covering trigger_type, serde with full fields, serde with defaults, and roundtrip serialization Closes #473 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
geoffjay
left a comment
There was a problem hiding this comment.
Good foundational change for the Linear integration epic. The type definition is clean, serde defaults are correct, and the explicit match in is_implemented() is a clear improvement over the old matches! macro — the compiler will now catch any future unhandled variant at compile time.
Two issues worth addressing before or alongside issue #475:
1. Stale error message in api.rs (minor, pre-existing but now misleading)
The rejection message for unimplemented trigger types reads:
"Currently supported: github_issues, github_pull_requests, cron, delay"
That list was already wrong (missing agent_lifecycle, dispatch_result, webhook, manual), but it becomes actively misleading now that linear_issues will trigger it. A caller who POSTs a linear_issues workflow will receive an error claiming only those four types are supported. The message should either enumerate all currently implemented types or be reworded generically (e.g. "check the documentation for currently supported trigger types").
2. Test placement (maintainability)
The four new tests (test_trigger_config_linear_issues_*) are in crates/cli/src/commands/orchestrator.rs but they test pure type behaviour — serde round-trips, trigger_type(), and is_implemented() — with no CLI dependency at all. They belong in crates/orchestrator/src/scheduler/types.rs alongside the existing test_trigger_config_is_implemented test. Having type-level tests in the CLI crate makes them harder to find and means a cargo test -p orchestrator run will miss them.
Everything else looks correct: no unwrap() on fallible paths, all fields properly #[serde(default)]-annotated, is_one_shot() correctly returns false for LinearIssues via the existing matches!(self, Delay {..}), and the display_workflow arm handles all optional fields safely with if let Some / !is_empty() guards.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #482 +/- ##
==========================================
- Coverage 55.39% 55.36% -0.03%
==========================================
Files 126 126
Lines 13518 13533 +15
==========================================
+ Hits 7488 7493 +5
- Misses 6030 6040 +10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Replace stale trigger-type list in api.rs rejection message with a generic "see documentation" phrasing - Move four test_trigger_config_linear_issues_* tests from cli crate to orchestrator/src/scheduler/types.rs where they belong alongside the other TriggerConfig unit tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump aws-lc-rs 1.16.1 -> 1.16.2 (and aws-lc-sys 0.38.0 -> 0.39.0) to fix RUSTSEC-2026-0044 (X.509 Name Constraints bypass) - Add RUSTSEC-2026-0002 (lru IterMut unsoundness) to audit.toml ignore list; proper fix requires upgrading lancedb past 0.16 which is tracked in #543 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Bump rustls-webpki 0.103.8 -> 0.103.10 (Cargo.lock) to address RUSTSEC-2026-0049 (CRL matching bypass) - Ignore RUSTSEC-2026-0049 and RUSTSEC-2026-0002 in audit.toml for the remaining rustls-webpki 0.101.7 and lru 0.12.5 findings; both are transitively locked by lancedb 0.16 and cannot be resolved without the lancedb upgrade tracked in #543 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
LinearIssuesvariant toTriggerConfigwith five optional filter fields:team_key,project,status,labels,assigneetrigger_type()returns"linear_issues"(snake_case, consistent with all existing variants)is_implemented()converted frommatches!to an explicitmatch— returnsfalseforLinearIssuesuntilLinearIssueSourceis implemented in Implement LinearIssueSource task source #475LinearIssuesarm added to the API validation match inscheduler/api.rs(no field-level validation yet since all fields are optional)display_workflow()in the CLI prints each non-empty Linear fieldTest plan
cargo build -p orchestrator -p cli— clean, no warningscargo clippy -p orchestrator -p cli— cleantrigger_type, full serde deserialization, minimal/default serde, and roundtrip serializationclient::testsunrelated to this change)Closes #473
🤖 Generated with Claude Code