Batch A: independent bug fixes and security hardening#84
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05b4499542
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if len(safe_urls) <= 20: | ||
| # Check all URLs if 20 or fewer | ||
| urls_to_check = urls | ||
| results["sample_size"] = len(urls) | ||
| urls_to_check = safe_urls | ||
| results["sample_size"] = len(safe_urls) |
There was a problem hiding this comment.
Count blocked URLs in validity score denominator
The URL validity score now samples only safe_urls, so private/internal links are excluded from both sample_size and invalid_urls. In reports that mix blocked links with a few reachable public links, this can produce an artificially high URL-validity score (e.g., 1 valid public URL + many blocked URLs can still score near 100), which skews evaluation results. To preserve metric integrity while keeping SSRF protections, blocked URLs should still contribute to the invalid/denominator side of scoring.
Useful? React with 👍 / 👎.
Summary
Cherry-picks five independent, non-overlapping PRs from the Codex/Aardvark batch onto
dev:fix(mcp): correct hypothesizer positional argument order (was silently swappinglocal_contextandlocal_data_document)fix: reset Data Discovery tab session state using correct keys (Discovery_*notData Sources_*)fix: guard stdio timeout parsing against invalid/null config values (fallback to 30s default)fix: block internal/private URL targets in eval URL validity checker; disable redirect following (SSRF mitigation)Notes
dev;python3 -m compileall peak_assistantpasses.Test plan
python3 -m compileall peak_assistant— should passPYTHONPATH=. pytest -q tests/unit_tests/test_mcp_stdio_timeout.pyin a full env to verify timeout fallback🤖 Generated with Claude Code