Skip to content

fix(truncation): report maximum size when it cuts an event name - #217

Open
lukecotter wants to merge 1 commit into
mainfrom
fix/max-size-cut-event-name
Open

lukecotter wants to merge 1 commit into
mainfrom
fix/max-size-cut-event-name

Conversation

@lukecotter

Copy link
Copy Markdown
Collaborator

📝 Overview

When a log hit its maximum size inside an event name, for example …|STATEMENT_EXECUT*********** MAXIMUM DEBUG LOG SIZE REACHED ***********, the line was not an event. The parser gave only an Invalid log line parsing error. The log had no Max-Size-reached issue and no max-size truncation region, and isTruncated was false.

Such a line now gives the same result as a whole marker line. The parsing error stays, as it does when the marker cuts an event's fields.

🛠️ Changes

  • LogMarkers.otherLine also tests a line that is no event against CUT_BY_MAX_SIZE — the builder already does this for cut lines that parse as events, but not for lines cut before the event name ended.
  • New test for three cut points: inside the event name, after the timestamp, inside the timestamp.
  • src/AGENTS.md truncation gotcha states the cut-line exception.

🧩 Type of change

  • 🐛 Bug fix — fixes an issue
  • ✨ Feature — adds new functionality
  • ♻️ Refactor — no behaviour change
  • ⚡ Performance
  • 📝 Docs
  • 🔧 Chore — tooling, CI, deps
  • 💥 Breaking change

🔗 Related issues

N/A

✅ Checklist

  • Tests added/updated
  • pnpm run ci passes locally
  • Changeset added (pnpm changeset) if this affects the published package
  • Docs updated if behaviour or the public API changed

When the log hit its maximum size inside an event name, the line was
not an event, so it gave only a parsing error. The log then showed no
Max-Size-reached issue, no max-size region, and isTruncated was false.
@codspeed

codspeed Bot commented Nov 20, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 10 untouched benchmarks


Comparing fix/max-size-cut-event-name (24aa6b9) with main (a074088)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant