Skip to content

Stabilize compile output ordering for imported workflow fragments #17923

@davidahmann

Description

@davidahmann

Lock-file diffs become noisy and hard to review when compile output ordering changes for equivalent imported workflow graphs.

Current behavior is insufficient because include/import traversal order can shift emitted lock content without semantic workflow changes, obscuring real risk changes in PR review.

Why now: composed workflows are now common in operator usage and this non-functional churn is recurring friction.

Claim-to-codepath map:

  • Read path: parser include/import traversal and manifest assembly in pkg/parser and pkg/manifest.
  • Write path: lock serialization and compile output emission in pkg/compiler.

Requested behavior: preserve semantic ordering while producing byte-stable lock output for unchanged inputs across repeated compiles.

Evidence Packet

  • Commit under test: 42d9b66
  • Runtime environment:
    • OS: Darwin 25.3.0 arm64
    • Python 3.14.0
    • go version go1.25.7 darwin/arm64
    • Node: v22.19.0
  • Minimal repro:
    1. Follow the repo's current local validation/CI-triage path.
    2. Observe the behavior described above for this issue.
  • Expected behavior: deterministic, documented behavior matching acceptance criteria below.
  • Actual behavior: behavior can be inconsistent for the scenario described above.

Acceptance Criteria

  • Implement the smallest code change that addresses the proven pain point.
  • Add focused regression test coverage for the changed behavior.
  • Ensure backward compatibility expectations are explicit in tests/docs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions