Skip to content

Fix #240: [Model] BottleneckTravelingSalesman#727

Merged
isPANN merged 5 commits intomainfrom
issue-240
Mar 21, 2026
Merged

Fix #240: [Model] BottleneckTravelingSalesman#727
isPANN merged 5 commits intomainfrom
issue-240

Conversation

@GiggleLiu
Copy link
Copy Markdown
Contributor

Summary

Add the implementation plan for BottleneckTravelingSalesman from issue #240.

Fixes #240

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 21, 2026

Codecov Report

❌ Patch coverage is 98.93048% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.59%. Comparing base (51e49f5) to head (7ffed3c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/models/graph/bottleneck_traveling_salesman.rs 97.87% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #727      +/-   ##
==========================================
+ Coverage   97.58%   97.59%   +0.01%     
==========================================
  Files         411      413       +2     
  Lines       51196    51383     +187     
==========================================
+ Hits        49958    50149     +191     
+ Misses       1238     1234       -4     

☔ 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
Copy link
Copy Markdown
Contributor Author

Implementation Summary

Changes

  • Added the new fixed graph model BottleneckTravelingSalesman with brute-force evaluation based on Hamiltonian-cycle edge subsets and bottleneck objective minimization.
  • Added dedicated unit tests for construction, evaluation, solver behavior, serialization, and the paper example.
  • Registered the model across graph/model/prelude exports and the graph canonical example chain.
  • Wired pred create support for explicit instances, random instances, and --example in the CLI.
  • Added a new paper entry and bibliography support for the Bottleneck Traveling Salesman problem, including the K5 canonical example and the BTSP-versus-TSP contrast.

Deviations from Plan

  • The first Batch 1 implementation pass drifted on two test details (it used a smaller construction fixture and missed the disconnected-subtour invalid case). The spec-review gate caught that, and the tests were corrected before final verification.
  • The quality-review subagent did not return a usable verdict in time, so I replaced that gate with a manual code-quality review plus full verification (make paper, make test, make clippy).

Open Questions

  • None.

@GiggleLiu
Copy link
Copy Markdown
Contributor Author

Agentic Review Report

Structural Check

Structural Review: model BottleneckTravelingSalesman

Structural Completeness

# Check Status
1 Model file exists PASS
2 inventory::submit! present PASS
3 #[derive(...Serialize, Deserialize)] on struct PASS
4 Problem trait impl PASS
5 OptimizationProblem impl PASS
6 #[cfg(test)] + #[path = ...] test link PASS
7 Test file exists PASS
8 Test file has >= 3 test functions PASS — 7 tests
9 Registered in src/models/graph/mod.rs PASS
10 Re-exported in src/models/mod.rs PASS
11 declare_variants! entry exists PASS
12 CLI name resolution support PASS — canonical-name lookup is registry-backed, so no manual alias entry is needed
13 CLI create support PASS
14 Canonical model example registered PASS
15 Paper display-name entry PASS
16 Paper problem-def block PASS
17 No blacklisted generated files committed PASS

Build Status

  • make test: PASS
  • make clippy: PASS
  • make paper: PASS (extra verification beyond the skill minimum)

Semantic Review

  • evaluate() correctness: OK — it rejects wrong-length or non-Hamiltonian edge selections and computes the bottleneck as the maximum selected edge weight.
  • dims() correctness: OK — vec![2; num_edges] matches the binary edge-selection encoding.
  • Size getter consistency: ISSUE — the model defines num_vertices()/num_edges() in src/models/graph/bottleneck_traveling_salesman.rs:74 but never declares them to the registry for an isolated problem, so pred show/pred inspect expose no size fields for this model.
  • Weight handling: OK — weights are managed with inherent methods and the model stays fixed to SimpleGraph + i32, matching the issue.
  • Paper entry: OK — make paper completed, so the new Typst block is syntactically valid and wired to the example DB.

Issue Compliance (if linked issue found)

# Check Status
1 Problem name matches issue OK
2 Mathematical definition matches OK
3 Problem type (opt/sat) matches OK — optimization, as updated in the linked issue changelog
4 Type parameters match OK — none
5 Configuration space matches OK — one binary variable per edge
6 Feasibility check matches OK — selected edges must form a Hamiltonian cycle
7 Objective function matches OK — minimize the maximum selected edge weight
8 Complexity matches OK — num_vertices^2 * 2^num_vertices

Summary

  • 17/17 structural checks passed
  • 8/8 issue compliance checks passed
  • ISSUE: src/models/graph/bottleneck_traveling_salesman.rs:74 defines the expected size getters, but the model never registers explicit size fields, so CLI/MCP metadata for this isolated problem is incomplete (pred inspect reports "size_fields": []).
  • Note: the implementation packet reported Whitelist: fail; after manual diff review I did not identify a separate blocker beyond the metadata gap above.

Quality Check

Quality Review

Design Principles

  • DRY: OK — the new model mirrors TravelingSalesman intentionally and keeps the duplicated surface area limited to model-specific wiring.
  • KISS: OK — the implementation is straightforward: reuse the shared Hamiltonian-cycle checker, then swap the objective from sum to max.
  • HC/LC: OK — model logic, CLI integration, tests, and paper entry stay separated by module responsibility.

HCI (if CLI/MCP changed)

  • Error messages: OK — pred create BottleneckTravelingSalesman --graph 0-1,1-2 --edge-weights 1 returns Error: Expected 2 edge weight values but got 1.
  • Discoverability: OK — the model appears in pred list, pred show BottleneckTravelingSalesman, and pred create --help.
  • Consistency: OK — CLI help and create handling match the existing edge-weighted graph-model pattern in problemreductions-cli/src/commands/create.rs:1448 and problemreductions-cli/src/cli.rs:217.
  • Least surprise: ISSUE — unlike analogous models such as TravelingSalesman, the new model shows no Size fields section in pred show and no size-field metadata in pred inspect, because the model file only registers schema metadata and omits explicit size-field registration.
  • Feedback: OK — successful create/solve flows report the instance path and solution cleanly.

Test Quality

  • Naive test detection: ISSUE
    • src/unit_tests/models/graph/bottleneck_traveling_salesman.rs:28 covers construction, evaluation, brute-force solving, serialization, and the paper example, but it never checks declared size fields or pred inspect metadata. That gap allowed the missing registry wiring for num_vertices/num_edges to slip through even though the linked issue explicitly called out size fields.

Issues

Critical (Must Fix)

None.

Important (Should Fix)

Minor (Nice to Have)

None.

Summary

  • ISSUE: missing explicit size-field registration makes CLI/MCP metadata for the new model incomplete.
  • ISSUE: tests do not cover the size-field metadata path, so the regression is currently invisible to the suite.

Agentic Feature Tests

Agentic Feature Tests

  • Feature: BottleneckTravelingSalesman
  • Role: downstream CLI user trying to discover, create, inspect, and solve the new model from docs/help alone.
  • Use case: find the new model in the catalog, inspect its shape, generate the canonical example, and solve it with the documented CLI workflow.
  • Verdict: partial — core functionality works, but metadata discoverability is incomplete.
Check Result Notes
pred list PASS BottleneckTravelingSalesman appears with complexity O(num_vertices^2 * 2^num_vertices)
pred show BottleneckTravelingSalesman PASS with issue Model appears and fields are correct, but no Size fields section is shown
pred create --example BottleneckTravelingSalesman PASS Canonical example emits a valid JSON instance
pred inspect <example> ISSUE Confirmed: JSON reports "size_fields": []
pred solve <example> --solver brute-force PASS Returns Valid(4) with the expected optimal edge-selection config
`pred create BottleneckTravelingSalesman --graph ... --edge-weights ... pred solve - --solver brute-force` PASS
Invalid-input feedback PASS Wrong edge-weight count yields a concrete actionable error

What I tried

  • pred list | rg BottleneckTravelingSalesman
  • pred show BottleneckTravelingSalesman
  • pred create --example BottleneckTravelingSalesman -o <tmp>/btsp.json
  • pred inspect <tmp>/btsp.json
  • pred solve <tmp>/btsp.json --solver brute-force
  • pred create BottleneckTravelingSalesman --graph ... --edge-weights ... | pred solve - --solver brute-force

Confirmed findings

  • confirmed / important: pred inspect on the canonical example reports "size_fields": [], and pred show BottleneckTravelingSalesman omits the Size fields section entirely. This is reproducible in the current PR worktree and makes the new model less self-describing than analogous graph models such as TravelingSalesman.

Not reproducible in current worktree

  • None.

Recommended fix

  • Register num_vertices and num_edges explicitly for BottleneckTravelingSalesman, then add a regression test that exercises either declared_size_fields() or the pred inspect output.

Generated by review-pipeline

@GiggleLiu
Copy link
Copy Markdown
Contributor Author

Agentic Review Report

Structural Check

Structural Review: model BottleneckTravelingSalesman

Structural Completeness

# Check Status
1 Model file exists PASS — src/models/graph/bottleneck_traveling_salesman.rs:1
2 inventory::submit! present PASS — src/models/graph/bottleneck_traveling_salesman.rs:12
3 Serialize/Deserialize derive on struct PASS — src/models/graph/bottleneck_traveling_salesman.rs:28
4 Problem trait impl PASS — src/models/graph/bottleneck_traveling_salesman.rs:99
5 OptimizationProblem impl PASS — src/models/graph/bottleneck_traveling_salesman.rs:132
6 #[cfg(test)] + linked unit test PASS — src/models/graph/bottleneck_traveling_salesman.rs:171
7 Dedicated unit-test file exists PASS — src/unit_tests/models/graph/bottleneck_traveling_salesman.rs:1
8 Test file has >= 3 test functions PASS — 7 tests in src/unit_tests/models/graph/bottleneck_traveling_salesman.rs:28
9 Registered in src/models/graph/mod.rs PASS — src/models/graph/mod.rs:51, src/models/graph/mod.rs:95
10 Re-exported in src/models/mod.rs PASS — src/models/mod.rs:20
11 declare_variants! entry exists PASS — src/models/graph/bottleneck_traveling_salesman.rs:167
12 CLI name resolution support PASS — registry-driven alias/name resolution in problemreductions-cli/src/problem_name.rs:16
13 CLI create support PASS — problemreductions-cli/src/commands/create.rs:1448, problemreductions-cli/src/commands/create.rs:1458
14 Canonical model example registered PASS — src/models/graph/mod.rs:167, aggregated by src/example_db/model_builders.rs:3
15 Paper display-name entry PASS — docs/paper/reductions.typ:84
16 Paper problem-def block PASS — docs/paper/reductions.typ:1209
17 File whitelist FAIL — changed files outside model whitelist: problemreductions-cli/src/cli.rs, problemreductions-cli/src/commands/create.rs, src/lib.rs
18 Blacklisted autogenerated files not committed PASS — none of docs/src/reductions/reduction_graph.json, docs/src/reductions/problem_schemas.json, src/example_db/fixtures/examples.json, or docs/paper/data/examples.json appear in the diff

Build Status

  • make test: PASS
  • make clippy: PASS

Semantic Review

  • evaluate(): OK — checks config length, reuses the shared Hamiltonian-cycle validator, and returns the correct bottleneck objective (src/models/graph/bottleneck_traveling_salesman.rs:111). I independently enumerated the 12 Hamiltonian tours of the K5 paper/example instance and confirmed the unique optimum has bottleneck 4.
  • dims(): OK — one binary variable per edge via vec![2; num_edges] (src/models/graph/bottleneck_traveling_salesman.rs:107).
  • Size getter consistency: OK — num_vertices() / num_edges() exist and match the declared complexity string "num_vertices^2 * 2^num_vertices" (src/models/graph/bottleneck_traveling_salesman.rs:74, src/models/graph/bottleneck_traveling_salesman.rs:79, src/models/graph/bottleneck_traveling_salesman.rs:168).
  • Weight handling: OK — weights are exposed and updated through inherent methods (weights, set_weights, is_weighted) rather than extra traits (src/models/graph/bottleneck_traveling_salesman.rs:53).

Issue Compliance

# Check Status
1 Problem name matches issue OK — BottleneckTravelingSalesman
2 Mathematical definition matches OK — optimization over Hamiltonian cycles minimizing the maximum selected edge weight (src/models/graph/bottleneck_traveling_salesman.rs:111, docs/paper/reductions.typ:1210)
3 Problem type matches OK — OptimizationProblem with Direction::Minimize (src/models/graph/bottleneck_traveling_salesman.rs:132)
4 Type parameters match OK — fixed SimpleGraph + i32, matching the issue’s final schema direction
5 Configuration space matches OK — one binary variable per edge (src/models/graph/bottleneck_traveling_salesman.rs:107)
6 Feasibility check matches OK — Hamiltonian cycle via degree/connectivity validation from the shared TSP helper (src/models/graph/bottleneck_traveling_salesman.rs:116)
7 Objective function matches OK — max over selected edge weights (src/models/graph/bottleneck_traveling_salesman.rs:121)
8 Complexity matches OK — "num_vertices^2 * 2^num_vertices" (src/models/graph/bottleneck_traveling_salesman.rs:168)

Summary

  • 17/18 structural checks passed
  • 8/8 issue compliance checks passed
  • FAIL — files outside expected model whitelist: problemreductions-cli/src/cli.rs, problemreductions-cli/src/commands/create.rs, src/lib.rs

Quality Check

Quality Review

Design Principles

  • DRY: OK — the new model reuses traveling_salesman::is_hamiltonian_cycle instead of duplicating Hamiltonian-cycle feasibility logic (src/models/graph/bottleneck_traveling_salesman.rs:95).
  • KISS: OK — the implementation mirrors TravelingSalesman and changes only the objective aggregation from sum to max, which is the minimal model-specific delta (src/models/graph/bottleneck_traveling_salesman.rs:121).
  • HC/LC: OK — the new file stays focused on one model; the only cross-module dependency is the shared Hamiltonian-cycle helper, which is appropriate (src/models/graph/bottleneck_traveling_salesman.rs:95).

HCI (if CLI/MCP changed)

  • Error messages: OK — explicit create-path usage errors remain actionable (problemreductions-cli/src/commands/create.rs:1450).
  • Discoverability: ISSUE — pred create BottleneckTravelingSalesman prints an example using a 4-vertex path graph, which has no Hamiltonian cycle, so the most obvious “copy the example then solve it” user flow fails immediately (problemreductions-cli/src/commands/create.rs:539).
  • Consistency: OK — the model is listed consistently across pred list, pred show, explicit create, random create, and help text (problemreductions-cli/src/cli.rs:217, problemreductions-cli/src/commands/create.rs:652, problemreductions-cli/src/commands/create.rs:5079).
  • Least surprise: ISSUE — following the help example through pred solve yields Error: No solution found, which makes the newly added model look broken even though the canonical example works (problemreductions-cli/src/commands/create.rs:539).
  • Feedback: OK — pred show, pred create --example BottleneckTravelingSalesman, pred solve, and pred evaluate all return sensible outputs in the current PR worktree.

Test Quality

  • Naive test detection: ISSUE
    • The PR adds new CLI/help/create branches in problemreductions-cli/src/commands/create.rs:539, problemreductions-cli/src/commands/create.rs:1448, and problemreductions-cli/src/commands/create.rs:5079, but the only added automated coverage is the model unit-test file src/unit_tests/models/graph/bottleneck_traveling_salesman.rs:28. There is no CLI/integration test exercising those user-facing paths, and the infeasible help example above slipped through as a result.

Issues

Critical (Must Fix)

  • None.

Important (Should Fix)

  • pred create BottleneckTravelingSalesman advertises --graph 0-1,1-2,2-3 --edge-weights 1,1,1 as its example instance (problemreductions-cli/src/commands/create.rs:539), but that graph has no Hamiltonian cycle. Reproduced by piping the example into pred solve, which returns Error: No solution found.
  • No automated CLI/integration test covers the new create/help/example wiring for BottleneckTravelingSalesman (problemreductions-cli/src/commands/create.rs:539, problemreductions-cli/src/commands/create.rs:1448, problemreductions-cli/src/commands/create.rs:5079), so the user-facing regression above is not caught by the added test suite.

Minor (Nice to Have)

  • None.

Summary

  • ISSUE — misleading help/example flow for pred create BottleneckTravelingSalesman; the documented sample instance is infeasible and immediately fails under pred solve.
  • ISSUE — new CLI surface area has no automated coverage, despite multiple new branches in problemreductions-cli/src/commands/create.rs.

Agentic Feature Tests

Feature Test Report: BottleneckTravelingSalesman

Project type: CLI + Rust library
Feature tested: New model BottleneckTravelingSalesman
Use Case: Downstream user discovers the new model from the catalog, inspects it, creates a canonical example, and solves/evaluates it from the CLI.
Expected Outcome: The model is discoverable and the documented/example flows produce a valid instance and a valid optimum.
Verdict: fail
Critical Issues: 0

Test Results

  • pred list: PASS — BottleneckTravelingSalesman appears in the catalog with complexity O(num_vertices^2 * 2^num_vertices).
  • pred show BottleneckTravelingSalesman: PASS — description, fields, and complexity render correctly.
  • pred create --example BottleneckTravelingSalesman -o /tmp/btsp-example.json: PASS — emits the canonical K5 instance with type: "BottleneckTravelingSalesman" and variant: {}.
  • pred solve /tmp/btsp-example.json --solver brute-force: PASS — returns solution [0,1,1,0,1,0,1,0,0,1] with evaluation: "Valid(4)".
  • pred evaluate /tmp/btsp-example.json --config 0,1,1,0,1,0,1,0,0,1: PASS — returns result: "Valid(4)".
  • pred create BottleneckTravelingSalesman (help/example discovery): ISSUE — advertises pred create BottleneckTravelingSalesman --graph 0-1,1-2,2-3 --edge-weights 1,1,1 as the example command.
  • pred create BottleneckTravelingSalesman --graph 0-1,1-2,2-3 --edge-weights 1,1,1 | pred solve - --solver brute-force: CONFIRMED ISSUE — returns Error: No solution found.

Findings

  • Confirmed / Important — the help/example flow for the new model is misleading. The canonical example path works, but the problem-specific example shown by pred create BottleneckTravelingSalesman is infeasible and makes the first obvious user journey fail (problemreductions-cli/src/commands/create.rs:539).

Summary

  • The catalog/show/canonical-example/solve flow works correctly in the current PR worktree.
  • The ad hoc help-example flow does not: the advertised sample instance has no Hamiltonian tour, so a downstream user following the displayed example will hit Error: No solution found.

Generated by review-pipeline

@GiggleLiu
Copy link
Copy Markdown
Contributor Author

Agentic Review Report

Structural Check

Structural Review: model BottleneckTravelingSalesman

Structural Completeness

# Check Status
1 Model file exists PASS — src/models/graph/bottleneck_traveling_salesman.rs
2 inventory::submit! present PASS
3 #[derive(...Serialize, Deserialize)] on struct PASS
4 Problem trait impl PASS
5 OptimizationProblem impl PASS
6 #[cfg(test)] + #[path = "..."] test link PASS
7 Test file exists PASS — src/unit_tests/models/graph/bottleneck_traveling_salesman.rs
8 Test file has >= 3 test functions PASS — 7 test functions
9 Registered in src/models/graph/mod.rs PASS
10 Re-exported in src/models/mod.rs PASS
11 declare_variants! entry exists PASS
12 CLI problem-name resolution works PASS — generic registry-based resolution in problemreductions-cli/src/problem_name.rs is sufficient; pred show BottleneckTravelingSalesman resolves correctly
13 CLI create support PASS
14 Canonical model example registered PASS
15 Paper display-name entry PASS
16 Paper problem-def block PASS
17 No blacklisted auto-generated files committed PASS
18 Changed files stay within model-PR whitelist FAIL — packet reported Whitelist: fail; extra touched files outside the model whitelist are problemreductions-cli/src/cli.rs, problemreductions-cli/src/commands/create.rs, and src/lib.rs

Build Status

  • make test: PASS
  • make clippy: PASS

Semantic Review

  • evaluate() correctness: OK — reuses the existing Hamiltonian-cycle validator and returns the maximum selected edge weight for feasible tours.
  • dims() correctness: OK — binary edge encoding via vec![2; num_edges] matches the issue and implementation.
  • Size getter consistency: OK — num_vertices and num_edges match the complexity string num_vertices^2 * 2^num_vertices.
  • Weight handling: OK — weights are managed through inherent getters/setters rather than trait machinery.

Issue Compliance

# Check Status
1 Problem name matches issue OK
2 Mathematical definition matches OK
3 Problem type (optimization) matches issue updates OK
4 Type parameters / schema match linked issue updates OK — fixed SimpleGraph + i32 schema aligns with the issue's final fix-issue notes
5 Configuration space matches OK — one binary variable per edge
6 Feasibility check matches OK — valid configurations are Hamiltonian cycles
7 Objective function matches OK — minimizes the maximum selected edge weight
8 Complexity matches OK

Summary

  • 17/18 structural checks passed
  • 8/8 issue compliance checks passed
  • FAIL — deterministic whitelist check flagged extra scope in problemreductions-cli/src/cli.rs, problemreductions-cli/src/commands/create.rs, and src/lib.rs

Quality Check

Quality Review

Design Principles

  • DRY: OK — the new model mirrors TravelingSalesman where expected, but the changed objective and fixed schema justify a separate implementation.
  • KISS: OK — the implementation stays straightforward by reusing the existing Hamiltonian-cycle predicate and swapping only the objective aggregator.
  • HC/LC: OK — model logic, CLI wiring, and paper/example updates remain separated by layer.

HCI (CLI changed)

  • Error messages: OK — the agentic test confirmed the default pred solve failure path suggests --solver brute-force.
  • Discoverability: OK — pred list, pred show, and pred create --example expose the new model without extra handholding.
  • Consistency: OK — CLI edge-weight handling matches neighboring graph problems such as TravelingSalesman, MaxCut, and MaximumMatching.
  • Least surprise: OK — the fixed empty variant for BottleneckTravelingSalesman is reflected consistently in catalog and creation flows.
  • Feedback: OK — create/solve flows report enough information to understand what happened.

Test Quality

  • Naive test detection: OK
    • The added tests cover creation/getters, valid and invalid evaluation, disconnected subtours, optimization direction, brute-force optimum, serialization, and the paper example.

Issues

Critical (Must Fix)

None.

Important (Should Fix)

None.

Minor (Nice to Have)

  • There is still no BottleneckTravelingSalesman-specific quickstart example in README.md or docs/src/cli.md, although the generic CLI discovery flow is sufficient in the current worktree.

Summary

  • No correctness, design, or test-quality regressions were reproduced in the current worktree.
  • Minor: the feature is discoverable through generic CLI flows, but not yet called out explicitly in the top-level docs.

Agentic Feature Tests

  • Verdict: PASS
  • Feature: BottleneckTravelingSalesman
  • Role: downstream CLI user building from source and trying the new model from docs/self-discovery
  • Use case: discover the new model, create its canonical example, and solve it locally
  • Expected outcome: the model should appear in the catalog, explain its schema clearly, create a valid example instance, and solve successfully with the documented brute-force fallback
Check Result Notes
Discoverability via pred list PASS BottleneckTravelingSalesman appears in the catalog with complexity O(num_vertices^2 * 2^num_vertices)
Problem inspection via pred show BottleneckTravelingSalesman PASS Shows description, complexity, and fields graph / edge_weights correctly
Example creation via pred create --example BottleneckTravelingSalesman PASS Wrote a valid problem JSON with the expected K5 example instance
Solving example via pred solve <file> --solver brute-force PASS Returned evaluation: "Valid(4)" with a 10-bit edge-selection solution
stdin pipeline flow PASS `pred create --example BottleneckTravelingSalesman
Problem-specific help PASS pred create BottleneckTravelingSalesman prints a clear usage example with --graph and --edge-weights
Default-solver UX PASS pred solve <file> fails as expected, but the error is actionable: Try --solver brute-force
  • What I tried:

    • make cli
    • pred list | rg BottleneckTravelingSalesman
    • pred show BottleneckTravelingSalesman
    • pred create --example BottleneckTravelingSalesman -o <tmp>/btsp.json
    • pred solve <tmp>/btsp.json --solver brute-force
    • pred create --example BottleneckTravelingSalesman | pred solve - --solver brute-force
    • pred create BottleneckTravelingSalesman
    • pred solve <tmp>/btsp.json
  • Expected vs Actual: matched. The feature was discoverable from the existing CLI/documentation flow, the canonical example materialized correctly, and solving the example produced the expected bottleneck value 4.

  • Blocked steps: none

  • Confirmed issues: none

  • Not reproducible in current worktree: none

  • Friction points / doc suggestions:

    • Minor: there is no BottleneckTravelingSalesman-specific quickstart example in README.md or docs/src/cli.md; the feature is still usable via generic pred list / pred show / pred create --example flows.
    • Positive: the default pred solve failure path is well handled because it explicitly tells the user to retry with --solver brute-force.

Generated by review-pipeline

@GiggleLiu
Copy link
Copy Markdown
Contributor Author

Addendum after the main review comment:

  • Important: the problem-specific pred create BottleneckTravelingSalesman help example is currently misleading. In problemreductions-cli/src/commands/create.rs, the advertised sample is --graph 0-1,1-2,2-3 --edge-weights 1,1,1, but that 4-vertex path cannot contain a Hamiltonian cycle, so it is an infeasible BTSP instance by construction. This is a user-facing dead end even though pred create --example BottleneckTravelingSalesman works correctly.
  • Important: the new model file defines num_vertices() and num_edges() but does not register a ProblemSizeFieldEntry. That leaves registry/inspect-style size-field metadata empty for BottleneckTravelingSalesman, despite the linked issue and paper entry both treating those as the canonical size fields.

These are additional review findings; the rest of the previously-posted review stands.

@isPANN isPANN mentioned this pull request Mar 21, 2026
3 tasks
# Conflicts:
#	problemreductions-cli/src/commands/create.rs
#	src/lib.rs
#	src/models/mod.rs
@isPANN isPANN merged commit 62dd9f4 into main Mar 21, 2026
3 checks passed
@GiggleLiu GiggleLiu deleted the issue-240 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.

[Model] BottleneckTravelingSalesman

2 participants