Skip to content

fix(pixel-settings): enforce non-empty list of supportedThinkingLevels in capabilities - #5739

Open
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-settings-empty-thinking-levels
Open

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-settings-empty-thinking-levels

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/bin/pixel_settings/contract.py, _capabilities(value) validates that supportedThinkingLevels is a list of known thinking level strings, but permits an empty list []. Every provider runtime must report at least one valid thinking level (at minimum ["off"]). An empty list causes subsequent preview checks like any(level != "off" for level in caps["supportedThinkingLevels"]) to operate over an uninitialized capability state.

This surgical fix requires len(levels) > 0, raising SettingsError("invalid-runtime-capabilities") if supportedThinkingLevels is empty.

Validation

  • Baseline reproduction: verified that supportedThinkingLevels: [] was accepted by _capabilities on baseline.
  • Post-fix behavior: raises SettingsError("invalid-runtime-capabilities") when empty.
  • Telemetry: pixel-settings suite: 2 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5723 allowed explicit thinking off when omitted; zero overlap with empty capabilities list enforcement.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Enforces provider capability declaration invariants. Independent review remains a gate.

Follow-up integration evidence

Composed locally with public-beta at 4fa6ad170 without conflicts. CI and unit checks pass.

…s in capabilities

Signed-off-by: Vishaaallll <Vishaaallll@users.noreply.github.com>
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.

1 participant