Skip to content

A14-37: WhenFirstHit.R: unanchored regex produces spurious stage labels when a name merely contains the pattern #120

Description

@ms609

R/WhenFirstHit.R:31-33gsub(pattern, "\\1", ...) is not anchored, so a tree/replicate name that merely contains the stage pattern (rather than matching it as a whole segment) keeps surrounding text in the extracted label, producing a spurious/garbled stage name instead of a clean one.

Verified REAL (haiku verifier, code-read).

Fix: anchor the regex (e.g. with ^/$ or word boundaries) so it matches the intended segment only.

Filed by /red-team area 14 (opus finder, 2026-08-05).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:14Red-team focus area 14in-progressBeing fixed; claiming comment names the branchred-teamFiled by the /red-team rotationsev:lowP3: robustness / polish

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions