Skip to content

Fix #764: Delete GraphPartitioning, make it an alias of MaxCut#776

Merged
isPANN merged 1 commit intomainfrom
issue-764-delete-graphpartitioning
Mar 26, 2026
Merged

Fix #764: Delete GraphPartitioning, make it an alias of MaxCut#776
isPANN merged 1 commit intomainfrom
issue-764-delete-graphpartitioning

Conversation

@zazabap
Copy link
Copy Markdown
Collaborator

@zazabap zazabap commented Mar 26, 2026

Summary

  • Remove the GraphPartitioning model, its 3 reduction rules (→ MaxCut, → QUBO, → ILP), all associated tests, CLI create handlers, and paper entries
  • Register "GraphPartitioning" as an alias of MaxCut in the problem schema
  • Net deletion of ~1200 lines across 18 files

Fixes #764

GraphPartitioning (minimum bisection) was a standalone model with its own
reduction rules to MaxCut, QUBO, and ILP. Since it is conceptually an alias
of MaxCut, remove the dedicated model, all three reduction rules, their
tests, CLI create handlers, paper entries, and register "GraphPartitioning"
as an alias on the MaxCut schema entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.80%. Comparing base (66e9050) to head (c195a11).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #776      +/-   ##
==========================================
- Coverage   97.81%   97.80%   -0.02%     
==========================================
  Files         588      580       -8     
  Lines       66239    65742     -497     
==========================================
- Hits        64793    64297     -496     
+ Misses       1446     1445       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@zazabap
Copy link
Copy Markdown
Collaborator Author

zazabap commented Mar 26, 2026

Agentic Review Report

Structural Check

# Check Status
1 Model file removed (src/models/graph/graph_partitioning.rs) PASS
2 Model re-export removed from src/models/graph/mod.rs PASS
3 Model re-export removed from src/models/mod.rs PASS
4 Model re-export removed from src/lib.rs PASS
5 Model test file removed (src/unit_tests/models/graph/graph_partitioning.rs) PASS
6 Rule file removed: graphpartitioning_maxcut.rs PASS
7 Rule file removed: graphpartitioning_qubo.rs PASS
8 Rule file removed: graphpartitioning_ilp.rs PASS
9 Rule test files removed (3 files) PASS
10 Rules deregistered from src/rules/mod.rs PASS
11 Alias registered on MaxCut: aliases: &["GraphPartitioning"] PASS
12 CLI handlers cleaned (cli.rs, create.rs) PASS
13 Paper display-name entry removed PASS
14 Paper problem-def block removed PASS
15 Paper reduction-rule entries removed (3 rules) PASS
16 No generated JSON references (*.json) PASS
17 Analysis test allow-list cleaned PASS
18 No blacklisted auto-generated files committed PASS
19 No orphan Rust imports/references PASS
20 CLI docs cleaned (docs/src/cli.md) PASS

Build: make check passes (fmt + clippy + test all green).

Remaining references: Only in Python test fixture scripts (scripts/test_pipeline_*.py) and skill docs as example text — acceptable.

20/20 structural checks passed. 0 issues found.


Quality Check

DRY — Pass. No redundant references to GraphPartitioning remain in core Rust codebase.

KISS — Pass. Clean, minimal deletion. 18 files changed, 1197 lines removed. Single addition: alias registration on MaxCut's ProblemSchemaEntry.

Cohesion/Coupling — Pass. No dangling dependencies. All import chains, re-exports, and example-db wiring consistently updated. @garey1976 citation still used in 2 other places (not orphaned).

Test Quality — Pass. Analysis allow-list correctly updated (removed stale GraphPartitioning → QUBO dominated-rule entry). All 4 unit test files deleted. No integration tests referenced GraphPartitioning.

HCI — Pass. CLI help text updated. Alias resolution works: pred show GraphPartitioning resolves to MaxCut, pred create GraphPartitioning resolves to MaxCut's create handler.

0 issues found.


