Skip to content

Conversation

@kwesiRutledge
Copy link
Contributor

Summary

  • Big, breaking change: Replaced Solution struct with the Solution interface. This should allow anyone to define their own form of Solution interface.
  • Refactored Solution and SolutionStatus out of the problem package.
    • They will maintain some of the same functionality.

Notes

Also, we renamed the SolutionStatus values to be a bit shorter.

@kwesiRutledge kwesiRutledge self-assigned this Oct 4, 2025
@codecov
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 74.54545% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.33%. Comparing base (0214315) to head (056ed7c).
⚠️ Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
solution/solution.go 50.00% 5 Missing and 1 partial ⚠️
solution/dummy_solution.go 33.33% 4 Missing ⚠️
solution/status/status.go 89.18% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #17      +/-   ##
==========================================
+ Coverage   86.76%   87.33%   +0.56%     
==========================================
  Files          27       35       +8     
  Lines        3687     4136     +449     
==========================================
+ Hits         3199     3612     +413     
- Misses        440      470      +30     
- Partials       48       54       +6     

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

@kwesiRutledge kwesiRutledge requested a review from Copilot October 4, 2025 17:39
Copy link
Contributor

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

This PR refactors the solution handling by replacing the concrete Solution struct with a Solution interface, moving solution-related code from the problem package to a new solution package. This enables more flexible implementations of solutions while maintaining backward compatibility through helper functions.

Key changes:

  • Replaced concrete Solution struct with Solution interface to allow custom implementations
  • Created new solution package with interface definition and helper functions
  • Moved and simplified status constants from OptimizationStatus_* to shorter names like NODE_LIMIT

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
testing/solution/solution_test.go Updated tests to use new solution interface and helper functions
solution/status/status.go New file defining SolutionStatus type with shortened constant names
solution/solution.go New interface definition with helper functions for value extraction
solution/dummy_solution.go Implementation of Solution interface for testing purposes
problem/solution.go Removed old Solution struct and status definitions

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@kwesiRutledge kwesiRutledge merged commit 9aba8d3 into main Oct 4, 2025
4 of 5 checks passed
@kwesiRutledge kwesiRutledge deleted the kr/feature/solution2 branch October 4, 2025 17:43
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