Bound SDK event logs while preserving screenshot evidence
Bounds retained SDK event logs while keeping actionable diagnostics and trajectory evidence. Pi screenshot compaction and its Buffer-aware trajectory consumer land together, preventing intermediate screenshot loss.
Validation: 118 SDK/event tests, five Pi adapter/pipeline tests, 12 build tasks, and SDK/core/eval typechecks passed. The pipeline test imports the actual built Pi compactor and checks retained image bytes for compacted Buffer and historical base64 events.
Stack position: 7/11. Base: evals/consolidation-08-native-routing. Each PR contains the change relative to its immediate predecessor.
Reviewer entry points:
packages/integrations/core/src/harness/eventLog.tspackages/integrations/pi-sdk/src/session.tspackages/evals/framework/harnesses/piAdapter.ts
Summary by cubic
Bounds SDK event logs and retained event payloads across Claude, Codex, DeepAgents, Eve, Fx, Mastra, and Pi. Previously, stream noise and repeated payloads stayed visible; now stream fragments are dropped, routine events move to debug, and failures stay at level 1 without changing model-facing results or trajectory evidence.
- Adds a shared event classifier that drops deltas and bare lifecycle markers and keeps SDK-specific failures visible.
- Retains Pi screenshots once as
Buffervalues, drops duplicate image payloads from logs and non-assistant messages, and records omission markers over 8 MiB per image or 64 MiB per run. The Pi adapter accepts bothBufferand legacy base64 image blocks. - Compacts Mastra
step-finishandfinishevents to keep usage and trajectory data without repeated request bodies. - Redacts credentials before clipping event details.
Reordered stack: #2891 → #2892 → #2895 → #2896 → #2897 → #2898 → #2899 → #2900 → #2901 → #2893 → #2894.
Readiness: CI passed on bfc240ec68. Review threads are triaged and resolved.