fix(jtk): interpret escape sequences in comment body#188
Conversation
Apply InterpretEscapes to comment body text so that \n, \t, and other C-style escape sequences are processed before ADF conversion. This matches the existing behavior for issue descriptions. Closes #167
monit-reviewer
left a comment
There was a problem hiding this comment.
Automated PR Review
Reviewed commit: 05907ae
Approved with 1 non-blocking suggestion below. Address at your discretion.
Summary
| Reviewer | Findings |
|---|---|
| harness-engineering:architecture-reviewer | 1 |
harness-engineering:architecture-reviewer (1 findings)
💡 Suggestion - tools/jtk/internal/cmd/comments/comments.go:142
No unit test added for escape sequence interpretation in
runAdd. Thetext.InterpretEscapes()function itself is presumably tested, but a targeted test confirming the wiring inrunAdd(e.g., that\nin--bodyproduces a newline in the API call) would make the regression surface explicit.
Completed in 3m 21s | $0.61
| Field | Value |
|---|---|
| Reviewers | hybrid-synthesis, database:sql-reviewer, security:code-auditor, harness-engineering:knowledge-reviewer, harness-engineering:enforcement-reviewer, harness-engineering:architecture-reviewer, harness-engineering:legibility-reviewer |
| Reviewed by | pr-review-daemon · monit-pr-reviewer |
| Duration | 3m 21s (Reviewers: 41s · Synthesis: 55s) |
| Cost | $0.61 |
| Tokens | 398.6k in / 10.9k out |
| Turns | 52 |
| } | ||
|
|
||
| comment, err := client.AddComment(ctx, issueKey, body) | ||
| comment, err := client.AddComment(ctx, issueKey, text.InterpretEscapes(body)) |
There was a problem hiding this comment.
🔵 Low (harness-engineering:architecture-reviewer): No unit test added for escape sequence interpretation in runAdd. The text.InterpretEscapes() function itself is presumably tested, but a targeted test confirming the wiring in runAdd (e.g., that \n in --body produces a newline in the API call) would make the regression surface explicit.
Summary
text.InterpretEscapes()to comment body before ADF conversionissues createandissues updateCloses #167
Example
Test plan
make build && make testpasses\nand verify line breaks in Jira