From 26c5452e9a91b79aaa0dfae0ef4c36ef4355ed0d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 11:13:22 +0000 Subject: [PATCH 1/3] Initial plan From ee4a8a257054d5b38b3aa41a85e3cde8297abfd1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 11:24:47 +0000 Subject: [PATCH 2/3] fix: initialize common submodule during prebuild Agent-Logs-Url: https://github.com/adamj537/TestController/sessions/49fb70d7-642a-4cec-bcfe-8599c726bdde Co-authored-by: adamj537 <11276599+adamj537@users.noreply.github.com> --- scripts/gen_version.py | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/scripts/gen_version.py b/scripts/gen_version.py index 9fa6f89..692ba94 100644 --- a/scripts/gen_version.py +++ b/scripts/gen_version.py @@ -10,19 +10,57 @@ version.txt — plain string read by ESP-IDF for the boot-log App version """ -import subprocess import os +import subprocess +import sys Import("env") # noqa: F821 (PlatformIO SCons injection) project_dir = env.subst("$PROJECT_DIR") +def ensure_common_submodule(): + common_dir = os.path.join(project_dir, "common") + required_dirs = ( + os.path.join(common_dir, "include"), + os.path.join(common_dir, "hal"), + os.path.join(common_dir, "src"), + os.path.join(common_dir, "storage"), + ) + + if all(os.path.isdir(path) for path in required_dirs): + return + + print("[deps] common/ submodule missing; initializing it via git") + result = subprocess.run( + ["git", "submodule", "update", "--init", "--recursive", "common"], + capture_output=True, + text=True, + cwd=project_dir, + ) + + if result.returncode == 0 and all(os.path.isdir(path) for path in required_dirs): + return + + if result.stdout: + print(result.stdout.strip()) + if result.stderr: + print(result.stderr.strip(), file=sys.stderr) + + raise SystemExit( + "[deps] Failed to initialize required common/ submodule. " + "Run 'git submodule update --init --recursive common' and retry." + ) + + def run(cmd): r = subprocess.run(cmd, capture_output=True, text=True, cwd=project_dir) return r.stdout.strip() +ensure_common_submodule() + + # --- Read manual semver --- semver_file = os.path.join(project_dir, "fw_version.txt") try: From e42b7c43f92d00f7df77e90324903e456405fa3a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 16 May 2026 04:29:00 +0000 Subject: [PATCH 3/3] revert: drop broken common submodule prebuild logic Agent-Logs-Url: https://github.com/adamj537/TestController/sessions/9da73435-186a-4db5-a4ef-4659dd2d2745 Co-authored-by: adamj537 <11276599+adamj537@users.noreply.github.com> --- scripts/gen_version.py | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/scripts/gen_version.py b/scripts/gen_version.py index 692ba94..9fa6f89 100644 --- a/scripts/gen_version.py +++ b/scripts/gen_version.py @@ -10,57 +10,19 @@ version.txt — plain string read by ESP-IDF for the boot-log App version """ -import os import subprocess -import sys +import os Import("env") # noqa: F821 (PlatformIO SCons injection) project_dir = env.subst("$PROJECT_DIR") -def ensure_common_submodule(): - common_dir = os.path.join(project_dir, "common") - required_dirs = ( - os.path.join(common_dir, "include"), - os.path.join(common_dir, "hal"), - os.path.join(common_dir, "src"), - os.path.join(common_dir, "storage"), - ) - - if all(os.path.isdir(path) for path in required_dirs): - return - - print("[deps] common/ submodule missing; initializing it via git") - result = subprocess.run( - ["git", "submodule", "update", "--init", "--recursive", "common"], - capture_output=True, - text=True, - cwd=project_dir, - ) - - if result.returncode == 0 and all(os.path.isdir(path) for path in required_dirs): - return - - if result.stdout: - print(result.stdout.strip()) - if result.stderr: - print(result.stderr.strip(), file=sys.stderr) - - raise SystemExit( - "[deps] Failed to initialize required common/ submodule. " - "Run 'git submodule update --init --recursive common' and retry." - ) - - def run(cmd): r = subprocess.run(cmd, capture_output=True, text=True, cwd=project_dir) return r.stdout.strip() -ensure_common_submodule() - - # --- Read manual semver --- semver_file = os.path.join(project_dir, "fw_version.txt") try: