Skip to content

fix(pixel-agent-teams): validate string types for owner and team_id in TeamStore path - #5973

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

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

Conversation

@Vishaaallll

Copy link
Copy Markdown
Contributor

Why this matters

In ods/extensions/services/dashboard-api/pixel_agent_teams.py, TeamStore._path(self, owner, team_id) passes owner and team_id directly to re.fullmatch(). When non-string arguments (such as None or integers) are passed, Python raises a raw TypeError: expected string or bytes-like object instead of raising the documented ValueError("Invalid team identity").

This surgical fix verifies isinstance(owner, str) and isinstance(team_id, str) before regex matching in _path.

Validation

  • Baseline reproduction: verified that _path(123, "0"*32) raised TypeError on baseline.
  • Post-fix behavior: properly raises ValueError("Invalid team identity").
  • Telemetry: pixel-agent-teams suite: 1 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5807 handled questions whitespace; zero overlap with TeamStore path type validation.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Enforces type checking on agent team path resolution. Independent review remains a gate.

Follow-up integration evidence

Composed locally with public-beta at 6a408cc85 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