From 7259ffebeca3956599612da10843fb3f40bd8f12 Mon Sep 17 00:00:00 2001 From: octo-patch Date: Tue, 28 Apr 2026 13:13:35 +0800 Subject: [PATCH] log placeholder substitution in finish_scan partial reports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Greptile review noted the placeholder substitution was silent — adding a warning log when fields are missing makes the substitution visible to operators while keeping the partial-report save behavior intact. The placeholder approach (vs returning a validation error) is intentional — losing the entire scan because the model omitted one section was the original bug from #294, so the trade-off favors saving the report. Co-Authored-By: Octopus --- strix/tools/finish/finish_actions.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/strix/tools/finish/finish_actions.py b/strix/tools/finish/finish_actions.py index ff78abc98..6a3037257 100644 --- a/strix/tools/finish/finish_actions.py +++ b/strix/tools/finish/finish_actions.py @@ -100,11 +100,30 @@ def finish_scan( return active_agents_error _NOT_PROVIDED = "[Not provided by model]" + placeholder_fields = [] + if not (executive_summary or "").strip(): + placeholder_fields.append("executive_summary") + if not (methodology or "").strip(): + placeholder_fields.append("methodology") + if not (technical_analysis or "").strip(): + placeholder_fields.append("technical_analysis") + if not (recommendations or "").strip(): + placeholder_fields.append("recommendations") + executive_summary = (executive_summary or "").strip() or _NOT_PROVIDED methodology = (methodology or "").strip() or _NOT_PROVIDED technical_analysis = (technical_analysis or "").strip() or _NOT_PROVIDED recommendations = (recommendations or "").strip() or _NOT_PROVIDED + if placeholder_fields: + import logging + + logging.warning( + "finish_scan: model omitted required field(s) %s; " + "saving partial report with placeholder text", + placeholder_fields, + ) + try: from strix.telemetry.tracer import get_global_tracer