Repository navigation
fix(agent): run_python runs in scratch when the repo around the cwd is unapproved - #5768
Conversation
…s unapproved When the daemon was started inside a git checkout, run_python treated that checkout as the project and refused every snippet because the user never approved it, even snippets that only read an approved folder. A project root guessed from the process cwd that is outside the allowed paths is now handled like no project: the snippet runs in the scratch dir and the root is not put on PYTHONPATH. A root the user set (GAIA_PROJECT_ROOT or project_root config) that is not allowed is still refused. Closes amd#5765
|
Verdict: Approve with suggestions Before this fix, One edge case is worth a look, but it doesn't block merge. If the user's chosen project root sits outside the allowed-paths scope, the snippet is refused and the error names the current folder, not the project root. Real-world evidenceN/A: no evidence bundle was produced for this run. The change is inside the agent's 🔍 Technical detailsIssues 🟢 A chosen root outside 🟢 Strengths
|
|
Fixed the misleading refusal. When the project root you set is outside the allowed paths, I left the env-var timing point alone. |
## Why this matters v0.25.2 is a bug-fix release on top of v0.25.1: setup and install no longer stop at the first failed step, shell and file access handle Windows paths and text encodings, the Agent UI and desktop app stop showing misleading states, and document search, email and skills each lose a handful of rough edges. 55 commits since v0.25.1; notes are in `docs/releases/v0.25.2.mdx` and credit 15 outside contributors. ## Test plan - [x] `python util/validate_release_notes.py docs/releases/v0.25.2.mdx --tag v0.25.2` passes - [x] `mintlify validate` (from `docs/`) passes - [x] `python util/check_doc_links.py --internal-only`, `python util/check_doc_versions.py` and `node installer/version/bump-ui-version.mjs --check` pass - [x] `python util/check_component_core_api.py --release-version 0.25.2` passes - [x] `pytest tests/unit/test_docs_json_release.py tests/unit/test_check_component_core_api.py tests/unit/test_release_tag.py tests/unit/test_hub_core_version_gate.py`: 156 passed - [ ] CI green on the merge commit - [ ] `release_train_dryrun.yml` passes on that commit before the RC tag ## Evals to re-run on the RC tag LLM-affecting PRs merged without per-PR evals; run these on `v0.25.2-rc1`: - `gaia_shell` and shell/safety (amd#5794, amd#5751, amd#5768) - `gaia_honesty` (amd#5753) - `gaia_skills_tasks` and `gaia_skills_lifecycle` (amd#5422, amd#5755) - `rag_retrieval` and `rag_quality` (amd#5742, amd#5754, amd#5761, amd#5817, amd#5812) - email scenarios (amd#5767, amd#5811) - `tool_selection` and `error_recovery` (amd#5732) - Claude provider thinking replay (amd#5072) - memory categories (amd#5818 merged; amd#5756 has not) ## Release checklist - [ ] Freeze main, wait for green CI on the exact commit, pass `release_train_dryrun.yml`, then push `v0.25.2-rc1` - [ ] Extend the changelog if main gains commits before the tag
run_pythonrefused every snippet when the GAIA daemon had been started from inside a git checkout. The agent treated that checkout as "the project", and the user had never approved it. So asking it to parse a CSV in a folder you had approved failed with "Access denied: is not in allowed paths". Now that case runs in the agent's scratch folder, as it already does when there's no project. A project root you set explicitly and haven't approved is still refused.Found by the ai-pc-evals 0.6.4
as-rag-malformed-filesandas-data-malformed-csvstasks, run through the Agent UI on v0.25.1-rc11.Test plan
pytest tests/unit/test_run_python_tool.py: a detected but unapproved repo runs in scratch, writes nothing into the repo, and stays off PYTHONPATH; an explicitGAIA_PROJECT_ROOTthat isn't allowed is still refusedpytest tests/unit -k "python or scratch or project or chat": only failures are ones that also fail on main (test_a_pytest_run_attaches_its_check, pip/uv installer test)Closes #5765