Skip to content

fix(pixel-agent-teams): reject unstripped whitespace in questions_valid question and options - #5807

Closed
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-agent-teams-questions-whitespace
Closed

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-agent-teams-questions-whitespace

Conversation

@Vishaaallll

Copy link
Copy Markdown
Contributor

Why this matters

In ods/extensions/services/dashboard-api/pixel_agent_teams.py, questions_valid checked 1 <= len(q["question"].strip()) <= 300 and 1 <= len(x.strip()) <= 160. While this rejected all-whitespace strings, it admitted questions and options with unstripped leading or trailing whitespace. These strings cause layout glitches and key collisions in dashboard team dialogues.

This surgical fix verifies q["question"] == q["question"].strip() and x == x.strip(), rejecting whitespace padding on questions and options.

Validation

  • Baseline reproduction: verified that questions_valid admitted " What should we do? " on baseline.
  • Post-fix behavior: properly returns False on unstripped questions and options.
  • Telemetry: pixel-agent-teams suite: 3 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5744 validated role enum types; zero overlap with questions schema validation.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Enforces string trimming in interactive team schemas. Independent review remains a gate.

Follow-up integration evidence

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

@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

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