Skip to content

RIG-404 feat: implementation#241

Merged
ArLeyar merged 2 commits intomainfrom
feat/RIG-404-pipeline-engineer-stage
Apr 9, 2026
Merged

RIG-404 feat: implementation#241
ArLeyar merged 2 commits intomainfrom
feat/RIG-404-pipeline-engineer-stage

Conversation

@ArLeyar
Copy link
Copy Markdown
Contributor

@ArLeyar ArLeyar commented Apr 9, 2026

Summary

Pipeline engineer task 20260409-001.

Linear: RIG-404

Effects processor previously used a single LinearClient for all effects.
GitHub issues (e.g. honeyjourney#20) would hit the Linear API and get
"Entity not found" errors.

- Extract resolve_tracker_client() from pipeline_cmd.rs to shared tracker.rs
- Route each effect in process_effects() to the correct tracker: GitHub
  identifiers (containing '#') resolve via tracker config, Linear
  identifiers use the passed-in client
- Daemon now always processes effects (not gated on LINEAR_API_KEY), so
  GitHub-only setups work without Linear configured
@ArLeyar
Copy link
Copy Markdown
Contributor Author

ArLeyar commented Apr 9, 2026

Code review

Found 2 issues:

  1. UserConfig::load() called on every daemon tick (every 5s), performing a disk read of ~/.werma/config.toml 12 times/minute. All other daemon external resources (linear_poll, cmd_runner, notifier) are initialized once before the loop. This should be loaded once at startup and passed in, consistent with the established daemon pattern.

// (Linear or GitHub). The optional `linear_poll` is passed as fallback for
// Linear identifiers; GitHub effects are resolved via user_cfg.
{
let user_cfg = crate::config::UserConfig::load();
match crate::pipeline::effects::process_effects(
&db,
linear_poll.as_deref(),
&cmd_runner,
&notifier,
&user_cfg,
) {
Ok(r) if r.processed > 0 || r.failed > 0 => {

  1. Behavior regression: before this PR, the if let Some(lp) = linear_poll.as_deref() guard meant that when LINEAR_API_KEY is absent, Linear effects stayed in pending state (waited for config). After this PR, process_effects always runs — any Linear effect (non-# identifier, e.g. RIG-123) processed when linear is None is now permanently dead-lettered with "no Linear client available". Effects marked failed here are not retried. This breaks setups where the API key is temporarily absent.

l
} else {
let msg = format!("no Linear client available for '{}'", effect.issue_id);
db.mark_effect_failed(effect.id, &msg)?;
failed += 1;
if effect.blocking {
eprintln!(
"[effects] blocking effect {} (type={:?}) failed for task {}: {msg}",
effect.id, effect.effect_type, task_id
);

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

1. Load UserConfig once at daemon startup instead of every 5s tick,
   consistent with how linear_poll, cmd_runner, notifier are initialized.

2. When LINEAR_API_KEY is absent, skip Linear effects (leave pending)
   instead of dead-lettering them. Preserves pre-RIG-404 behavior where
   effects waited for the client to become available.
@ArLeyar ArLeyar merged commit 9ed2bbc into main Apr 9, 2026
2 checks passed
@ArLeyar ArLeyar deleted the feat/RIG-404-pipeline-engineer-stage branch April 9, 2026 13:53
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.

1 participant