Skip to content

PeasyAI: stop converting named tuples to positional form #979

Description

@tekumara

PCodePostProcessor converts named tuples such as:

(taskId = 42,)

to positional tuples:

(42,)

NamedTupleConstructionValidator then rejects the positional form and requires named fields. This causes valid generated code to fail validation, even though it compiles successfully.

Update Src/PeasyAI/src/core/compilation/p_post_processor.py to stop converting named tuples to positional form, and update the related tests.

Acceptance criteria

  • Named tuple constructions remain unchanged during post-processing.
  • NamedTupleConstructionValidator accepts valid named tuples.
  • Existing validation tests pass.
  • Add a regression test covering named tuple payloads in send and new.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions