Skip to content

Comments

test(parser): add rerun stability contract for import topological order#17925

Closed
davidahmann wants to merge 1 commit intogithub:mainfrom
davidahmann:codex/issue-17923-stable-import-order
Closed

test(parser): add rerun stability contract for import topological order#17925
davidahmann wants to merge 1 commit intogithub:mainfrom
davidahmann:codex/issue-17923-stable-import-order

Conversation

@davidahmann
Copy link
Contributor

Problem

Import-derived lock output ordering can appear unstable across repeated compiles, which creates noisy lock churn and makes PR review harder.

Why now

This is active operator friction in current workflows and needs deterministic behavior for repeatable triage/replay.

What changed

Added a parser-level regression test that re-runs import processing multiple times and asserts an identical imported file order across runs.

Validation

  • go test ./pkg/parser -run TestImportTopologicalSortStableAcrossRuns (pass)

Refs #17923

@davidahmann
Copy link
Contributor Author

Implemented a focused regression contract around import topological ordering stability by rerunning the same workflow import graph multiple times and asserting identical output ordering each run.

This contribution was informed by patterns from Wrkr: https://github.com/Clyra-AI/wrkr

Copilot AI added a commit that referenced this pull request Feb 23, 2026
…job dependencies

- Add TestImportTopologicalSortStableAcrossRuns regression test from PR #17925
- Sort getCustomJobsDependingOnPreActivation result for deterministic ordering
- Sort getReferencedCustomJobs result for deterministic ordering
- Fix buildMainJob to iterate data.Jobs in sorted key order when building depends

Fixes #17923

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan pelikhan closed this Feb 23, 2026
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.

2 participants