Skip to content

perf(exec): serial disposition for max_flow (#545) - #639

Merged
DecisionNerd merged 1 commit into
mainfrom
cursor/545-serial-max-flow-disposition-c6a4
Aug 12, 2026
Merged

DecisionNerd merged 1 commit into
mainfrom
cursor/545-serial-max-flow-disposition-c6a4

Conversation

@DecisionNerd

@DecisionNerd DecisionNerd commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Implements #545: serial disposition for max_flow.

Closes #545

Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Note

Add serial disposition for paths(by="max_flow") to the M4 entry baseline

  • Adds a run_paths_max_flow workload to the M4 entry harness that runs GraphForge::paths with PathAlgorithm::MaxFlow, asserts determinism across two runs, and records fingerprint evidence.
  • Documents in execution-resource-policy.md that max-flow uses serial Edmonds–Karp augmentations across all thread configurations due to residual graph mutation and fingerprint stability concerns.
  • Registers "paths-max-flow" in the CI matrix script and contract JSON with disposition: serial_edmonds_karp_augmenting_paths and short_ci: true.

Macroscope summarized 1679ecc.

Summary by CodeRabbit

  • New Features

    • Added a deterministic maximum-flow workload for validating directed, capacity-weighted paths from Alice to Dave.
    • Included evidence metadata and repeatability checks for consistent results.
  • Bug Fixes

    • Updated the GraphForge paths contract to use the Edmonds–Karp maximum-flow algorithm.
  • Tests

    • Added the workload to short continuous-integration and manual coverage matrices.
    • Added checks for expected workload ordering, registration, and deterministic execution.
    • Documented that maximum-flow views remain serial for stable results.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The PR adds a deterministic paths-max-flow baseline workload, records Max-Flow evidence, documents serial Edmonds-Karp execution, and updates M4 workload matrices and contract validation.

Changes

Max-flow workload

Layer / File(s) Summary
Workload execution and evidence
crates/graphforge-api/tests/m4_entry_baseline.rs, crates/graphforge-exec/src/algorithm_paths_max_flow.rs
The baseline runs the directed Alice-to-Dave Max-Flow query twice, verifies deterministic results, records a fingerprint, and describes serial residual-graph execution.
M4 matrix and contract registration
crates/graphforge-api/tests/m4_entry_baseline.rs, scripts/ci/m4-entry-matrix.py, tests/contracts/m4-entry-matrix.json
The short CI matrix, expected workload list, required workload IDs, and contract entry now include paths-max-flow.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related issues

Possibly related PRs

Suggested labels: ci-cd

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description states the main change and linked issue, but it omits most required template sections, including type, testing, checklist, and performance details. Complete the template with the change type, testing and coverage, commands run, checklist items, performance impact, breaking-change status, and reviewer notes.
Linked Issues check ❓ Inconclusive The summary confirms serial documentation and deterministic evidence, but it does not verify cancellation, limits, CSR/Arrow gates, full performance evidence, or exact-head CI. Provide reviewable evidence for cancellation and limits, CSR/Arrow compliance, workload metrics, and exact-head CI; review the excluded execution-resource policy documentation separately.
✅ Passed checks (3 passed)
Check name Status Explanation
Out of Scope Changes check ✅ Passed All reviewed changes support issue #545 by documenting serial max-flow behavior and updating workload tests, CI validation, and contract expectations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely identifies the serial treatment of max-flow execution, which is the main change in the pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/545-serial-max-flow-disposition-c6a4

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

@github-actions github-actions Bot added executor Changes to query executor core Core source code changes testing Test coverage and testing infrastructure documentation Improvements or additions to documentation tooling Developer tooling and automation labels Aug 10, 2026
@blacksmith-sh

This comment has been minimized.

@DecisionNerd
DecisionNerd marked this pull request as ready for review August 11, 2026 23:06
@DecisionNerd
DecisionNerd force-pushed the cursor/545-serial-max-flow-disposition-c6a4 branch 2 times, most recently from 849dc32 to 672d4cd Compare August 11, 2026 23:47
@DecisionNerd
DecisionNerd marked this pull request as draft August 12, 2026 01:05
@DecisionNerd
DecisionNerd marked this pull request as ready for review August 12, 2026 05:06
@DecisionNerd
DecisionNerd force-pushed the cursor/545-serial-max-flow-disposition-c6a4 branch from 672d4cd to 9a9f9df Compare August 12, 2026 05:06

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/graphforge-api/tests/m4_entry_baseline.rs`:
- Around line 421-422: Remove the obsolete paths-gomory-hu-tree workload
consistently: in crates/graphforge-api/tests/m4_entry_baseline.rs at lines
421-422, keep run_paths_max_flow as the only workload in collect_workloads_for;
at lines 1092-1093, apply the same replacement in collect_short_matrix; at lines
1200-1201, replace the Gomory-Hu ID in its original position and do not append a
Max-Flow ID; in scripts/ci/m4-entry-matrix.py at lines 28-29, remove
paths-gomory-hu-tree from REQUIRED_WORKLOAD_IDS so the workload matrix matches
the contract.
- Around line 583-594: Repair the malformed insertion around
run_paths_gomory_hu_tree and run_paths_max_flow: retain a single person_uuid
helper, restore each function as a complete independent implementation, and
ensure both return their workload collections with WorkloadEvidence initializers
valid. Match each function’s workload count and ordering to the expected IDs,
then run the required Rust validation gates.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c11ceb0b-f1b1-49e8-b4d0-25a12d543ac4

📥 Commits

Reviewing files that changed from the base of the PR and between 40a66ae and 9a9f9df.

⛔ Files ignored due to path filters (1)
  • docs/development/execution-resource-policy.md is excluded by !**/*.md, !**/docs/**
📒 Files selected for processing (4)
  • crates/graphforge-api/tests/m4_entry_baseline.rs
  • crates/graphforge-exec/src/algorithm_paths_max_flow.rs
  • scripts/ci/m4-entry-matrix.py
  • tests/contracts/m4-entry-matrix.json

Comment thread crates/graphforge-api/tests/m4_entry_baseline.rs Outdated
Comment thread crates/graphforge-api/tests/m4_entry_baseline.rs Outdated
@DecisionNerd
DecisionNerd force-pushed the cursor/545-serial-max-flow-disposition-c6a4 branch 2 times, most recently from 27d1385 to 98b5182 Compare August 12, 2026 05:16
Document Edmonds-Karp as serial, include paths-max-flow in the M4 short
matrix, and keep tip-main workload evidence intact.

Closes #545

Co-authored-by: Cursor <cursoragent@cursor.com>
@DecisionNerd
DecisionNerd force-pushed the cursor/545-serial-max-flow-disposition-c6a4 branch from 98b5182 to 1679ecc Compare August 12, 2026 05:26
@DecisionNerd
DecisionNerd merged commit 7347152 into main Aug 12, 2026
21 checks passed
@DecisionNerd
DecisionNerd deleted the cursor/545-serial-max-flow-disposition-c6a4 branch August 12, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core source code changes documentation Improvements or additions to documentation executor Changes to query executor testing Test coverage and testing infrastructure tooling Developer tooling and automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(exec): polish scale/performance for paths(by="max_flow")

1 participant