fix(flare-workflow): skip foreign-typed rows in list_active/list_all instead of failing the whole scan - #514
Conversation
…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
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 56 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Summary
workflow_runsis a shared SQLite table across everyWorkflowEngine<D, _>pointed at the same store file.list_all()/list_active()deserialized every row as the caller's ownD, so a row written by a different engine'sD(e.g. the internal SDD work-item pipeline vs the JSON-workflow tool'sPipelineData) hard-failed the whole scan.start_workflow_with_paramscallsevict_old_runs_if_needed()->list_all()unconditionally before spawning the run's execution task, this broke everymcp__flare__workflowrun/listcall the moment any foreign-typed row existed in the table — the new run's state got persisted (looked likestatus: running) but its execution task was never spawned, leaving it zombied atpendingforever with no error surfaced past the initial call.list_active/list_allnow skip-and-warn on a per-row deserialize failure (deserialize_or_skip) instead of failing the entire scan, matching the existing warn-and-continue patternrecover()already uses for unregistered definitions.Test plan
crates/flare-workflow/tests/cross_type_store_test.rs— twoWorkflowEngine<D, SqliteStore<D>>instances (struct-shaped vs unit-structD) sharing one file; confirmed it fails with the exact production error (invalid type: map, expected unit struct ...) before the fix and passes aftercargo test -p flare-workflow): 41 tests passingcargo clippy -p flare-workflow --all-targets -- -D warnings -A unsafe_code -A clippy::pedantic: cleancargo fmt -p flare-workflow~/.agentflare/workflows.dbthis session (item feat(pm): PM skill pack fast-follows — single /pm command, portfolio roll-up, real health bottlenecks #474)