Skip to content

fix(containers): preserve declared output types - #344

Draft
laipz8200 wants to merge 1 commit into
mainfrom
laipz8200/preserve-container-output-types
Draft

laipz8200 wants to merge 1 commit into
mainfrom
laipz8200/preserve-container-output-types

Conversation

@laipz8200

Copy link
Copy Markdown
Member

Important

  1. Make sure you have read our contribution guidelines
  2. Search existing issues and pull requests to confirm this change is not a duplicate
  3. Open or identify the issue this pull request resolves or advances
  4. Use a Conventional Commits title for this pull request, and mark breaking changes with !
  5. Remember that the pull request title will become the squash merge commit message
  6. If CLA Assistant prompts you, sign CLA.md in the pull request conversation

Related Issue

Refs #198

Also addresses the empty file output regression reported in Dify.

Summary

Container completion currently turns explicitly typed empty arrays into plain lists, so the parent variable pool infers array[any]. Preserve declared segment types through container requests, saved runtime state, completion, and loop variable updates. Normalize child variables to plain segments before rebinding them in the parent, retaining the existing secret-to-string conversion.

Keep loop and iteration progress-event outputs as plain values while their completion results retain the runtime types needed by the engine.

Checklist

  • This pull request links the issue it resolves or advances
  • This pull request title follows Conventional Commits, and any breaking change is marked with !
  • If CLA Assistant prompted me, I signed CLA.md in the pull request conversation

Preserve serializable Segment declarations when normalizing container
values instead of inferring types from their raw values. Normalize
variable subclasses to bare segments so outputs bind to their owning
container selectors.

Carry typed outputs through completion and loop reconciliation while
keeping inputs and Loop/Iteration presentation values unwrapped. Retain
declared loop-variable types during initialization.

Document the container value contract and cover live completion, runtime
snapshots, selector ownership, and the real Loop execution path.

Refs #198

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant