LearnNewsExamplesServices
Frontmatter
id12902
titleDrag-trace ring truncates the tail and floods on duplicate deliveries
stateClosed
labels
bugaitesting
assigneesneo-fable
createdAtJun 11, 2026, 4:01 PM
updatedAtJun 11, 2026, 4:38 PM
githubUrlhttps://github.com/neomjs/neo/issues/12902
authorneo-fable
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 11, 2026, 4:38 PM

Drag-trace ring truncates the tail and floods on duplicate deliveries

neo-fable
neo-fable commented on Jun 11, 2026, 4:01 PM

Context

Surfaced during the live investigation of the operator-reported drag-scroll body-rendering regression (#12883's L4 surface): the primary forensic artifact — the operator's own drag trace — was missing exactly its diagnostic part.

Release classification: boardless — instrumentation hardening for the drag eyes; serves the #12883 investigation but blocks nothing.

The Problem

Two buffer-policy defects in Neo.draggable.container.SortZone#traceEvent (the drag eyes shipped via #12886):

  1. The 400-event cap drops the NEWEST events (if (events.length < 400) push): a long drag records its beginning and silently discards its tail — overdrag engagement, scroll events, end, lockVerdict — the most diagnostic part of any drop investigation.
  2. Duplicate-delivery flooding: the in-bound duplicate guard logs one dup event per occurrence. Real human drags (continuous small pointer deltas × the double listener fan-out) produce a dup entry pair per move — consuming ~⅔ of the buffer before the interesting phase begins. Empirical anchor: a live operator trace (session eb75f197, 2026-06-11T13:01Z) hit the cap mid-drag; its end/scroll events were absent.

The Architectural Reality

  • src/draggable/container/SortZone.mjs traceEvent — the single write-path for the trace ring (SortZone.traces / activeTrace), consumed by the get_drag_trace Neural-Link tool.
  • The dup events exist to make duplicate delivery VISIBLE (a real diagnostic signal from the fan-out class) — the information must survive, just not at per-occurrence buffer cost.

The Fix (delivered by PR #12901)

  1. Dup count-compression: duplicates increment a dup counter on the previous event.
  2. Oldest-drop at the cap: at 400 events the buffer shifts the head — the tail is always retained.

Acceptance Criteria

  • Duplicate deliveries add zero buffer entries; the previous event carries dup: n.
  • At the cap, the newest event is retained and the oldest dropped (401 pushes → length 400, last = newest).
  • Unit assertions for both (SortZone spec).

Out of Scope

  • The drag-scroll body-rendering regression itself (#12883's open investigation — this ticket only re-arms its instrument).

Related

  • Refs #12883 (the investigation this serves), #12886 (the eyes; closed — this hardens its deliverable)
  • Delivered by: PR #12901

Live latest-open sweep: checked latest open issues at 2026-06-11T13:55Z; no equivalent found.

Origin Session ID: e605ce21-3668-445c-bc00-45896aa9a092

Retrieval Hint: "drag trace ring tail truncation dup flood count-compression"

tobiu closed this issue on Jun 11, 2026, 4:38 PM