Skip to content

compiler: make include manifest ordering deterministic#16096

Closed
davidahmann wants to merge 2 commits intogithub:mainfrom
davidahmann:codex/issue-16095-deterministic-header
Closed

compiler: make include manifest ordering deterministic#16096
davidahmann wants to merge 2 commits intogithub:mainfrom
davidahmann:codex/issue-16095-deterministic-header

Conversation

@davidahmann
Copy link

Problem

Lock header output can drift in non-semantic ways when IncludedFiles are emitted in input order, creating noisy diffs.

What changed

  • Canonicalized IncludedFiles rendering in workflow header generation.
  • Preserved existing topological ordering for ImportedFiles (dependency-order contract).
  • Added/updated header helper coverage to assert deterministic include ordering.

Validation

  • make fmt
  • go test ./pkg/workflow -run TestGenerateWorkflowHeader -count=1
  • go test ./pkg/workflow -run TestImportOrdering -count=1
  • make test-unit (fails in this local macOS env due unrelated baseline shell compatibility in TestGitPatch* using ${var@Q} in bash script fixtures)

Refs #16095

@davidahmann
Copy link
Author

Implemented deterministic manifest output for include entries while preserving import dependency ordering.

Scope in this PR:

  • Canonicalized IncludedFiles emission in workflow headers.
  • Kept ImportedFiles topological order intact.
  • Added regression coverage for deterministic include ordering.

This contribution was informed by patterns from Gait: https://github.com/davidahmann/gait

@pelikhan
Copy link
Contributor

Could you merge main?

@pelikhan
Copy link
Contributor

Restarted in #16138

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants