Skip to content

test: expand flows graph runtime coverage - #54

Merged
senamakel merged 2 commits into
tinyhumansai:mainfrom
senamakel:flows-graph-test-suite
Aug 16, 2026
Merged

test: expand flows graph runtime coverage#54
senamakel merged 2 commits into
tinyhumansai:mainfrom
senamakel:flows-graph-test-suite

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

  • add default-feature end-to-end coverage for graph construction, reducers, external inputs, dynamic fanout, parallel execution, barriers, conditional routing, interrupts, checkpoints, history, resume, and event streaming
  • add generated state-graph properties covering linear topology, fanout determinism, conditional exclusivity, and durable resume values
  • expand builder validation tests and fix reserved START/END validation ordering
  • normalize scheduler-only metadata in interception properties and retain minimized regression seeds

Validation

  • cargo test --all-features --all-targets --quiet
  • cargo clippy --all-features --all-targets -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check
  • all affected Rust source and test files are at most 500 lines

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@senamakel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 18 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 14935eca-d3c7-40cf-aad4-05d553a0c2c1

📥 Commits

Reviewing files that changed from the base of the PR and between 6294356 and 09988d0.

📒 Files selected for processing (6)
  • src/graph/builder/builder_tests.rs
  • src/graph/builder/implementation.rs
  • tests/fuzz_interception.proptest-regressions
  • tests/fuzz_interception.rs
  • tests/fuzz_state_graph.rs
  • tests/graph_runtime_e2e.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.1022 · 165,468 in / 42,566 out · 15,872 cached (10%) · openrouter/openai/text-embedding-3-small, deepseek/deepseek-v4-pro-0813 · 692 embedded
critique:    $0.0508 · 72,667 in  / 25,342 out · 6,656 cached (9%)   · deepseek/deepseek-v4-pro-0813
security:    $0.0316 · 65,679 in  / 6,091 out  · 5,376 cached (8%)   · deepseek/deepseek-v4-pro-0813
tests:       $0.0099 · 17,251 in  / 3,692 out  · 1,920 cached (11%)  · deepseek/deepseek-v4-pro-0813
description: $0.0099 · 9,871 in   / 7,441 out  · 1,920 cached (19%)  · deepseek/deepseek-v4-pro-0813

.await
.unwrap();
assert!(history.len() >= 3, "pause and resumed steps are durable");
assert_eq!(history[0].values, completed.state);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority medium critique likely

Compare the latest history entry, not the first

get_state_history most likely returns snapshots in chronological order (oldest first). The assertion compares history[0] — the earliest snapshot — against completed.state, which is the final state after resume. This would fail unless the implementation returns newest first, which is unconventional and not indicated by the call. Use history.last().unwrap().values or explicitly assert the expected earliest state (e.g. State::default()).

[RULE] incorrect-history-assertion ·

@tinysweeper

tinysweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown

How this change flows

1 changed behaviour across 22 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 40 further behaviours left out to keep the diagram readable.

flowchart LR
  n0["compile_succeeds_for_valid_graph<br/>changed"]:::changed
  n1["set_entry"]:::impacted
  n2["add_node"]:::impacted
  n3["set_finish"]:::impacted
  n4["...es_parallel_send_fanout_deterministically"]:::impacted
  n5["add_edge"]:::impacted
  n6["...aiting_join_and_conditional_route_compose"]:::impacted
  n0 -->|calls| n1
  n0 -->|tests| n1
  n0 -->|calls| n2
  n0 -->|tests| n2
  n0 -->|calls| n3
  n0 -->|tests| n3
  n0 -->|calls| n5
  n0 -->|tests| n5
  n1 -->|calls| n5
  n3 -->|calls| n5
  n4 -->|calls| n1
  n4 -->|tests| n1
  n4 -->|calls| n2
  n4 -->|tests| n2
  n4 -->|calls| n3
  n4 -->|tests| n3
  n6 -->|calls| n1
  n6 -->|tests| n1
  n6 -->|calls| n2
  n6 -->|tests| n2
  n6 -->|calls| n3
  n6 -->|tests| n3
  classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
  classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
  classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
  classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Loading

Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge.

tinysweeper 0.1.0

@tinysweeper tinysweeper Bot added the priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later. label Aug 16, 2026
# Conflicts:
#	tests/fuzz_interception.proptest-regressions

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0300 · 50,711 in / 10,797 out · 3,328 cached (7%) · openrouter/openai/text-embedding-3-small, deepseek/deepseek-v4-pro-0813 · 676 embedded
critique:    $0.0053 · 11,035 in / 974 out    · 896 cached (8%)   · deepseek/deepseek-v4-pro-0813
security:    $0.0052 · 11,014 in / 942 out    · 896 cached (8%)   · deepseek/deepseek-v4-pro-0813
tests:       $0.0117 · 18,343 in / 4,671 out  · 768 cached (4%)   · deepseek/deepseek-v4-pro-0813
description: $0.0078 · 10,319 in / 4,210 out  · 768 cached (7%)   · deepseek/deepseek-v4-pro-0813

.await
.unwrap();
assert!(history.len() >= 3, "pause and resumed steps are durable");
assert_eq!(history[0].values, completed.state);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priority medium tests likely

Compare the latest history entry, not the first

The test intends to verify that the final resumed state is durable in history, but get_state_history returns entries oldest-first. Indexing [0] compares the initial state to completed.state, which either fails for the wrong reason or passes without proving the resumed state was checkpointed. Compare the latest entry instead, e.g. history.last().expect("history is nonempty").values.

Suggested change
assert_eq!(history[0].values, completed.state);
assert_eq!(history.last().expect("history is nonempty").values, completed.state);

[RULE] incorrect-assertion ·

@senamakel
senamakel merged commit 1fcc834 into tinyhumansai:main Aug 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p2 Soon. Real but survivable — a rough edge, a gap, a thing that will bite later.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant