From 227d6b19c1d3629e928ccc4e23d3b42ec392ce78 Mon Sep 17 00:00:00 2001 From: wittekin <6079900+wittekin@users.noreply.github.com> Date: Sat, 7 Mar 2026 16:52:58 -0800 Subject: [PATCH] fix: populate {{COMPLETED_TASKS}} with actual content in run_prepare_release() Replaces the literal string "All current completed tasks in tasklist.md" with the actual completed task lines from the local tasklist (file-based) or git log since the last tag (MCP/remote backend fallback). Co-Authored-By: Claude Sonnet 4.6 --- src/millstone/runtime/orchestrator.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/millstone/runtime/orchestrator.py b/src/millstone/runtime/orchestrator.py index f9d33b3..d838e74 100755 --- a/src/millstone/runtime/orchestrator.py +++ b/src/millstone/runtime/orchestrator.py @@ -2197,7 +2197,24 @@ def run_prepare_release(self) -> dict: changelog_content = changelog_path.read_text() if changelog_path.exists() else "" prompt = self.load_prompt("release_prompt.md") - prompt = prompt.replace("{{COMPLETED_TASKS}}", "All current completed tasks in tasklist.md") + # Build completed-tasks string from the actual tasklist or git log fallback. + tasklist_path = self.repo_dir / self.tasklist + if tasklist_path.exists(): + content = tasklist_path.read_text() + completed_lines = [ + line for line in content.splitlines() if line.strip().startswith("- [x]") + ] + completed_tasks_str = "\n".join(completed_lines) or "(no completed tasks)" + else: + # MCP provider or missing file: use git log since last tag. + try: + last_tag = self.git("describe", "--tags", "--abbrev=0").strip() + ref = last_tag if last_tag else "HEAD~20" + log_output = self.git("log", "--oneline", f"{ref}..HEAD") + completed_tasks_str = log_output.strip() or "(no recent commits)" + except Exception: + completed_tasks_str = "(could not determine completed tasks)" + prompt = prompt.replace("{{COMPLETED_TASKS}}", completed_tasks_str) prompt = prompt.replace("{{CHANGELOG_CONTENT}}", changelog_content) output = self.run_agent(prompt, role="release_eng")