Skip to content

refactor: finish generalized aggregation migration#754

Merged
isPANN merged 21 commits intomainfrom
jg/aggregation
Mar 23, 2026
Merged

refactor: finish generalized aggregation migration#754
isPANN merged 21 commits intomainfrom
jg/aggregation

Conversation

@GiggleLiu
Copy link
Contributor

Summary

  • replace the old optimization/satisfaction split with aggregate-value solving and witness-aware brute-force workflows
  • add aggregate reduction execution, capability-aware path search, and CLI/ILP gating for witness-only flows
  • migrate models, tests, and canonical example data to Max/Min/Extremum values and remove the stale SolutionSize/Direction surface

Test Plan

  • make fmt-check
  • make test
  • make clippy
  • rg 'OptimizationProblem|SatisfactionProblem|SolutionSize|Direction|type Metric' src tests problemreductions-cli

GiggleLiu and others added 14 commits March 23, 2026 09:52
- Inline string literals in eprintln! format strings (print_literal)
- Use saturating_sub instead of manual arithmetic check
- Merge identical if-else branches in add_ilp_solver_hint

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adapt ConsecutiveOnesMatrixAugmentation, PartialFeedbackEdgeSet, and
GroupingBySwapping (merged from main) to the new Problem trait:
- type Metric -> type Value
- SatisfactionProblem -> WitnessProblem
- Remove unused Solver imports from tests

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

codecov bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 97.68041% with 54 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.50%. Comparing base (5441368) to head (2796743).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/rules/graph.rs 95.13% 9 Missing ⚠️
src/types.rs 95.05% 9 Missing ⚠️
src/solvers/ilp/solver.rs 88.73% 8 Missing ⚠️
src/rules/traits.rs 62.50% 6 Missing ⚠️
src/models/graph/integral_flow_bundles.rs 86.66% 4 Missing ⚠️
src/models/graph/subgraph_isomorphism.rs 86.95% 3 Missing ⚠️
src/models/graph/integral_flow_homologous_arcs.rs 93.10% 2 Missing ⚠️
src/models/graph/mixed_chinese_postman.rs 86.66% 2 Missing ⚠️
...ls/graph/undirected_two_commodity_integral_flow.rs 95.00% 2 Missing ⚠️
src/models/misc/ensemble_computation.rs 91.66% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #754      +/-   ##
==========================================
- Coverage   97.65%   97.50%   -0.16%     
==========================================
  Files         455      455              
  Lines       55706    56680     +974     
==========================================
+ Hits        54401    55265     +864     
- Misses       1305     1415     +110     

☔ 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.

GiggleLiu and others added 7 commits March 23, 2026 17:04
…riptions

Replace legacy Valid(...)/Invalid display strings with direct aggregate
wrapper names (Max, Min, Or, Sum). Update export_module_graph.rs to
reflect the new trait hierarchy. Add doc comment on EdgeCapabilities default.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add tests for:
- SolveViaReductionError Display/Error impls
- ILPSolver::solve_dyn, supports_direct_dyn, try_solve_via_reduction
- solve_via_reduction with nonexistent problem
- format_metric direct usage
- LoadedDynProblem backward-compat solve and Debug
- AggregateReductionChain single-step path rejection
- Aggregate chain with witness-only edge returns None

Re-export SolveViaReductionError from ilp module.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Three CLI tests still asserted stdout.contains("Valid") after the
aggregate formatting change. Update to match the new Max(...) output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Test job was running without --workspace, which could miss
CLI integration test failures that the Coverage job (which uses
--workspace) would catch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@isPANN isPANN merged commit b0f2cab into main Mar 23, 2026
5 checks passed
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.

2 participants