apache / apache/texera

State byte markers can overwrite user dictionaries

Open
#8,213 1 comment 0 reactions 1 assignee Claimed by @carloea2 View on GitHub
Dominant language
Scala
Stars
314
Forks
187
Avg merge
1d 21h
Merged PRs (30d)
214

Description

### 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**

70c21145887920528d7d5540e3fb790b43e8b759

**What browsers are you seeing the problem on?**

Not browser-specific.

**Relevant log output**

```text
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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.