Skip to content

fix(pixel-chat): validate sequence number type in chunk retrieval - #5733

Open
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-chat-chunks-sequence-type
Open

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-chat-chunks-sequence-type

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/extensions/services/dashboard-api/pixel_chat_results.py, ChatResultStore.chunks(self, key, after=-1) binds after directly into a parameterized SQL sequence > ? condition. If an invalid type like a boolean (True/False), string, or float is passed, SQLite type coercion can cause unexpected comparison behavior or query failure.

This surgical fix validates that after is strictly an int (and not a boolean subclass), raising ValueError on malformed inputs.

Validation

  • Baseline reproduction: verified that store.chunks(..., after=True) executed without parameter type validation.
  • Post-fix behavior: raises ValueError("after sequence must be an integer") on booleans, strings, or floats.
  • Telemetry: pixel-chat suite: 2 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5704 touched stream chunk parsing; zero overlap with SQLite sequence index queries.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Strictly guards query parameter types. 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