PCodePostProcessor converts named tuples such as:
to positional tuples:
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.
PCodePostProcessorconverts named tuples such as:(taskId = 42,)to positional tuples:
(42,)NamedTupleConstructionValidatorthen 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.pyto stop converting named tuples to positional form, and update the related tests.Acceptance criteria
NamedTupleConstructionValidatoraccepts valid named tuples.sendandnew.