Skip to content

execute(value='response') and why_not(..., value='response') refuse the documented value #142

Closed

Description

@cnicholas

What happens

value='response' is in the signature and docstring of Study.execute (value: Literal['response', 'R1', …]; "None or 'response': Chart the response variable (default)"), but every chart refuses it:

study.execute(chart='Xbar', value='response')
# ChartNotAvailableError: 'Xbar' with value='response' is not valid for ADS 1.
# Valid charts for RESPONSE: None

study.why_not('Xbar', value='response')
# "'response' is not a recognized residual. Valid values: R1, R2, R3, R4, R5, R6 …"

value=None works, so callers that leave value out never see it.

Why

_validate_execute_request (processbehavior/study.py, ~2279) decides whether a value is a residual with value.upper().startswith('R'), which is true for 'RESPONSE'. The value then goes down the residual path and fails the residual pairing check. why_not and supports_calibration take the same value and refuse it the same way.

Proposed change

Normalise 'response' (any case) to None once, at the start of execute(), supports_calibration() and why_not(). _resolve_value_column already treats None as the response. Tests: value='response', 'Response' and None give identical results on Xbar, S, X and Histogram, and why_not and supports_calibration agree.

Context

Found while scoping phased limits for Xbar/S.

Activity

  1. added a commit that references this issue on Oct 14, 2026
  2. cnicholas commented on Oct 14, 2026

    @cnicholas
    OwnerAuthor

    Fixed in #145, merged to main with the 0.4.0 stack (e982d32).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions