Snakemake version
v9.14.6
Describe the bug
When using a module (via the module: directive), which contains onstart / onsuccess directives, these directives will overwrite the onstart / onsuccess directives of the importing workflow. This is unexpected and potentially undesirable behavior as the code for a module may not be under the control of the importing workflow's developer. As far as I can tell the configuration seems to not indicate any expected behavior on this.
Logs
Not applicable.
Minimal example
A test has been added in https://github.com/TRON-Bioinformatics/snakemake/tree/check-module-onstart-onsuccess. Run it via pixi run -e dev pytest tests/tests.py::test_module_onstart_onsuccess.
Additional context