Skip to content

The runner calls BYTES reserved, so six corpus cases refuse to load #37

Closed

Description

@tamnd

At conformance/values.py:97 the runner says:

_RESERVED = ("DECIMAL", "BYTES")

with the comment that these are "the types the encoding reserves a name for and the engine has no runtime value for yet". That was true when it was written and is no longer true of BYTES. The Rust corpus crate lists it as a real readable type at crates/zu-corpus/src/value.rs:164:

("BYTES", Form::Text),

and parses one at line 415 with zu_common::bytes::from_hexits. The engine gained the value in tamnd/zu#543.

So the shared suite now has BYTES cases the Python runner cannot read. In conformance/cases/string.yaml there are ten expected columns of type: BYTES across six cases, starting at line 962 with

RETURN X00AB00 AS b

and running through the empty literal, the hexit case that checks upper and lower spell the same value, and the TRIM, BTRIM, LTRIM and RTRIM cases. Every one of them is refused at load rather than run, and refused with the wrong reason: the message says the engine has no runtime value for the type, when what is actually missing is this client's reader.

What it needs is the same shape the other types have: BYTES joins the readable types with the text form, since a case spells it as hexits, and the reader turns those hexits into the Python value the client hands back for a byte string. DECIMAL stays reserved, which is the point of keeping the two apart.

Worth checking at the same time whether the comparison path handles it, because the case at line 995 asserts that X'0041' = 'A' is not true, and a reader that decoded octets into a str somewhere would pass that case for the wrong reason.

Activity

  1. added a commit that references this issue on Aug 24, 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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions