Skip to content

State byte markers can overwrite user dictionaries #8213

Description

@carloea2

Feature Summary

State deserialization treats any user dictionary whose internal type marker equals bytes as Texera's byte envelope. Ordinary user state can therefore be converted into bytes and lose additional fields during a JSON round trip.

Before: user dictionary with reserved-looking keys -> decoded as bytes and fields are lost

After: user dictionary with marker key -> escaped dictionary envelope -> original mapping is restored

Reproduction evidence:

Round-trip nested state containing the keys texera_type, payload, and owner, with the type value set to bytes.

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

Commit Hash

70c2114

What browsers are you seeing the problem on?

Not browser-specific.

Relevant log output

decoded= {'config': b'hello'}
round_trip_equal= False

Proposed Solution or Design

After: user dictionary with marker key -> escaped dictionary envelope -> original mapping is restored

Affected Area

Workflow Engine (Amber)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions