Skip to content

feat: add solve requested flag to computed event#2345

Open
cristianonicolai wants to merge 1 commit into
TimefoldAI:mainfrom
cristianonicolai:chore/compute_solve
Open

feat: add solve requested flag to computed event#2345
cristianonicolai wants to merge 1 commit into
TimefoldAI:mainfrom
cristianonicolai:chore/compute_solve

Conversation

@cristianonicolai

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings June 9, 2026 14:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 DatasetComputedEvent with a solve boolean and passes it from SolverWorker.
  • Updates SolverWorker.computeOutputs(...) signature and event emission to include the solve value.

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 thread model/worker/src/main/java/ai/timefold/solver/model/worker/impl/SolverWorker.java Outdated
Comment on lines +362 to +363
sendEvent(datasetOutputsComputedEmitter,
new DatasetComputedEvent(metadata, solverModel, planName, tenantName, solve));
}

computeOutputs(id);
computeOutputs(id, command.solve());

@rsynek rsynek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks!

A couple of suggestions from the tooling looks relevant; please have a look.

Comment thread model/worker/src/main/java/ai/timefold/solver/model/worker/impl/SolverWorker.java Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

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));
@cristianonicolai cristianonicolai changed the title add solve flag to computed event feat: add solve requested flag to computed event Jun 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

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.

3 participants