From 750392e5dd981356179bdf639b4b7afc12948449 Mon Sep 17 00:00:00 2001 From: mjwsolo <19599997+mjwsolo@users.noreply.github.com> Date: Sun, 27 Sep 2026 00:53:16 +0100 Subject: [PATCH] chore: remove unused files; launcher prints are allowlisted - voice_visualizer.py and picker_cli.py: no references anywhere in src, tests, scripts or CI - .serena/: a local tool's project state, not part of the product - scripts/deploy_docs.sh: docs.yml deploys the site; the script was unreferenced - tests/promptfoo/: never run; the evals plan covers prompt regressions differently - tests/test_architecture.py: the UI launcher (launch.py, ports.py, server_cmd.py) prints to the terminal before the UI runtime exists, so it is allowlisted with a reason; the rule had been failing locally on main for that. --- src/localcode/agent/__init__.py | 2 +- src/localcode/theme.py | 2 +- tests/test_architecture.py | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/localcode/agent/__init__.py b/src/localcode/agent/__init__.py index c673ce0c..f3b6cf3b 100644 --- a/src/localcode/agent/__init__.py +++ b/src/localcode/agent/__init__.py @@ -140,7 +140,7 @@ # ── Prompt templates + project-instructions loader ──────────────────────── # Moved to agent/prompts.py during the T0.1-b split. Re-exported here so -# external callers (dev/eval/prompt_variants.py, tests/promptfoo, app.py, +# external callers (app.py, # tests/test_context_pipeline_e2e.py) that do # `from localcode.agent import SYSTEM_PROMPT` # keep working unchanged. See agent/prompts.py for the commented diff --git a/src/localcode/theme.py b/src/localcode/theme.py index b05385e0..f776cd63 100644 --- a/src/localcode/theme.py +++ b/src/localcode/theme.py @@ -62,7 +62,7 @@ class Palette: # `textual-ansi` theme set in tui/app.py — see the explanation # in tui/styles/app.tcss. These hex strings are kept only for # the rare consumer that imports `C.background` / `C.surface` - # for a non-TUI render (logs / docs / promptfoo screenshots). + # for a non-TUI render (logs / docs screenshots). # If any user-visible UI is reading these for an actual # rendered background, that's a bug — route through ANSI instead. background: str = "#1e1e1e" # legacy, non-rendering diff --git a/tests/test_architecture.py b/tests/test_architecture.py index d0790ce9..3c0bfb1d 100644 --- a/tests/test_architecture.py +++ b/tests/test_architecture.py @@ -360,6 +360,9 @@ def test_agent_submodules_declare_all(): # allowlist with a reason than silently let printfs leak into the # agent loop. PRINT_ALLOWLIST = { + "launch.py", # UI launcher: prints to the terminal BEFORE the UI runtime starts (no event bus yet) + "ports.py", # UI launcher: prints to the terminal BEFORE the UI runtime starts (no event bus yet) + "server_cmd.py", # UI launcher: prints to the terminal BEFORE the UI runtime starts (no event bus yet) # CLI entry point: `python -m localcode.errors` emits the # error-code docs table. Not reachable from the agent loop. "errors.py",