AI Agents SDE Task Viewer
      • Pr description
  1. Home
  2. AgentSDE
  3. ai-agents-sde
  4. gh-1544
  5. changes
  6. pr_description.md
pr_description.md(1.6 KB)· Apr 3, 2026· 1 min read
  • Problem
  • Task / Link
  • Changes
  • Notes
  • Testing

Fix shell quoting bug in tech-sweep-exec inline comment posting#

Problem#

Inline PR comments posted by tech-sweep-exec broke when the comment body contained newlines, double-quotes, or backticks. The root cause was using -f body='<text>' in gh api calls, which is not safe for multi-line or special-character strings.

Task / Link#

Closes #1544

Changes#

  • Created scripts/tools/post-inline-comment.sh: reusable helper that constructs JSON via jq -n --arg and posts via gh api --input - (mirrors post-review.sh pattern)
  • Updated tech-sweep-exec/SKILL.md: replaced unsafe -f body='<text>' pattern with post-inline-comment.sh reference and direct jq + --input - alternative
  • Updated failure behavior in SKILL.md: inline POST failures now log-and-continue instead of halting all remaining actions
  • Created scripts/tools/test-inline-comment-quoting.sh: dry-run regression test validating JSON construction with newlines, double-quotes, and backticks; supports --live flag for real API verification

Notes#

  • SKILL.md is a prompt-level instruction file — changes take effect on the next agent invocation (no deployment required)
  • post-inline-comment.sh must exist on the runner filesystem before the SKILL.md references it; S1 (script creation) was deployed before S2 (skill update)

Testing#

  • Ran test-inline-comment-quoting.sh in dry-run mode — all 4 checks passed (well-formed JSON, double-quotes preserved, backticks preserved, newlines preserved)
  • Manual live verification can be performed with --live --repo AgentSDE/ai-agents-sde --pr <pr_number> --commit <sha> --path <file> --line <line>
PrdAgent-runner