@@ -370,22 +370,13 @@ func SetLock(ctx context.Context, deps Deps, actorUserID, issueID int64, locked |
| 370 | 370 | return nil |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | | -// renderBodyHTML wraps markdown.RenderHTML with a logger-aware error |
| 374 | | -// path. Body length is bounded upstream (orchestrator validation + |
| 375 | | -// DB CHECK at 65535), so ErrInputTooLarge is structurally impossible |
| 376 | | -// here — but if it ever fires, log loudly: it means a precondition |
| 377 | | -// somewhere upstream regressed. The audit (S00-S25, M) flagged the |
| 378 | | -// `_`-discard pattern as the kind of slop where a real bug could hide. |
| 379 | | -func renderBodyHTML(ctx context.Context, deps Deps, body string) string { |
| 380 | | - html, _ := renderBody(ctx, deps, body) |
| 381 | | - return html |
| 382 | | -} |
| 383 | | - |
| 384 | | -// renderBody is the mention-aware variant. Returns the cleaned HTML |
| 385 | | -// plus the resolved mentions list — callers that emit notification |
| 386 | | -// events use the mentions to fan out @-pings. The `_` shimming under |
| 387 | | -// renderBodyHTML keeps existing call sites that don't care about |
| 388 | | -// mentions untouched. |
| 373 | +// renderBody renders markdown to sanitized HTML and returns the |
| 374 | +// resolved mention list. Body length is bounded upstream |
| 375 | +// (orchestrator validation + DB CHECK at 65535), so |
| 376 | +// ErrInputTooLarge is structurally impossible here — but if it ever |
| 377 | +// fires, log loudly: it means a precondition somewhere upstream |
| 378 | +// regressed. Mentions feed the S29 fan-out worker via the event |
| 379 | +// payload's `mentions` array. |
| 389 | 380 | func renderBody(ctx context.Context, deps Deps, body string) (string, []mdrender.Mention) { |
| 390 | 381 | if body == "" { |
| 391 | 382 | return "", nil |