Skip to content

fix: execute config commands in declaration order (#39)#40

Merged
codesoda merged 1 commit intomainfrom
fix/declaration-order-commands
Apr 9, 2026
Merged

fix: execute config commands in declaration order (#39)#40
codesoda merged 1 commit intomainfrom
fix/declaration-order-commands

Conversation

@codesoda
Copy link
Copy Markdown
Owner

@codesoda codesoda commented Apr 9, 2026

Summary

  • Replace BTreeMap<String, CommandDef> with IndexMap<String, CommandDef> so config commands execute in TOML declaration order instead of alphabetical key order
  • Add indexmap dependency (already a transitive dep, zero new supply-chain cost)
  • Add tests verifying declaration-order execution and TOML deserialization order
  • Bump version to v0.4.1, update CHANGELOG

Closes #39

Test plan

  • cargo check passes
  • cargo test — all 207 tests pass, including 2 new order-verification tests
  • cargo clippy clean
  • cargo fmt clean

…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.
Copy link
Copy Markdown
Owner Author

@codesoda codesoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@codesoda codesoda marked this pull request as ready for review April 9, 2026 13:16
Copy link
Copy Markdown

@cadence cadence bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 A tight requirement match with solid verification
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 BTreeMap with 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 👎.

@codesoda codesoda merged commit f101bc7 into main Apr 9, 2026
1 check passed
@codesoda codesoda deleted the fix/declaration-order-commands branch April 9, 2026 13:20
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.

Config commands execute in alphabetical key order instead of declaration order

1 participant