fix: orchestration reliability, security, and retry quality (9 targeted fixes) - #12
Merged
Conversation
…tifier before URL interpolation
… per put below cap)
…m error_logs to 20K
…t prompt injection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: checkworktree_remove()result; log ERROR on failure instead of silently proceedingweb_verify.py: clamp browser nav timeout to ≥1000ms — prevents negative timeout from long server startup causing immediate false-positive failureLLM 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 retryexecute_mixin.py: cap reflections to last 3; trim error_logs to 20K chars — prevents context window crowding on hard tasks with many retriesSecurity
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 serversproviders.py: stop storing the OpenRouter API key as an instance attribute (self.api_key) — key no longer appears in tracebacks, repr(), or debugger capturesGate 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.tmpfile in finally block on atomic flush failureCarried forward from prior tier-run work (commits
6656fa5–7700710): topological sort, tasklist dep table, LLMCache eviction amortization, HTTP read bounds — these were inroadmap/tier-runbut not captured in PR #11's merge.Test plan
pytest tests/ -x -q— 2391 passed locally