Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/mcp/capture.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func validateCaptureInput(input *CaptureInboxInput) (due *time.Time, rec todo.Re
if goal.ContainsControlChars(input.Title) {
return nil, rec, false, fmt.Errorf("title must not contain control characters")
}
if goal.ContainsControlChars(input.Description) {
if containsProseControlChars(input.Description) {
return nil, rec, false, fmt.Errorf("description must not contain control characters")
}
if input.Energy != nil && *input.Energy != "" && !isValidEnergy(*input.Energy) {
Expand Down
9 changes: 9 additions & 0 deletions internal/mcp/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ func TestCaptureInbox_Validation(t *testing.T) {
}
}

func TestCaptureInbox_MultilineDescription(t *testing.T) {
// Description is multi-line Markdown prose (rendered as paragraphs and
// bullets), so LF/CR/HT are legitimate — same treatment as content body.

@augmentcode augmentcode Bot Jul 2, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TestCaptureInbox_MultilineDescription’s comment mentions allowing LF/CR/HT, but the test input only exercises \n; this could miss a future regression where \r or \t gets rejected despite the intent documented here.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

input := CaptureInboxInput{Title: "ok", Description: "- noticed\n\n- proposal\n\n- value"}
if _, _, _, err := validateCaptureInput(&input); err != nil {
t.Fatalf("multi-line description rejected: %v", err)
}
}

// --- plan_day ---

func TestPlanDay_Validation(t *testing.T) {
Expand Down
Loading