balena-io-modules / mahler

A automated task composer and HTN based planner for building autonomous system agents.
Apache License 2.0
7 stars 1 forks source link

Pass runtime metadata to tasks #73

Open pipex opened 1 month ago

pipex commented 1 month ago

When re-planning due to a failure, metadata from previous calls to a task (result from the previous calls, number of tries) should be included in the context passed to the task functions. This would allow tasks to use this additional information as part of the condition allowing the planner to chose different paths when a failure happen.

For instance, a task that performs a download to a resource could check if a previous call to the task with the same resource and mirror failed, to allow a separate task that switches mirrors to be selected before as part of the new plan