From e1bbeb0ba530916b121ae4d1ff1e2c7b0a87f0fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Jul 2026 15:56:42 +0000 Subject: [PATCH 1/3] Initial plan From 00944fa01e093a9e7ec7a7e472fa8841650ff815 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Jul 2026 15:57:53 +0000 Subject: [PATCH 2/3] chore: outline plan for review fixes --- .../__pycache__/__init__.cpython-312.pyc | Bin 1787 -> 1787 bytes .../__pycache__/components.cpython-312.pyc | Bin 13608 -> 13608 bytes .../__pycache__/engine.cpython-312.pyc | Bin 19384 -> 19384 bytes .../__pycache__/variables.cpython-312.pyc | Bin 12130 -> 12130 bytes 4 files changed, 0 insertions(+), 0 deletions(-) diff --git a/src/automation/__pycache__/__init__.cpython-312.pyc b/src/automation/__pycache__/__init__.cpython-312.pyc index f646cb45582af0e1f8c82c1692d65b4b0d5970c7..c5d9bf1bcc3df88a07a6694c79ece8ca4c27f87e 100644 GIT binary patch delta 20 acmey(`M()$Ryj%=GaH7s@BllWw08xkr-v9sr delta 22 ccmdlnopHx>M()$Ryj%=GFf-g^BllWw08dK>hX4Qo diff --git a/src/automation/__pycache__/variables.cpython-312.pyc b/src/automation/__pycache__/variables.cpython-312.pyc index 303be42f5f8a27b0d0998f37e098ac68e519df0d..8644cc67cec6fc7dcf969a67390b3c90dc0a752e 100644 GIT binary patch delta 20 acmaD9_b870G%qg~0}!03^V-NAt`7i8 Date: Sun, 5 Jul 2026 16:00:38 +0000 Subject: [PATCH 3/3] fix automation engine review thread comments --- src/automation/engine.py | 16 +++++++++++----- tests/test_automation_review_regressions.py | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/automation/engine.py b/src/automation/engine.py index b973f3c..3f5e206 100644 --- a/src/automation/engine.py +++ b/src/automation/engine.py @@ -57,7 +57,10 @@ class RunStatus(Enum): class EngineNotStartedError(RuntimeError): - """Raised when :meth:`AutomationEngine.trigger` is called before :meth:`start`.""" + """ + Raised when :meth:`AutomationEngine.trigger` or + :meth:`AutomationEngine.trigger_type` is called before :meth:`start`. + """ @dataclass @@ -195,17 +198,20 @@ def start(self) -> "AutomationEngine": """ if not self._running: self._running = True - logger.info("AutomationEngine started") + logger.debug("AutomationEngine started") return self def stop(self) -> "AutomationEngine": """ - Stop the engine and tear down all registered components. + Stop the engine and tear down all registered components by deregistering + each one from the component registry. After :meth:`stop` returns, :meth:`trigger` / :meth:`trigger_type` will raise :class:`EngineNotStartedError` until :meth:`start` is - called again. All component teardown hooks are invoked; any - exceptions they raise are logged and suppressed. + called again. Because components are deregistered during teardown, a + subsequent :meth:`start` does not restore previously registered + components; callers must register them again as needed. Any exceptions + raised by teardown are logged and suppressed. Returns *self* for chaining. """ if self._running: diff --git a/tests/test_automation_review_regressions.py b/tests/test_automation_review_regressions.py index 1fa18d3..bcdb8bf 100644 --- a/tests/test_automation_review_regressions.py +++ b/tests/test_automation_review_regressions.py @@ -128,6 +128,20 @@ def test_start_is_idempotent(): assert engine.is_running is True +def test_start_emits_debug_log(caplog): + engine = AutomationEngine() + + with caplog.at_level("DEBUG", logger="automation.engine"): + engine.start() + + start_logs = [ + record for record in caplog.records + if record.name == "automation.engine" and record.message == "AutomationEngine started" + ] + assert len(start_logs) == 1 + assert start_logs[0].levelname == "DEBUG" + + def test_stop_calls_component_teardown(): events = [] @@ -261,4 +275,3 @@ def test_text_file_guardrail_in_pipeline_passes_valid_payload(): def test_default_text_extensions_contains_txt(): assert ".txt" in DEFAULT_TEXT_EXTENSIONS -