Repository navigation
fix: swarm JSON fences, RSS Windows paths, debate role prompts (reimpl of #1073) - #1094
Merged
Merged
Conversation
_score_complexity and _decompose ran json.loads on the raw LLM response, so a model wrapping output in ```json ... ``` raised JSONDecodeError — scoring fell back to 0.5 and decomposition collapsed the task into one subtask. A shared _strip_code_fence helper now removes a surrounding fence before parsing. Regression tests use a real BaseLLM fake. Co-authored-by: Ashish Maurya <[email protected]>
A local path like C:\feeds.xml parses with a single-letter urlparse "scheme" (the drive letter), so _validate rejected it as a disallowed URL scheme. It now matches a drive-letter path explicitly (^[A-Za-z]:[\\/]) and treats it as a local file, instead of blanking all single-character schemes (which would have broadened the guard). file://, ftp:// and internal HTTP targets stay rejected or validated. Regression tests cover both. Co-authored-by: Ashish Maurya <[email protected]>
Each opening/rebuttal/defense/judge prompt is now prefixed with
"You are {name}, acting as: {role}.", so a debater's persona reaches the model
on every turn (the executors' ReActAgent wipes its scratchpad between turns).
Complements the transcript re-injection already in #1072.
Co-authored-by: Ashish Maurya <[email protected]>
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.
Reimplements the salvageable fixes from #1073 (closed) on current
main, with regression tests and the stale/duplicate/scratch content dropped.Changes
json.loadsin_score_complexity/_decompose(shared_strip_code_fencehelper) so fenced LLM JSON no longer breaks scoring/decomposition.C:\feeds.xml) as a local file in the SSRF guard, via an explicit^[A-Za-z]:[\\/]match rather than blanking all single-character schemes;file:///ftp:///internal HTTP stay rejected or validated.You are {name}, acting as: {role}.Why not merge #1073 directly
It was 61 commits behind
mainand would have regressed it: reverting #1067'sllm: BaseLLMtyping back toAny, deleting #1072's amnesia regression test, and re-adding committed scratch files (fake_audit.jsonl,scratch.py, ...). The two genuinely-new fixes shipped without tests. See the closing comment on #1073.Testing
BaseLLMfakes;_validateSSRF cases). 31 targeted tests pass; full agents+loaders suite green (1433 passed).Co-authored-by: Ashish Maurya [email protected]