Provisioning script executed twice

I made some test on my development server with simple preset and register a simulator.
My surprise is that if there are at least one line of setting the value of a parameter or tag are executed, the provisioning script will be executed twice.
But it will only executed once if there are no value changed.

Here is my provisioning scripts :

const now =;

let myboot = declare(“Events.1_BOOT”, {value: 1});
if (myboot.value !== undefined) {
log(“1 BOOT”);

//let SN=declare(“DeviceID.ID”,{value: 1}).value;
let SN=declare(“DeviceID.SerialNumber”,{value: 1}).value;

declare(“Tags.Provisioned”, null, {value: true});
declare(“Tags.Provisioned2”, null, {value: true});
declare(“Tags.Provisioned3”, null, {value: true});

If the device already has all 3 tags, the provisioning only run once. But if there’s at least one Tag not there, the provisioning will run twice for the same event.

Here is my log says if It doesn’t have all those tags

2021-12-14T11:16:03.869Z [INFO] 202BC1-BM632w-000000: ACS request; acsRequestId=“17db8a818900000” acsRequestName=“Reboot”
2021-12-14T11:16:03.885Z [INFO] 202BC1-BM632w-000000: Inform; cpeRequestId=“adtdwcjr” informEvent=“1 BOOT,M Reboot” informRetryCount=0
2021-12-14T11:16:03.893Z [INFO] 202BC1-BM632w-000000: Script: Provisioning
2021-12-14T11:16:03.893Z [INFO] 202BC1-BM632w-000000: Script: MN-DEBUG STARTED
2021-12-14T11:16:03.894Z [INFO] 202BC1-BM632w-000000: Script: 1 BOOT
2021-12-14T11:16:03.899Z [INFO] 202BC1-BM632w-000000: Script: Provisioning
2021-12-14T11:16:03.899Z [INFO] 202BC1-BM632w-000000: Script: MN-DEBUG STARTED
2021-12-14T11:16:03.901Z [INFO] 202BC1-BM632w-000000: Script: 1 BOOT

The logs if it has all 3 tags :

2021-12-14T11:17:30.604Z [INFO] 202BC1-BM632w-000000: Inform; cpeRequestId=“qonhzeui” informEvent=“1 BOOT,M Reboot” informRetryCount=0
2021-12-14T11:17:30.606Z [INFO] 202BC1-BM632w-000000: Script: Provisioning
2021-12-14T11:17:30.606Z [INFO] 202BC1-BM632w-000000: Script: MN-DEBUG STARTED
2021-12-14T11:17:30.609Z [INFO] 202BC1-BM632w-000000: Script: 1 BOOT

1 tag is removed from device and, the log :

2021-12-14T11:18:43.935Z [INFO] 202BC1-BM632w-000000: Inform; cpeRequestId=“7o6d422s” informEvent=“1 BOOT,M Reboot” informRetryCount=0
2021-12-14T11:18:43.937Z [INFO] 202BC1-BM632w-000000: Script: Provisioning
2021-12-14T11:18:43.937Z [INFO] 202BC1-BM632w-000000: Script: MN-DEBUG STARTED
2021-12-14T11:18:43.940Z [INFO] 202BC1-BM632w-000000: Script: 1 BOOT
2021-12-14T11:18:43.945Z [INFO] 202BC1-BM632w-000000: Script: Provisioning
2021-12-14T11:18:43.945Z [INFO] 202BC1-BM632w-000000: Script: MN-DEBUG STARTED
2021-12-14T11:18:43.946Z [INFO] 202BC1-BM632w-000000: Script: 1 BOOT

Is this expected behaviors ? If yes, what is the reason behind that ?
In my opinion, the one preset must be only run once for the matching condition.

my preset configuration.

This is expected behavior as GenieACS enforces declarative definitions. This is explicitly stated on documentation: Provisions — GenieACS Documentation 1.2.8 documentation