Skip to content

Optimized Python can mutate finalized tuples #8219

Description

@carloea2

Feature Summary

Tuple finalization protects its immutable schema with an assert. Optimized Python removes that guard, so a finalized tuple can be finalized again under another schema and its stored values can mutate.

Before: finalize integer tuple as binary -> value changes into pickle bytes

After: finalize an already finalized tuple -> ValueError and original value remains

Reproduction evidence:

Run optimized Python, finalize a tuple under an INTEGER schema, then finalize the same tuple under a BINARY schema.

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

optimized= True
before= 1 int
after= b'pickle ...' bytes
error_raised= False

Proposed Solution or Design

After: finalize an already finalized tuple -> ValueError and original value remains

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