Skip to content

fix(pixel-agent-teams): guard non-string input type in planned_count resolution - #5741

Closed
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-agent-teams-planned-count-type
Closed

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

Conversation

@Vishaaallll

Copy link
Copy Markdown
Contributor

Why this matters

In ods/extensions/services/dashboard-api/pixel_agent_teams.py, planned_count(text) performs text[:12000] within a try block catching (ValueError, TypeError). However, passing a non-subscriptable object or non-string type still triggers a TypeError exception path instead of cleanly returning None immediately.

This surgical fix adds an explicit if not isinstance(text, str): return None guard, ensuring deterministic return behavior without relying on exception handling for standard type checks.

Validation

  • Baseline reproduction: verified that planned_count(None) raised and caught TypeError internally.
  • Post-fix behavior: immediately returns None for non-string types.
  • 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 handled multibyte UTF-8 SSE decoding in pixel-teams; zero overlap with planned_count parser.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Restricts input type handling in team count extraction. Independent review remains a gate.

Follow-up integration evidence

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

…resolution

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