Skip to content

Fix metrics JSONL string bounds - #3281

Merged
Widthdom merged 2 commits into
mainfrom
fix-issue3224
Jun 5, 2026
Merged

Fix metrics JSONL string bounds#3281
Widthdom merged 2 commits into
mainfrom
fix-issue3224

Conversation

@Widthdom

@Widthdom Widthdom commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Clamp metrics JSONL string fields before serialization and emit <field>_length / <field>_truncated metadata.
  • Keep serialized metrics events within an 8 KiB byte budget, including escaped-content cases.
  • Document the truncation contract in USER_GUIDE.md and add the changelog fragment.

Validation

  • dotnet test tests/CodeIndex.Tests/CodeIndex.Tests.csproj --filter "FullyQualifiedName~MetricsSinkTests" -p:UseSharedCompilation=false
  • dotnet run --project tools/CodeIndex.Changelog -- check
  • dotnet format CodeIndex.sln --verify-no-changes --no-restore
  • dotnet test CodeIndex.sln -c Release -p:UseSharedCompilation=false
  • dotnet build CodeIndex.sln -p:UseSharedCompilation=false
  • dotnet ./src/CodeIndex/bin/Debug/net8.0/cdidx.dll status --check --json
  • codex exec review --base origin/main found missing metrics truncation docs; fixed in follow-up commit.
  • codex exec review --ignore-user-config --ephemeral --base origin/main found no blocking/actionable regression.

Documentation / Changelog

  • Updated USER_GUIDE.md.
  • Added changelog.d/unreleased/3224.fixed.md.

Fixes #3224

Follow-up candidates

None.

@Widthdom
Widthdom merged commit 8a7ed16 into main Jun 5, 2026
10 checks passed
@Widthdom
Widthdom deleted the fix-issue3224 branch June 5, 2026 02:56
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.

Metrics JSONL should cap string fields and mark truncation

1 participant