Skip to content

feat(config): add renderingEnabledSupplier to disable rendering - #1344

Merged
jasmith-hs merged 1 commit into
masterfrom
jasmith_hubspot/config-disable-rendering
Oct 17, 2026
Merged

jasmith-hs merged 1 commit into
masterfrom
jasmith_hubspot/config-disable-rendering

Conversation

@jasmith-hs

Copy link
Copy Markdown
Contributor

Description

Adds a renderingEnabledSupplier (Supplier<Boolean>) to JinjavaConfig so that consumers can turn off rendering for a Jinjava instance, for example as a kill switch, without rebuilding it. The supplier is checked every time rendering starts in JinjavaInterpreter. When it doesn't return true, a RenderingDisabledException is thrown, and Jinjava#renderForResult turns it into a FATAL DISABLED template error.

This description was authored by Claude Code.

BRAVE

Backwards Compatibility

  • Defaults to () -> true, so existing behavior is unchanged
  • Additive API only: a new config option, a new exception and a new TemplateError factory

Rollout and Rollback Plan

  • Opt-in via JinjavaConfig.newBuilder().withRenderingEnabledSupplier(...)
  • Rollback by reverting; nothing persisted

Automated Testing

  • New RenderingEnabledSupplierTest covering the default setting, rendering on and off, the renderForResult error shape, render throwing, toggling between renders, and the direct interpreter entry points
  • mvnd clean verify passes

Verification

  • Covered by unit tests

Expect Dependencies to Fail

  • N/A, library change with a no-op default
REVIEWERS: Please review both the code changes and the answers above, and validate that they match the expectations for BRAVE

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jasmith-hs jasmith-hs self-assigned this Oct 17, 2026
@jasmith-hs
jasmith-hs marked this pull request as ready for review October 17, 2026 11:19
@jasmith-hs
jasmith-hs merged commit 0eb936c into master Oct 17, 2026
7 checks passed
@jasmith-hs
jasmith-hs deleted the jasmith_hubspot/config-disable-rendering branch October 17, 2026 15:19
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.

2 participants