Skip to content

fix(pixel-agent-teams): validate count range in roles_for resolution - #5734

Open
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-agent-teams-roles-count-bound
Open

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-agent-teams-roles-count-bound

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/extensions/services/dashboard-api/pixel_agent_teams.py, roles_for(count) looks up count in a dictionary mapping 1..6 directly without parameter type checking. When invoked with out-of-range integers or types such as True (which Python resolves as key 1), the function either silently behaves incorrectly or raises an unhandled KeyError instead of a standard ValueError.

This surgical fix validates that count is strictly an int (not a boolean) between 1 and 6, raising ValueError on invalid values.

Validation

  • Baseline reproduction: verified that roles_for(0) and roles_for(True) caused KeyError or unexpected single-builder resolution.
  • Post-fix behavior: cleanly raises ValueError("count must be an integer between 1 and 6").
  • Telemetry: pixel-teams suite: 2 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5722 addressed multibyte UTF-8 SSE decoding in pixel-teams; zero overlap with team role resolution.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Adds strict argument verification to internal helper. Independent review remains a gate.

Follow-up integration evidence

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

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