Skip to content

The REGEXP declaration gate refuses LINK but the write path matches a pattern against it, so the same link passes or fails depending on its string form #9992

Closed

Description

@ruispereira

Summary

The declaration gate and the write path disagree about LINK. The gate says a LINK has no text form that
a pattern could describe and refuses the declaration; the write path matches a pattern against a LINK
anyway, against the raw value's toString().

The consequence is that the same link passes or fails depending on how it was produced:

  • written as #1:0, it matches.
  • written as a selected record, whose string form is #1:0[n=0], it does not.

Reachability

This is reachable only on a schema written before the #9808 rule, since the gate refuses the
declaration today. That is precisely the population the warn on load branch exists to serve, so it is
not an unreachable case: an existing database carrying such a property loads, warns, and then validates
inconsistently.

The OrientDB importer already handles the refusal correctly, which is the useful contrast: one consumer
of this concept got it right.

Suggested fix

Make the write path agree with the gate: a pattern on a LINK should either be refused consistently, or
be matched against a defined, documented string form rather than whatever toString() happens to
produce for the particular object the value arrived as. Matching against toString() means the result
depends on the in memory representation rather than on the stored value, which is the underlying defect
regardless of which way the disagreement is resolved.

Related

One of three places that independently decide which pairs of type and pattern are valid, alongside
#9990 and #9991. The durable fix is a single authority the three consult, which would make this
disagreement unrepresentable rather than merely corrected.

Scope

Reproduced at 8564d3ad79. Low severity: it needs a pre existing schema to reach.

Activity

  1. added
    engine
    severity:minor
    on Oct 13, 2026
  2. added
    in progress
    on Oct 14, 2026
  3. self-assigned this
    on Oct 14, 2026
  4. added this to the 26.11.1 milestone on Oct 14, 2026
  5. added a commit that references this issue on Oct 14, 2026
  6. lvca commented on Oct 14, 2026

    @lvca
    Member

    Fixed in #10011 (release 26.11.1).

    A REGEXP on a LINK property is now always matched against the RID of the linked record (for example #12:0), however the link was written, so the same link always gives the same result. When declared, a pattern that fits a RID ('#12:.*') is accepted and the others are refused.

    For schemas created with older versions: a REGEXP still stored on a BINARY, LIST, MAP, EMBEDDED or ARRAY_OF_* property now refuses writes with a message explaining how to remove it (ALTER PROPERTY ... REGEXP null), instead of being matched against an internal text.


    ❤️ Thanks for helping make ArcadeDB better! ArcadeDB is free and open source, sustained by its community. If it's useful to you or your company, please consider becoming a sponsor to keep development going.

  7. removed
    in progress
    on Oct 14, 2026
  8. added a commit that references this issue on Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugengineseverity:minor

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions