Skip to content

fix(mcp): allow multi-line description in capture_inbox#17

Merged
Koopa0 merged 1 commit into
mainfrom
fix/capture-inbox-multiline-description
Jul 2, 2026
Merged

fix(mcp): allow multi-line description in capture_inbox#17
Koopa0 merged 1 commit into
mainfrom
fix/capture-inbox-multiline-description

Conversation

@Koopa0

@Koopa0 Koopa0 commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Problem

capture_inbox validates description with the strict single-line check (goal.ContainsControlChars), which rejects LF. The hermes proposal-loop pushes descriptions as multi-line Markdown (blank-line paragraphs, - bullets) per the capture format contract, so every surfaced proposal push has failed with description must not contain control characters since the validation went live — 21 proposals are currently stuck retrying on every loop (5x/day since 06-25), and the failure was silent on the hermes side.

Fix

Validate description with containsProseControlChars (rejects every control char except HT/LF/CR) — the same predicate the codebase already applies to the other multi-line prose fields, content body and review_note (see internal/content/admin.go doc comments). title stays on the strict single-line check.

One-line change + regression test that a multi-line bulleted description passes validateCaptureInput.

Verification

  • go vet ./internal/mcp/ clean, go test ./internal/mcp/ all pass.
  • Root cause reproduced live: pushing a real surfaced proposal through scripts/koopa0-capture.sh against mcp.koopa0.dev returns the control-characters tool error; a single-line description succeeds.

After merge + deploy, the hermes proposal-loop backlog drains itself on the next run (push retry is built in), no hermes-side change required.

capture_inbox validated description with the strict single-line check
(goal.ContainsControlChars), so any description containing a newline was
rejected with "description must not contain control characters". The
hermes proposal-loop pushes descriptions formatted as multi-line Markdown
(blank-line paragraphs, bullet lists) per the capture format contract, so
every surfaced proposal push has failed since this validation went live
(21 items stuck retrying).

Description is multi-line Markdown prose, the same shape as content body
and review_note, which are already validated with
containsProseControlChars (rejects all control chars except HT/LF/CR).
Apply the same predicate to capture_inbox description. Title stays on the
strict single-line check.

Adds a regression test that a multi-line bulleted description passes
validateCaptureInput.
@augmentcode

augmentcode Bot commented Jul 2, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Allows multi-line Markdown descriptions in the MCP capture_inbox tool by relaxing description control-character validation.
Changes: Switches description validation to containsProseControlChars (matching other prose fields) and adds a regression test ensuring multi-line bullet descriptions pass validation.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.


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.

@Koopa0 Koopa0 merged commit d612047 into main Jul 2, 2026
5 checks passed
@Koopa0 Koopa0 deleted the fix/capture-inbox-multiline-description branch July 2, 2026 07:04
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