apache / apache/texera

Python silently changes malformed port boolean values

Open
#8,239 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

The Python GlobalPortIdentity decoder treats every boolean token other than `true` as false. Malformed port metadata can therefore change the internal-port or input-port flags silently. The matching Scala decoder rejects invalid boolean tokens.

Before: malformed boolean token is decoded as false

After: malformed boolean token raises a clear value error

Expected behavior:

Only case-insensitive true and false tokens should be accepted, matching the Scala protocol decoder.

Reproduction evidence:

Decode this value on `50321e403c82df299a13deb50a7f9849dd93bdba`:

```text
(logicalOpId=op,layerName=main,portId=0,isInternal=maybe,isInput=yes)
```

Observed result:

```text
isInternal=False, isInput=False
```

Version and commit evidence:

1.3.0-incubating-SNAPSHOT (main)

**Commit Hash (Optional)**

`50321e403c82df299a13deb50a7f9849dd93bdba`

### Proposed Solution or Design

Accept only case-insensitive true and false tokens, matching the Scala decoder. Reject every other value with a clear ValueError.

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