Skip to content

fix(pixel-edge): reject leading or trailing hyphens in compaction reason pattern - #5737

Open
Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-edge-compaction-reason-pattern
Open

Vishaaallll wants to merge 1 commit into
Osmantic:public-betafrom
Vishaaallll:fix/pixel-edge-compaction-reason-pattern

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/extensions/services/pixel-edge/chat_context.py, project_context validates compaction reasons against r"^[a-z][a-z0-9-]*$". This regex permits trailing hyphens (e.g. overflow-), which violate the canonical hyphenated identifier schema used across Pixel telemetry and dashboard event routing.

This surgical fix tightens the pattern to r"^[a-z](?:[a-z0-9-]{0,94}[a-z0-9])?$", rejecting trailing hyphens while maintaining complete compatibility with single-character and hyphenated reason strings.

Validation

  • Baseline reproduction: verified that "overflow-" was accepted on baseline.
  • Post-fix behavior: raises ValueError("invalid compaction detail") for trailing-hyphen reason strings.
  • Telemetry: pixel-edge suite: 2 passed. New-test syntax and diff checks pass; new regression wired into Linux CI.

Overlap check

Inspected open/closed PRs. PR #5730 touched route fingerprint normalization; zero overlap with compaction reason parsing.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Normalizes compaction identifier syntax. Independent review remains a gate.

Follow-up integration evidence

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

…son pattern

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