fix(point): escape line protocol control characters - #59
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #59 +/- ##
==========================================
+ Coverage 82.74% 83.32% +0.57%
==========================================
Files 10 10
Lines 1971 2027 +56
==========================================
+ Hits 1631 1689 +58
+ Misses 340 338 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Rejects unsafe control characters in structured line-protocol writes to prevent malformed or split batches.
Changes:
- Adds shared validation and a dedicated error variant.
- Applies validation to Point, default-tag, and DataFrame writes.
- Adds regression tests and release notes.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/point.rs |
Validates structured Point values. |
src/write_dataframe.rs |
Validates DataFrame serialization. |
src/error.rs |
Adds InvalidPointData. |
tests/point_tests.rs |
Tests Point validation and literal escapes. |
tests/write_tests.rs |
Tests default-tag behavior. |
CHANGELOG.md |
Documents the fix. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟢 Approval recommended
The shared implementation covers the stated structured-write paths with appropriate regression tests and no unresolved correctness issues.
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Balanced
Supersedes #49 and implements the escaping approach proposed in this review comment.
Proposed Changes
\n,\r, and\tsequences before serializing structured line protocolPointand DataFrame write paths while leaving raw line-protocol strings unchangedThis prevents control characters from splitting structured writes into additional line-protocol records and aligns the Rust client with the Java, C#, JavaScript, and Python client behavior described in #49.
Checklist