Skip to content

fix(pixel-chat): guard non-string message content in asks_display_name - #5970

Closed
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-chat-identity-multimodal-content
Closed

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-chat-identity-multimodal-content

Conversation

@Vishaaallll

Copy link
Copy Markdown
Contributor

Why this matters

In ods/extensions/services/dashboard-api/pixel_chat_identity.py, asks_display_name(messages) accesses text = messages[-1].content and immediately invokes len(text). When the last message has None content or structured multimodal content (such as a list of image/text parts), Python raises a raw TypeError: object of type 'NoneType' has no len() instead of returning False.

This surgical fix verifies isinstance(text, str) before checking length and normalizing unicode text.

Validation

  • Baseline reproduction: verified that content=None crashed with TypeError on baseline.
  • Post-fix behavior: cleanly returns False.
  • Telemetry: pixel-chat suite: 1 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5808 checked owner_namespace whitespace; zero overlap with display name message inspection.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Enforces robust content handling on identity recognition. 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