LearnNewsExamplesServices
Frontmatter
id13473
titleBound Neural Link bridge payload logging
stateClosed
labels
bugaitestingperformancemodel-experience
assigneesneo-gpt
createdAtJun 18, 2026, 5:04 PM
updatedAtJun 18, 2026, 10:02 PM
githubUrlhttps://github.com/neomjs/neo/issues/13473
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 18, 2026, 10:02 PM

Bound Neural Link bridge payload logging

Closed v13.1.0/archive-v13-1-0-chunk-3 bugaitestingperformancemodel-experience
neo-gpt
neo-gpt commented on Jun 18, 2026, 5:04 PM

Context

Release classification: boardless operational hardening; this is not a v13 release blocker.

A 2026-06-18 stability sweep found the local Agent OS healthy, but the MCP log directory had grown to 211M. The largest contributors were Neural Link daily logs containing very large single lines. Direct source inspection found ai/services/neural-link/ConnectionService.mjs:451 writing the complete bridge payload through logger.info() while the message text says [DEBUG].

Verification before filing:

  • Live latest-open sweep: checked latest 20 open issues at 2026-06-18T15:04:02Z; no equivalent open issue found.
  • Targeted GitHub duplicate sweep: Neural Link bridge payload logging log bloat full payload returned no open matches.
  • A2A in-flight sweep: checked recent 30 messages; no overlapping lane claim found.
  • KB/local sweep: older Neural Link logging tickets cover the action recorder and always-on file sink, but not this full bridge payload at info level.

The Problem

The current log line can serialize full bridge payloads into the always-on Neural Link file log. That makes a few large bridge messages dominate the log file, slows inspection, and can bury the diagnostic signal operators actually need during long-running harness sessions.

The line is also misleading: the message says [DEBUG], but it is emitted at info, so it is not gated behind the actual debug channel.

Observed local evidence during the sweep:

  • .neo-ai-data/logs total size was 211M.
  • Neural Link daily logs contained lines around 685k characters.
  • nl-server-2026-06-15.log had an average line size over 100k characters.

The Architectural Reality

  • ai/services/neural-link/ConnectionService.mjs handles bridge messages and currently logs the complete payload in the hot receive path.
  • Neural Link uses the MCP shared logger/file-sink pattern established by #10582; info goes to the daily file sink by design.
  • Full tool/action payload recording has a separate storage path through the Neural Link action recorder. This ticket is only about human-facing server log output.

The Fix

Change the bridge receive log from full payload dump to bounded diagnostic projection:

  • At info, log only stable routing fields such as message type, app worker id/session id when available, JSON-RPC id/method/error code, and serialized payload byte length.
  • Move full payload logging behind true debug semantics, not an info line with a [DEBUG] prefix.
  • Cap any debug-side serialized payload or error field so one event cannot create a multi-hundred-kilobyte log line.
  • Add focused unit coverage around the bridge-message logging helper/path so the default info log cannot include the full bridge payload.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
Neural Link bridge receive log ConnectionService.mjs bridge-message handling Default/info log emits bounded routing metadata plus payload size, not the full payload body. If fields are absent or malformed, log safe placeholders and payload size only. Inline JSDoc only if a helper is introduced. Unit/stub test proving large payload content is omitted from info output.
Neural Link debug payload logging Existing logger debug channel Full payload detail is opt-in debug data and capped before serialization reaches the file sink. Circular/non-serializable payloads fall back to a bounded placeholder. Existing logger docs/comments are enough unless new config is added. Unit test covering size cap and circular/error fallback.

Decision Record impact

None. This is a diagnostics boundedness fix inside an existing Neural Link logging surface.

Acceptance Criteria

  • Default/info Neural Link bridge logs no longer include complete bridge payload JSON.
  • The default bridge receive log still preserves enough metadata to correlate a message with type/id/method/session and payload size.
  • Full payload logging, if retained, is emitted only through true debug semantics and has a hard size cap.
  • Large payload and circular/error payload cases are covered by focused tests.
  • Existing Neural Link behavior and bridge protocol payloads are unchanged.

Out of Scope

  • Global MCP log retention or old-log pruning.
  • Changing Neural Link bridge protocol payloads.
  • Changing Neural Link action recorder retention or stored tool-call payloads.
  • Deleting existing local log files.

Related

  • #10582 made Memory Core and Neural Link MCP file logs always-on and explicitly left retention policy out of scope.
  • Follow-up sibling: global MCP log retention cap ticket.

Origin Session ID: ef8b263f-1cdc-431a-a730-2c6c2ff26f98

Retrieval Hint: "Neural Link bridge payload logging full payload info DEBUG nl-server log bloat 685k"