caldera icon indicating copy to clipboard operation
caldera copied to clipboard

Allow Requirements for Facts that are not used as Variables by the Ability Command

Open L015H4CK opened this issue 8 months ago • 1 comments

What problem are you trying to solve? Please describe.

At the moment, it is not possible to use requirements for a fact that is not used as a variable in the ability's command. This is due to the way the add_test_variants() function of the base_planning_svc is implemented.

I've had several cases where I wanted to enforce requirements on certain facts, that are not directly used in the ability's command. E.g., execute a system shutdown after finding a certain running process could be implemented by collecting names of running processes as facts and using these facts to enforce requirements for the shutdown ability. However, due to the add_test_variants() implementations, requirements are not enforced if there are no variables in the command.

Current workaround for me is to echo the used facts: echo #{process.name} && shutdown (pseudo-code)

The ideal solution: What should the feature should do?

The feature should include a rework of the add_test_variants() function of the base_planning_svc. Based on the rework, it should be possible to enforce requirements on facts that are not used as variable in the command.

What category of feature is this?

  • [ ] UI/UX
  • [ ] API
  • [x] Other

Additional context

  • [ ] Willing to submit a pull request to implement this feature? (I already tried to solve this but could not put as much time into this as I wanted since this is quite a big change that requires changes of how Caldera handles facts, requirements, and variables in commands...)

I look forward to any questions or feedback regarding this.

Best regards, Louis

L015H4CK avatar Jul 31 '25 07:07 L015H4CK

Hello,

This is a valuable feature request. I understand the goal is to allow requirement enforcement on facts not directly used as variables in a command, which requires reworking the add_test_variants() function.

I've reviewed the context and am aware that this is a significant change to the core planning logic. I am prepared to take on this task.

Please assign this issue to me. I'm ready to begin investigating and working on a solution.

Thank you!

maynkxx avatar Oct 15 '25 06:10 maynkxx