Skip to content

perf(server): drop transient native events from provider logs - #240

Merged
leoisadev1 merged 2 commits into
mainfrom
perf/native-event-log-filter
Sep 14, 2026
Merged

leoisadev1 merged 2 commits into
mainfrom
perf/native-event-log-filter

Conversation

@leoisadev1

@leoisadev1 leoisadev1 commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

What Changed

Provider event logs no longer persist streaming chunks that cannot change thread state: Codex item/realtime deltas, Claude content-block deltas, ACP agent_message_chunk/agent_thought_chunk, and OpenCode text/reasoning part updates. Writes push into the pending buffer instead of copying it. ACP request diagnostics stay on; full protocol logging is opt-in through the Cursor and Grok provider settings and applies the same chunk filter.

Why

Native streams currently write every delta into thread-scoped ndjson files. Canonical events already drop content.delta and similar types. Native events did not, so the files grew with records nobody reads. Remaining pingdotgg#8187 logging work, kept off #230 (narrow projection queries) and off #203 (async log drains).

EventNdjsonLogger.ts is shared with OPEN #203. This PR only changes persist filters and pending-buffer mutation. It does not rewrite drain/close.

Out of scope here: OpenCode adapter text merge, native telemetry sampling, GitVcsDriver Trace2 decode, RepositoryIdentityResolver root cache (already local).

UI Changes

None.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I linked the accepted plugin or provider proposal in Why, or this PR does not add one
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Verification

  • Focused event logger, ACP logging, and settings suites — 94 passed
  • Cursor and Grok adapter integration checks for the verbose logging setting — 2 passed
  • Scoped lint on changed files — clean apart from one pre-existing unused settings-test helper warning
  • Server and contracts typechecks — suggestions only, no errors

Grok 4.6 High via Grok Build authored the change. Codex gpt-5.6-sol in T3 Code completed the review fixes.

Streaming provider chunks were filling thread-scoped ndjson files even though they cannot change thread state. Filter those native events before serialization, push into the pending buffer instead of copying it, and keep ACP protocol logging opt-in with the same chunk filter.

Async drain/close for EventNdjsonLogger stays on OPEN #203.

Grok 4.6 High via Grok Build.
@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
akeru-bot-landing Building Building Preview Sep 10, 2026 6:14pm UTC

Request Review

@github-actions github-actions Bot added type:provider Agent provider contribution. size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Sep 10, 2026
@greptile-apps

greptile-apps Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR reduces provider log volume by dropping transient native streaming events before serialization and makes full ACP protocol diagnostics explicitly configurable.

  • Filters transient Codex, Claude, ACP, and OpenCode native events while retaining durable lifecycle records.
  • Adds opt-in verbose protocol logging settings for Cursor and Grok.
  • Preserves default ACP request diagnostics and filters transient entries from verbose protocol logs.
  • Mutates the serialized pending buffer in place while retaining synchronized drain behavior.
  • Adds focused coverage for filtering, settings decoding, and adapter wiring.

Confidence Score: 5/5

Merge-safe. No outstanding blocking issues remain.

No accepted new findings or outstanding previous findings remain. The previous ACP protocol logging concern is fully addressed because both Cursor and Grok forward the configured verbose protocol logging setting into ACP native logger construction.

Reviews (2): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile

Comment thread apps/server/src/provider/acp/AcpNativeLogging.ts
# Conflicts:
#	apps/server/src/provider/Layers/EventNdjsonLogger.ts
@leoisadev1
leoisadev1 merged commit bebab32 into main Sep 14, 2026
11 checks passed
@leoisadev1
leoisadev1 deleted the perf/native-event-log-filter branch September 14, 2026 01:59
This was referenced Sep 14, 2026

This branch was successfully deployed

1 active deployment
Preview — 2a45540f Deployed Sep 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L type:provider Agent provider contribution. vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant