You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
doctor validate reports recipes in non-deterministic order #427
Rust's default HashMap hasher is seeded randomly per process, so iteration order differs between invocations. The walk emits each recipe's 📄 {path} header in whatever order it encounters them.
Impact
Output cannot be diffed between runs, so it is hard to tell whether a change to a recipe collection improved or worsened anything.
Anything comparing doctor validate output in CI is inherently flaky.
Repeated runs while fixing recipes shuffle the list, which is disorienting when working through a large collection.
Only visible with more than one recipe carrying errors or warnings, which is likely why it has gone unnoticed.
Suggested direction
Sort by path before reporting. Directory listing order is not a meaningful contract, and a stable order makes the output diffable.
Noticed while extracting doctor validate into a library crate. The extraction sorts by path — a library returning results in random order is worse than a CLI doing so — so this is fixed on that branch as a side effect. Filing separately because it is a pre-existing defect on main and worth recording independently of whether that branch lands.
Fixed on main by the cookcli-core extraction (#434), rather than by a change filed against this issue — the extraction sorts by path, since a library returning results in random order is worse than a CLI doing so.
The order is by code point rather than alphabetical, so a capitalised name sorts before every lowercase one; that is pinned by a test and noted in the docs. Confirmed while clearing the help wanted backlog in #444; no change was needed.
Activity
fix(shopping-list): order quantity components deterministically
dubadub commentedon Aug 14, 2026
Fixed on
mainby thecookcli-coreextraction (#434), rather than by a change filed against this issue — the extraction sorts by path, since a library returning results in random order is worse than a CLI doing so.Verified on three recipes carrying errors — five consecutive runs, identical each time:
The order is by code point rather than alphabetical, so a capitalised name sorts before every lowercase one; that is pinned by a test and noted in the docs. Confirmed while clearing the
help wantedbacklog in #444; no change was needed.