This repository has been archived on 2026-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
ollie-core/pkg/tools/execute
Levi Neely 75f11a7dc9 enforce 128KB tool result ceiling unconditionally
The tool result truncation had two bypasses:

1. Error results were exempt (!isErr condition) — a command returning
   output in its error message could flood the context with megabytes
   of untruncated data.

2. The streaming callback emitted chunks to the event handler (and
   thus D-Bus signals) with no size check, flooding the bus even
   when the final stored result would be truncated.

Fix:
- Remove the configurable ToolResultMaxBytes field; use the constant
  defaultToolResultMaxBytes (128KB) unconditionally for all results
  regardless of success/error status.
- Cap the streaming callback at 128KB so chunks stop being emitted
  once the ceiling is reached.
- Cap output embedded in execute server error messages to 8KB as
  defense in depth.
2026-07-27 13:02:45 +02:00
..
testdata/sandbox execute: fix test sandbox for plan9 PATH, drop GNU-only bc -q flag 2026-05-02 10:40:00 +02:00
code.go streaming: emit partial tool output via context callback 2026-07-19 21:06:13 +02:00
detach.go agent: expose detach methods on Core interface 2026-07-17 16:49:29 +02:00
execute_test.go execute: timeout=0 means no timeout 2026-07-17 17:06:12 +02:00
flock.go execute/flock: make ollie:parallel annotation comment-syntax-agnostic 2026-05-11 13:26:55 +02:00
pipe.go execute: support elevated+detach combination 2026-07-18 00:16:20 +02:00
server.go enforce 128KB tool result ceiling unconditionally 2026-07-27 13:02:45 +02:00
tier.go token efficiency: fix tier classification, expand cold tier, add usage log and compaction model override 2026-05-28 18:44:30 +02:00
tier_test.go token efficiency: fix tier classification, expand cold tier, add usage log and compaction model override 2026-05-28 18:44:30 +02:00
tool.go tools: two-tier discovery (surface listing + on-demand prompt) 2026-07-21 13:36:16 +02:00