Skip to content

fix: orchestration reliability, security, and retry quality (9 targeted fixes) - #12

Merged
dcondrey merged 11 commits into
mainfrom
roadmap/tier-run
Jul 27, 2026
Merged

fix: orchestration reliability, security, and retry quality (9 targeted fixes)#12
dcondrey merged 11 commits into
mainfrom
roadmap/tier-run

Conversation

@dcondrey

Copy link
Copy Markdown
Owner

Summary

Nine targeted fixes identified by automated audit of the hot-path production code. All pass the full test suite (2391 passed, 4 skipped).

Resource safety

  • parallel.py: check worktree_remove() result; log ERROR on failure instead of silently proceeding
  • web_verify.py: clamp browser nav timeout to ≥1000ms — prevents negative timeout from long server startup causing immediate false-positive failure

LLM retry quality

  • execute_mixin.py / gates_mixin.py: prefix error_logs with gate type ([BUILD], [TYPECHECK], [TEST]) so the model knows which gate to target on retry
  • execute_mixin.py: cap reflections to last 3; trim error_logs to 20K chars — prevents context window crowding on hard tasks with many retries

Security

  • mcp_gather.py: wrap MCP tool results in <tool_result name="..."> delimiters before injecting into the LLM prompt — blocks prompt-injection from malicious/compromised MCP servers
  • providers.py: stop storing the OpenRouter API key as an instance attribute (self.api_key) — key no longer appears in tracebacks, repr(), or debugger captures

Gate correctness

  • gatekeeper/__init__.py: log WARNING when mutation gate errors and silently SKIPs — distinguishes tool-unavailable-by-design (INFO) from unexpected gate failure (WARNING)

Infrastructure

  • mcp_registry.py: reload cache from disk when file mtime changes (multi-process safety); clean up .tmp file in finally block on atomic flush failure

Carried forward from prior tier-run work (commits 6656fa57700710): topological sort, tasklist dep table, LLMCache eviction amortization, HTTP read bounds — these were in roadmap/tier-run but not captured in PR #11's merge.

Test plan

  • CI passes (all py3.10–3.13 × ubuntu + macos)
  • pytest tests/ -x -q — 2391 passed locally

@dcondrey
dcondrey merged commit 7803f25 into main Jul 27, 2026
9 checks passed
@dcondrey
dcondrey deleted the roadmap/tier-run branch July 27, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant