From c2638f252fb57379083c163c93b4887923e5f6aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 26 Aug 2026 10:52:58 +0000 Subject: [PATCH 1/2] [create-pull-request] automated change (cherry picked from commit 4b6e2d660deae36deb6bb2892dbdef32c42a6c47) --- src/cfengine_cli/syntax-description.json | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/cfengine_cli/syntax-description.json b/src/cfengine_cli/syntax-description.json index c4a6ef6..8c98157 100644 --- a/src/cfengine_cli/syntax-description.json +++ b/src/cfengine_cli/syntax-description.json @@ -525,6 +525,13 @@ "type": "option", "visibility": "body" }, + "silence": { + "attribute": "silence", + "range": "content|add|remove|owner|group|perms|device|mtime|inode|stats|all", + "status": "normal", + "type": "slist", + "visibility": "body" + }, "update_hashes": { "attribute": "update_hashes", "range": "true,false,yes,no,on,off", @@ -3357,6 +3364,17 @@ ], "status": "normal" }, + "reactor": { + "promiseTypes": [ + "events", + "classes", + "defaults", + "meta", + "reports", + "vars" + ], + "status": "normal" + }, "server": { "promiseTypes": [ "access", @@ -6976,6 +6994,17 @@ "status": "normal", "variadic": false }, + "strtotime": { + "cached": false, + "category": "data", + "collecting": false, + "parameters": [ + { "description": "String to parse", "range": ".*", "type": "string" } + ], + "returnType": "int", + "status": "normal", + "variadic": false + }, "sublist": { "cached": false, "category": "data", From ea2f86f1b4a1b18a5188129ef106e29cf6f78d7f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 26 Aug 2026 14:38:18 +0000 Subject: [PATCH 2/2] Updated lint tests for new syntax elements Updated the expected output of the bundle type lint test to include the new reactor bundle type, and added a lint test exercising the reactor bundle type, the strtotime() function, and the silence attribute in body changes. Changelog: none --- tests/lint/004_block_type.expected.txt | 2 +- tests/lint/021_reactor_strtotime_silence.cf | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 tests/lint/021_reactor_strtotime_silence.cf diff --git a/tests/lint/004_block_type.expected.txt b/tests/lint/004_block_type.expected.txt index f94789d..c7cf522 100644 --- a/tests/lint/004_block_type.expected.txt +++ b/tests/lint/004_block_type.expected.txt @@ -1,7 +1,7 @@ bundle notavalidtype my_bundle ^-----------^ -Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, server, watch), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8 +Error: Bundle type must be one of (agent, common, edit_line, edit_xml, monitor, reactor, server, watch), not 'notavalidtype' at tests/lint/004_block_type.x.cf:1:8 promise server my_promise_type diff --git a/tests/lint/021_reactor_strtotime_silence.cf b/tests/lint/021_reactor_strtotime_silence.cf new file mode 100644 index 0000000..959037b --- /dev/null +++ b/tests/lint/021_reactor_strtotime_silence.cf @@ -0,0 +1,13 @@ +body changes my_changes +{ + silence => { "mtime", "content" }; +} + +bundle reactor my_reactor +{ + vars: + "timestamp" int => strtotime("2026-08-26"); + + reports: + "Parsed timestamp => $(timestamp)"; +}