Audit cleanup: drop mustache, remove dead code, shrink helpers#34
Merged
Conversation
|
|
||
| def render_template(path, vars) | ||
| Mustache.render(template_cache(path), template_vars.merge(vars)) | ||
| ERB.new(template_cache(path), trim_mode: '-').result_with_hash(template_vars.merge(vars)) |
There was a problem hiding this comment.
[Critical] ERB#result_with_hash is not a standard Ruby method — will raise NoMethodError at runtime
The code calls ERB.new(...).result_with_hash(...), but result_with_hash does not exist in Ruby's standard ERB library. The ERB API provides result(binding) and result_with_binding(binding), neither of which accept a plain Hash. This appears to be a direct copy-paste adaptation from the previous Mustache API (Mustache.render(template, hash)) without accounting for ERB's different rendering model. This will cause a NoMethodError at runtime whenever review or verify is called.
Tags: bug, compatibility
Collaborator
Author
There was a problem hiding this comment.
If it wasn't, you wouldn't have run, friend.
sunitajennings
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mustachegem in favor of stdlibERBfor prompt templates — one less runtime dependency, same<%= %>substitution and conditional blocks.IssueIdGenerator, the unusedsummarygeneration path (PromptBuilder#summary, the summary template,summary_requirementsconfig var, andReport#summary+ its renderer branches), the unreadmention_triggers/collapse_previous_code_review_commentsconfig flags, the one-lineLlmClient#completedelegator, redundantrequire 'set'(autoloaded since Ruby 3.2), and a redundantAffectedRange#initializeoverride.apply_string_overrides, collapsesReviewer#parse_responsehelpers, simplifies the CLIrepo_owner/repo_namehelpers, and updates the architecture docs (AGENTS.md / CLAUDE.md) to reference ERB.Test plan
bundle exec rake— RuboCop clean (46 files), RSpec 115 examples, 0 failures.Gemfile.lockno longer referencesmustache.Notes
IO::Buffer is experimentalwarning duringreviewer_specis pre-existing (emitted by theasyncgem during the parallel review); it is not introduced by the ERB migration.