Skip to content

fix(flare-workflow): skip foreign-typed rows in list_active/list_all instead of failing the whole scan - #514

Merged
getappz merged 1 commit into
masterfrom
task/474-vent-mcp-flare-workflow-action-run-is-un
Aug 15, 2026
Merged

fix(flare-workflow): skip foreign-typed rows in list_active/list_all instead of failing the whole scan#514
getappz merged 1 commit into
masterfrom
task/474-vent-mcp-flare-workflow-action-run-is-un

Conversation

@getappz

@getappz getappz commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • workflow_runs is a shared SQLite table across every WorkflowEngine<D, _> pointed at the same store file. list_all()/list_active() deserialized every row as the caller's own D, so a row written by a different engine's D (e.g. the internal SDD work-item pipeline vs the JSON-workflow tool's PipelineData) hard-failed the whole scan.
  • Since start_workflow_with_params calls evict_old_runs_if_needed() -> list_all() unconditionally before spawning the run's execution task, this broke every mcp__flare__workflow run/list call the moment any foreign-typed row existed in the table — the new run's state got persisted (looked like status: running) but its execution task was never spawned, leaving it zombied at pending forever with no error surfaced past the initial call.
  • Fix: list_active/list_all now skip-and-warn on a per-row deserialize failure (deserialize_or_skip) instead of failing the entire scan, matching the existing warn-and-continue pattern recover() already uses for unregistered definitions.

Test plan

  • Added crates/flare-workflow/tests/cross_type_store_test.rs — two WorkflowEngine<D, SqliteStore<D>> instances (struct-shaped vs unit-struct D) sharing one file; confirmed it fails with the exact production error (invalid type: map, expected unit struct ...) before the fix and passes after
  • Full crate suite (cargo test -p flare-workflow): 41 tests passing
  • cargo clippy -p flare-workflow --all-targets -- -D warnings -A unsafe_code -A clippy::pedantic: clean
  • cargo fmt -p flare-workflow
  • Reproduced and fixed live against a real poisoned ~/.agentflare/workflows.db this session (item feat(pm): PM skill pack fast-follows — single /pm command, portfolio roll-up, real health bottlenecks #474)

…instead of failing the whole scan

workflow_runs is a shared SQLite table across every WorkflowEngine<D, _>
pointed at the same store file. list_all()/list_active() deserialized
every row as the caller's own D, so a single row written by a different
D (e.g. the internal SDD work-item pipeline vs the JSON-workflow tool's
PipelineData) hard-failed the scan. Since start_workflow_with_params
calls evict_old_runs_if_needed() -> list_all() unconditionally before
spawning the run's execution task, this broke every mcp__flare__workflow
run/list call as soon as any foreign-typed row existed -- the new run's
state got persisted but its execution task was never spawned, leaving
it zombied at pending forever with no error surfaced past the initial
call.

Agentflare-Agent: claude-code_2-1-233_agent
Agentflare-Branch: task/474-vent-mcp-flare-workflow-action-run-is-un
Agentflare-Item: 474
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 154f0f13-8fe3-45e6-8d76-10a17cd04c78

📥 Commits

Reviewing files that changed from the base of the PR and between 05a5a78 and 93221f7.

📒 Files selected for processing (2)
  • crates/flare-workflow/src/sqlite_store.rs
  • crates/flare-workflow/tests/cross_type_store_test.rs

Comment @coderabbitai help to get the list of available commands.

@getappz
getappz merged commit b4fefc4 into master Aug 15, 2026
17 checks passed
@getappz
getappz deleted the task/474-vent-mcp-flare-workflow-action-run-is-un branch August 15, 2026 18:04
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