feat: add solve requested flag to computed event#2345
Open
cristianonicolai wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a “solve” flag to the dataset-computed event so downstream consumers can distinguish compute-only vs compute+solve flows.
Changes:
- Extends
DatasetComputedEventwith asolveboolean and passes it fromSolverWorker. - Updates
SolverWorker.computeOutputs(...)signature and event emission to include thesolvevalue.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| model/worker/src/main/java/ai/timefold/solver/model/worker/impl/SolverWorker.java | Passes solve through compute/output flow and into emitted event. |
| model/definition/src/main/java/ai/timefold/solver/model/definition/internal/events/DatasetComputedEvent.java | Adds solve field + accessor methods to the event payload. |
Comment on lines
+362
to
+363
| sendEvent(datasetOutputsComputedEmitter, | ||
| new DatasetComputedEvent(metadata, solverModel, planName, tenantName, solve)); |
| } | ||
|
|
||
| computeOutputs(id); | ||
| computeOutputs(id, command.solve()); |
rsynek
requested changes
Jun 9, 2026
rsynek
left a comment
Collaborator
There was a problem hiding this comment.
Thanks!
A couple of suggestions from the tooling looks relevant; please have a look.
4b4a673 to
77d6554
Compare
77d6554 to
d078053
Compare
Comment on lines
+12
to
+18
| private final boolean solveRequested; | ||
|
|
||
| public DatasetComputedEvent(Metadata metadata, SolverModel solverModel, String planName, String tenantName, | ||
| boolean solveRequested) { | ||
| super(metadata, solverModel, null, planName, tenantName, null); | ||
| this.solveRequested = solveRequested; | ||
| } |
| } | ||
|
|
||
| private void computeOutputs(String id) { | ||
| private void computeOutputs(String id, boolean solveRequested) { |
Comment on lines
+362
to
+363
| sendEvent(datasetOutputsComputedEmitter, | ||
| new DatasetComputedEvent(metadata, solverModel, planName, tenantName, solveRequested)); |
d078053 to
c947761
Compare
c947761 to
1fc2570
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.