Commit Graph

9 Commits

Author SHA1 Message Date
Levi Neely 8cf82f3551 execute: update tests for split execute_code / call_tool / pipe tools 2026-05-15 18:50:20 +00:00
Levi Neely c02607aa60 execute: separate steps (parallel) from pipe (sequential)
- steps: independent, run in parallel when annotated safe, outputs
  concatenated. No stdout chaining.
- pipe: explicit pipeline, sequential, stdout of each stage feeds
  stdin of the next.

steps and pipe are mutually exclusive in a single execute_code call.
2026-05-11 13:50:01 +02:00
Levi Neely d638c2e75b Revert "execute: remove auto-batching from pipeline, fan-out is always explicit"
This reverts commit 2117f14a53.
2026-05-11 13:43:13 +02:00
Levi Neely 2117f14a53 execute: remove auto-batching from pipeline, fan-out is always explicit
steps is always a pipe (sequential, stdout chains to next stdin).
Concurrent fan-out requires explicit use of the parallel field.
The ollie:parallel annotation still drives agent-level tool call
parallelism via IsParallelRead, but no longer hijacks pipe semantics.
2026-05-11 13:40:47 +02:00
Levi Neely 36841b3667 execute/flock: make ollie:parallel annotation comment-syntax-agnostic
Now matches "ollie:parallel" anywhere in the line instead of requiring
a "# " prefix. Supports bash (#), lua (--), C-style (//), etc.
2026-05-11 13:26:55 +02:00
Levi Neely 386dc64753 tests: add flock/locking coverage for execute package
Covers detectParallelClass, sanitizeLockName, acquireFlock, classifyStep,
SetLockDir, and runReadBatch — bringing pkg/tools/execute from 70.9% to 92.4%.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 18:50:35 +02:00
Levi Neely 0fd3bf1cf8 test: paths 100%, execute 96.2% (was 71%)
- pkg/paths: cover CfgDir/DataDir env and default branches
- execute: cover all injectArgs languages, resolveCodeStep, runStage,
  dispatchExecuteCode, executeElevated via fake elevate script,
  elevated paths in runStage/dispatch, language branches (python, perl,
  bc, jq, awk, sed, ed, lua), limitedWriter edge cases, loadSandboxConfig,
  detectLanguage shebangs
2026-04-21 22:00:08 +02:00
Levi Neely 0b64808ef5 pkg/tools: add contract tests, remove Close from Server/Dispatcher
- Add contract tests for tools.Server and tools.Dispatcher interfaces
  (tools_test.go), covering all exported behavior including error paths.
  pkg/tools coverage: 0% -> 100%.
- Add contract test for execute.Server (ListTools, CallTool), Decl
  factory test, and executeElevated early-exit test. execute coverage:
  68% -> 71%.
- Remove Close() from Server and Dispatcher interfaces and all
  implementations/callers. These existed for MCP server cleanup which
  has been removed.
2026-04-21 13:38:02 +02:00
Levi Neely 85b0d7f6fa remove MCP support, add execute_code tests
- Remove pkg/mcp/ (client, transport, JSON-RPC handshake)
- Remove mcpServer adapter and NewServer() from tools.go
- Remove MCPServers/ServerConfig from config
- Remove MCP server connection loop from BuildAgentEnv
- Remove ListServers() from Core interface and agentCore
- Remove /mcp command and help line
- Rename extractMCPResult -> extractToolResult
- Rename mcpToolsToBackend -> toolInfosToBackend
- Add execute_test.go: 28 tests covering detectLanguage, injectArgs,
  ansiCEscape, ValidateCode, allowed, ReadTool, Execute, Dispatch
  (pipeline, parallel, tool steps), limitedWriter, rate limiting,
  SetEnv, SetCWD (68.2% coverage from 0%)
- Add testdata/sandbox/default.yaml for real sandboxed test execution
2026-04-21 13:25:32 +02:00