Repository navigation
fix: resolve debate context amnesia, swarm json decoding, and windows ssrf guards - #1073
ramashishmaurya wants to merge 7 commits into
Conversation
AmitoVrito
left a comment
There was a problem hiding this comment.
branch is way behind main (~28 commits). the debate orchestrator + the context-amnesia fix already landed in #1072, so that part is a dup and conflicts. couple other things:
- scratch.py / scratch3.py / fake_audit.jsonl / pr_body.md look like local junk, drop them + gitignore
- test_semantic_compressor uses unittest.mock.AsyncMock, we don't allow mocks in tests, use a small hand-written fake llm
- too much in one PR. the rss windows scheme fix and swarm json fence stripping are both fine on their own, can you split those into two small PRs rebased on current main, each with a regression test?
- SemanticCompressorMemory doesn't subclass the memory base and add() is sync while get_messages() is async (and get_messages triggers llm calls as a side effect). needs a design pass before it fits, lets scope it in an issue first
the unrelated sleep(5)->sleep(10) in test_tools also needs a reason or should come out.
|
Hey Ashish, thanks for this. Couple of blockers before it can go in:
The genuinely new stuff worth keeping is the swarm JSON fence stripping and the RSS single-char scheme fix for Windows paths. Could you rebase on latest main and split those into two small focused PRs? The fence-stripping block is duplicated in both swarm methods too, would be nice as a shared helper. Appreciate it. |
|
Thanks for this, @ramashishmaurya — several of these are real issues. I'm going to close this PR unmerged and reimplement the salvageable fixes fresh on
I'll port the Swarm and RSS fixes (plus the debate role/name prompt injection) onto current |
fix: swarm JSON fences, RSS Windows paths, debate role prompts (reimpl of #1073)
Summary
This PR addresses several critical logic bugs across the agent framework and loaders, including debate context amnesia, SwarmAgent JSON decoding failures, and Windows-specific SSRF false positives.
Closes #
Type of change
Changes
DebateOrchestratorto prevent context amnesia caused byReActAgentclearing its scratchpad._score_complexityand_decomposeto preventJSONDecodeErrors when LLMs wrap output in backticks, which previously caused the agent to fail task decomposition.RSSLoaderto ignore 1-character schemes (likeC:) to preventurlparsefrom blocking valid local Windows file paths.TestPythonREPLTool.test_timeout_on_slow_operationto 10 seconds to reliably trigger timeouts and account for Windows background process overhead.Testing
uv run pytest tests/ -q)Documentation
Notes for reviewer
All fixes represent logic and edge-case patches without altering the public API. The Windows SSRF fix in
rss.pyspecifically targets theurlparseedge case whereC:/parses"c"as a URL scheme.