fix: execute config commands in declaration order (#39)#40
Merged
Conversation
…ical (#39) Replace BTreeMap with IndexMap for Config.commands so commands run in the order they appear in bugatti.config.toml. Bump to v0.4.1.
There was a problem hiding this comment.
Cadence PR Review
Goal
Fix issue #39 by making config-defined commands execute in the same order they appear in bugatti.config.toml, while preserving keyed lookup and updating tests and release metadata accordingly.
| Signal | Details |
|---|---|
| Score | |
| Models | claude-opus-4-6 |
| Phases | 20% planning, 70% implementation, 10% release/update work |
Key Decisions
- The user chose the narrow fix proposed in the issue: replace
BTreeMapwith an order-preserving map rather than add naming conventions or compatibility shims. - The model propagated the map-type change across config consumers and test helpers instead of localizing it only at the execution site.
- The user and model treated this as a patch release, updating version and changelog alongside the behavioral fix.
Outcome
The model appears to have met the stated goal cleanly: command iteration now follows declaration order, and the PR includes targeted tests plus the expected release bookkeeping. There is no meaningful evidence of drift or overreach beyond the intentional type substitution needed to carry the behavior through the codebase.
If this review was useful, please react with 👍 below. Otherwise, react with 👎.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BTreeMap<String, CommandDef>withIndexMap<String, CommandDef>so config commands execute in TOML declaration order instead of alphabetical key orderindexmapdependency (already a transitive dep, zero new supply-chain cost)Closes #39
Test plan
cargo checkpassescargo test— all 207 tests pass, including 2 new order-verification testscargo clippycleancargo fmtclean