fix(core): rework robustness changes per PR #158 review#159
Conversation
There was a problem hiding this comment.
See comment below MAX_CONTEXT_TOKENS and WORKSPACE_DIR is dead code.
The attempt to add WORKSPACE_DIR indicate some confusion therefore:
Please understand that agent interact with the workspace through 2 means: (A) Their action-as-python code runs inside the workflow runner, which spawns the subprocess with cwd set to Config.workspace_dir ([sources/core/workflow_runner.py:404](sources/core/workflow_runner.py:404)) so agents can use relative paths freely and never need to be prompted with the workspace path. (B) They also call MCP tools, which (when using Toolomics) run inside Docker containers that mount the Toolomics workspace folder as their filesystem root. For the two channels to refer to the same files on disk, workspace_dir in config.py / config_default.json must match the workspace path you passed to Toolomics' ./start.sh e.g. workspace_dir = "/Users/mlg/Documents/CNRS/toolomics/workspace" (just an example). (If you skip Toolomics, the rule generalizes: workspace_dir can be any path, as long as every MCP server with file I/O sees that same path.)
| OPENROUTER_PROVIDER = {self.config.openrouter_provider_for(self.config.smolagent_model_id)!r} | ||
| AGENT_EXECUTION_TIMEOUT = {self.config.agent_execution_timeout!r} | ||
| MAX_CONTEXT_TOKENS = {self.config.max_context_tokens!r} | ||
| WORKSPACE_DIR = {self.config.workspace_dir!r} |
There was a problem hiding this comment.
MAX_CONTEXT_TOKENS = {self.config.max_context_tokens!r}
WORKSPACE_DIR = {self.config.workspace_dir!r}
Dead code, should be removed. The fact Claude tried to pass workspace dir to SmolAgent through the config indicate a confusion about how Mimosa work.
Reworks the robustness changes from the closed PR #158 according to Martin's per-change review. Branched off the latest
mimosa_v2; only the accepted/reworked subset is applied, everything rejected is dropped. Suite green (109 passed, 0 failed).Applied
state_result.jsonwrite, post-assemble compile check.WorkflowInfoguard; clear VariationEngine histories at session start.VariationEngine()constructor calls so the suite passes.Dropped per review
workflow_runner temp-script deletion; the
.export_statussidecar in_export_astra(status is derived from run config + artifacts, not a written file); selection.py metrics-refresh; all smolagent_factory changes (max_steps, context-window guard, file lock, TimeoutError re-raise); csv_mode.py changes; workflow_v11.md agent rules; themax_steps/max_context_tokensconfig fields.config.pyalready carriesexport_astrawith round-trip onmimosa_v2, so nothing was added there. The cost/fairness work (caching, model tiers, grounding KB, verifier knobs) is intentionally not in this PR and will follow separately, one feature at a time.