Skip to content

fix(pixel-edge): reject trailing hyphens in public_status reason validation - #5748

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

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

Conversation

@Vishaaallll

Copy link
Copy Markdown

Why this matters

In ods/extensions/services/pixel-edge/access_mode.py, public_status(value) validates status reasons against r'[a-z][a-z0-9-]{0,95}'. This pattern permits strings with trailing hyphens (e.g. transition-failed-), which do not conform to canonical status tokens.

This surgical fix tightens the regex to r'[a-z](?:[a-z0-9-]{0,94}[a-z0-9])?', rejecting trailing hyphens while supporting all standard hyphenated status reasons.

Validation

  • Baseline reproduction: verified that "transition-failed-" was admitted on baseline.
  • Post-fix behavior: raises ValueError on trailing-hyphen reasons.
  • 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 #5737 validated compaction reason trailing hyphens; zero overlap with public access mode status.

Risk / AI disclosure

AI-assisted investigation, patch, and regression tests. Enforces status reason naming standards. Independent review remains a gate.

Follow-up integration evidence

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

…dation

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