Skip to content

[BUG] [v0.0.7] cortex dag graph --output ascii renders children in non-deterministic order — HashMap iteration causes scrambled task listing #53517

@andrirevo

Description

@andrirevo

Project

cortex

Description

cortex dag graph --output ascii renders child tasks in a non-deterministic order that changes between runs. When a root task has 10 children (Child0-Child9), they appear scrambled (e.g., Child6, Child5, Child4, Child3, Child1, Child8...) instead of in definition order or alphabetical order.

Error Message

N/A

Debug Logs

N?A

System Information

Cortex CLI v0.0.7
OS: macOS Darwin 25.3.0

Screenshots

https://github.com/springoliver/bounty_challenge_report_image/blob/main/cortex001.png

Steps to Reproduce

  1. Create a DAG with one root and 10 children (Child0 through Child9), all depending on Root
  2. Run cortex dag graph --file dag.json --output ascii
  3. Observe children appear in scrambled order (not alphabetical, not definition order)
  4. Run again — order may change between runs

Expected Behavior

Children should be rendered in a stable, predictable order — either alphabetical by name or in definition order from the DAG file.

Actual Behavior

Children appear in random order determined by internal HashMap iteration. The order is: Child6, Child5, Child4, Child3, Child1, Child8, Child9, Child0, Child7, Child2 — neither alphabetical nor by definition.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions