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
Two divergent Context implementations: src/lib.rs misses the global aisle/pantry fallback #417
pantry() diverges the same way. Documented behaviour (CLAUDE.md) is the main.rs version: ./config/, then ~/.config/cook/ or the platform equivalent.
Why it went unnoticed
The binary uses main.rs's copy, so shipped behaviour is correct. src/lib.rs exists to expose modules to the test suite, so the copy the tests exercise is the one missing the global fallback. Any test written against the lib target silently gets different configuration resolution from the binary it is meant to be testing.
Impact
Latent rather than user-facing today. The risk is that the two drift further, or that a future consumer of the lib target inherits the incomplete lookup.
Notes
Being addressed as part of extracting the commands into a library crate, where both copies are replaced by a single Context with an explicit, opt-in discover(). Filing separately because it is a pre-existing defect on main and worth recording independently of that work.
Fixed on main by the cookcli-core extraction (#434), rather than by a change filed against this issue.
There is one Context now. src/lib.rs re-exports core's instead of carrying its own copy, so there is nowhere for the two to drift:
// src/lib.rspubuse cookcli_core::Context;
The surviving definition is the one with the global fallback — local ./config/, then the platform configuration directory — so the copy the tests exercise and the copy the binary uses are now the same code.
Verified while clearing the help wanted backlog in #444; no change was needed.
Activity
dubadub commentedon Aug 14, 2026
Fixed on
mainby thecookcli-coreextraction (#434), rather than by a change filed against this issue.There is one
Contextnow.src/lib.rsre-exports core's instead of carrying its own copy, so there is nowhere for the two to drift:The surviving definition is the one with the global fallback — local
./config/, then the platform configuration directory — so the copy the tests exercise and the copy the binary uses are now the same code.Verified while clearing the
help wantedbacklog in #444; no change was needed.chore(core): add README and prepare cookcli-core for publishing