Require opt-in for scale and normalization overrides - #8
Merged
Conversation
tmusser
marked this pull request as ready for review
August 16, 2026 23:38
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.
What changed
usermeta.user_requested_scale_override=trueis explicitly declaredusermeta.user_requested_normalization=trueis explicitly declaredscale.zero=falseon quantitative barsaudit_spec()API and CLI gate through the policy wrapperWhy
AI chart generators can introduce cropped axes or normalized/100%-stacked values as an aesthetic default even when the user never asked to change the frame of reference. The chart may remain technically valid while frustrating the user or changing the apparent magnitude and units of the result.
This PR makes the default contract simple: preserve the user's original scale and units unless the user explicitly requested a transformation.
The authorization metadata is only a deterministic declaration boundary; it does not prove the user actually made the request, and agents are explicitly instructed not to add it merely to obtain a passing audit.
Behavior
PASSBLOCKPASSstack: "normalize"without declaration ->BLOCKPASSBLOCK, including explicit numeric domains that exclude zeroValidation
Local execution was unavailable because the container could not resolve GitHub. CI is the executable gate for this draft PR.
Focused coverage is in:
tests/test_spec_policy.pytests/test_cli_visual_defaults.pyNo new runtime dependency or chart intent is introduced.