Agentic Feature Tests

# Command Expected Actual Status
1 pred list GraphPartitioning not standalone; shown as MaxCut alias MaxCut row shows "GraphPartitioning" in Aliases column; no standalone row PASS
2 pred show MaxCut Displays MaxCut info Shows MaxCut fields, complexity, reductions PASS
3 pred show GraphPartitioning Resolves to MaxCut Outputs identical MaxCut info PASS
4 pred create MaxCut --graph 0-1,1-2,2-3,0-3 --edge-weights 1,1,1,1 -o /tmp/maxcut_test.json Creates JSON instance Wrote file successfully PASS
5 pred solve /tmp/maxcut_test.json Returns optimal solution Returns Max(4) with solution [1,0,1,0] PASS
6 pred create GraphPartitioning --graph 0-1,1-2,2-3,0-3 Works via alias or clear error Creates MaxCut instance (alias resolves transparently) PASS
7 pred path MaxCut QUBO Valid reduction path exists 3-step path: MaxCut → SpinGlass/i32 → SpinGlass/f64 → QUBO/f64 PASS

7/7 tests pass. 0 issues found.


Generated by review-pipeline

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes the GraphPartitioning model and its associated reductions/tests/docs, while preserving the legacy name as a catalog alias that resolves to MaxCut for CLI/spec parsing and registry lookup.

Changes:

  • Deleted the GraphPartitioning model implementation and all associated reduction rules/tests (to MaxCut/QUBO/ILP) and example-db wiring.
  • Registered "GraphPartitioning" as an alias of MaxCut in the problem schema.
  • Removed GraphPartitioning mentions from CLI creation/help output and from the paper/docs.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/unit_tests/rules/graphpartitioning_qubo.rs Removes unit tests for the GraphPartitioning → QUBO rule.
src/unit_tests/rules/graphpartitioning_maxcut.rs Removes unit tests for the GraphPartitioning → MaxCut rule.
src/unit_tests/rules/graphpartitioning_ilp.rs Removes unit tests for the GraphPartitioning → ILP rule.
src/unit_tests/rules/analysis.rs Updates dominated-rules test expectations to drop GraphPartitioning-related entries.
src/unit_tests/models/graph/graph_partitioning.rs Removes model-level tests for GraphPartitioning.
src/rules/mod.rs Unregisters GraphPartitioning reduction modules and example-db specs from the rules module list.
src/rules/graphpartitioning_qubo.rs Deletes the GraphPartitioning → QUBO reduction rule implementation and its example-db spec.
src/rules/graphpartitioning_maxcut.rs Deletes the GraphPartitioning → MaxCut reduction rule implementation and its example-db spec.
src/rules/graphpartitioning_ilp.rs Deletes the GraphPartitioning → ILP reduction rule implementation and its example-db spec.
src/models/mod.rs Stops re-exporting GraphPartitioning from the top-level models module.
src/models/graph/mod.rs Removes the GraphPartitioning module and re-export; drops its example-db model spec registration.
src/models/graph/max_cut.rs Adds "GraphPartitioning" as an alias to the MaxCut schema entry.
src/models/graph/graph_partitioning.rs Deletes the GraphPartitioning model implementation, schema entry, variants, and example-db spec.
src/lib.rs Removes GraphPartitioning from the public prelude re-exports.
problemreductions-cli/src/commands/create.rs Removes GraphPartitioning-specific create/random/example argument handling.
problemreductions-cli/src/cli.rs Removes GraphPartitioning from the CLI “Flags by problem type” help listing.
docs/src/cli.md Removes GraphPartitioning from the documented pred list output snippet.
docs/paper/reductions.typ Removes GraphPartitioning problem and reduction content from the paper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@isPANN isPANN merged commit 093c595 into main Mar 26, 2026
9 checks passed
@GiggleLiu GiggleLiu deleted the issue-764-delete-graphpartitioning branch April 12, 2026 00: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.

Delete GraphPartitioning

3 participants