Skip to content

chore: Fail on empty action sets - #697

Draft
nicow-elia wants to merge 1 commit into
mainfrom
chore/fail-on-empty-actions
Draft

chore: Fail on empty action sets#697
nicow-elia wants to merge 1 commit into
mainfrom
chore/fail-on-empty-actions

Conversation

@nicow-elia

Copy link
Copy Markdown
Collaborator

Checklist

Please check if the PR fulfills these requirements:

  • PR Title follows conventional commit messages
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • All commits in this PR are DCO signed-off (see CONTRIBUTING.md)

Does this PR already have an issue describing the problem?

Fixes #

What is the new behavior (if this is a feature change)?

Does this PR introduce a breaking change?

  • Yes
  • No

Signed-off-by: Nico Westerbeck <Nico.Westerbeck@50hertz.com>
Copilot AI lite review requested due to automatic review settings August 27, 2026 11:47

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

This PR adds an early validation in the DC genetic algorithm setup path to fail fast when the loaded action set is empty, preventing the optimizer from starting in a non-actionable configuration.

Changes:

  • Add an explicit runtime check in algo_setup() that raises when n_actions == 0.
  • Surface a clearer failure mode earlier in initialization rather than proceeding into verification/optimization.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +434 to +435
if static_informations[0].dynamic_information.n_actions == 0:
raise ValueError("No actions present in the action set, can not optimize.")
Comment on lines +434 to +436
if static_informations[0].dynamic_information.n_actions == 0:
raise ValueError("No actions present in the action set, can not optimize.")

@nicow-elia
nicow-elia marked this pull request as draft August 27, 2026 14: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