Skip to content

RainTitle validator message claims 'alphanumeric ASCII letters and spaces' but the regex accepts all printable ASCII and rejects edge spaces #236

Closed

Description

@thedavidmeister

RainTitle's validator message (crates/cli/src/meta/types/common/v1.rs:47-53 at bba50a7) reads:

Must be alphanumeric ASCII letters and spaces.

Neither the regex nor the doc comment agrees with that message. REGEX_RAIN_TITLE (lines 21-25) is:

/// Titles in Rain are limited to printable ASCII chars and the space character.
/// The title MUST NOT begin or end with a space.
Regex::new(r"^[!-~]([ -~]*[!-~]|[!-~]*)$")

Actual accepted language: any printable ASCII (letters, digits, punctuation — "#1: hello!" is valid), interior spaces allowed, no leading/trailing space, non-empty. The message a user sees on rejection claims a much narrower contract ("alphanumeric letters and spaces") and omits the real constraints that most often trigger rejection (leading/trailing space, empty string).

Fix is a one-line message change, e.g. "Must be printable ASCII, not beginning or ending with a space." — or, if the message reflects the intended contract, the regex is too loose instead.

Found during round-2 adversarial mutation testing.

Activity

  1. added
    auditAudit finding; counted by the org health scan
    adversarialFound by adversarial review/mutation testing
    on Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    adversarialFound by adversarial review/mutation testingauditAudit finding; counted by the org health scan

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions