Skip to content

Conversation

@iHiD
Copy link
Member

@iHiD iHiD commented Feb 9, 2026

Closes #8486
Closes #8487

Summary

  • Replaced String#% with gsub-based interpolation in Submission::Analysis#comments for rendering analyzer comment templates
  • Missing template variables (like %{mentoring_request_url}) now default to empty string instead of raising KeyError
  • %% escape sequences are still correctly converted to literal %
  • This eliminates Sentry noise from analyzers referencing template params they don't provide

Test plan

  • Added test for comment hash with missing params -- verifies no exception and comment is still rendered
  • All 26 existing analysis tests pass (including %% escaping tests)

🤖 Generated with Claude Code

Replace String#% with gsub-based interpolation that defaults missing
template keys to empty string instead of raising KeyError. This
prevents noisy Sentry alerts when analyzer templates reference params
not provided in the analysis output.

Closes #8486
Closes #8487

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iHiD iHiD merged commit 769f831 into main Feb 9, 2026
41 checks passed
@iHiD iHiD deleted the fix/8487 branch February 9, 2026 20:47
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.

KeyError: key{mentoring_request_url} not found (KeyError) KeyError: key{mentoring_request_url} not found (KeyError)

1 participant