Skip to content

fix(skill): preserve incident comment content#96

Merged
ysyneu merged 2 commits into
feat/ai-srefrom
audit-fix/audit-20260722T031714Z-auto-incident-comment-safe
Jul 22, 2026
Merged

fix(skill): preserve incident comment content#96
ysyneu merged 2 commits into
feat/ai-srefrom
audit-fix/audit-20260722T031714Z-auto-incident-comment-safe

Conversation

@ysyneu

@ysyneu ysyneu commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Root cause

Audit run audit-20260722T031714Z-auto found session sess_nnZqgRwBRbo2u7YpCpLDSS constructing an incident comment inside double-quoted Bash. Markdown backticks were evaluated as command substitutions before fduty received the argument, so the API stored altered content. The workflow then reported success without reading the mutation back.

End-state fix

  • Construct multiline comments with a quoted heredoc whose fresh delimiter is absent from the intended content.
  • Require timeline read-back after every comment write before success is reported.
  • Cover literal Markdown backticks and a collision-shaped legacy delimiter line with a deterministic shell regression.

Verification

  • make GOLANGCI_LINT=/Users/ysy/go/bin/golangci-lint
  • go test -race -count=1 ./...
  • go run ./internal/cmd/skilldoc check
  • Full branch and post-PR adversarial reviews: ready, no remaining findings

The repository-cached linter was built with Go 1.24 and cannot analyze this Go 1.25.1 module; the same make target passes with the Go 1.25-built linter shown above.

@ysyneu
ysyneu merged commit 27e37c6 into feat/ai-sre Jul 22, 2026
12 checks passed
@ysyneu ysyneu mentioned this pull request Jul 22, 2026
2 tasks
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