Skip to content

fix(config): accept case-insensitive boolean words - #1207

Merged
jdx merged 1 commit into
mainfrom
cursor/fix-settings-stack-9f61
Aug 22, 2026
Merged

jdx merged 1 commit into
mainfrom
cursor/fix-settings-stack-9f61

Conversation

@jdx

@jdx jdx commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

Preserve fnox's existing settings behavior while moving its registry to usage-config: boolean words from textual layers are now ASCII-case-insensitive.

Before the migration, values such as FNOX_NO_DEFAULTS=TRUE, YES, or ON were accepted. The shared resolver only accepted lowercase words, warned, and fell back to false, which could unexpectedly merge top-level secrets.

Numeric 1/0 and the existing strict rejection of unknown non-empty values are unchanged.

Test plan

  • cargo test -p usage-config
  • cargo clippy -p usage-config --all-features -- -D warnings
  • fnox settings tests against this revision

Part of preparing the fleet settings stack for the usage v6 swap.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Bug Fixes
    • Boolean configuration values now recognize standard true and false words regardless of capitalization.
    • Improved handling for mixed-case boolean values.

Co-authored-by: jdx <jdx@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 02025e7a-54d2-43a9-8145-3bed5d1cc94e

📥 Commits

Reviewing files that changed from the base of the PR and between b0e0795 and 41cbf6f.

📒 Files selected for processing (1)
  • config/src/ty.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • config/src/ty.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

Boolean coercion accepts recognized true and false words case-insensitively. Tests cover mixed- and uppercase spellings while preserving numeric and empty-string handling.

Changes

Boolean coercion

Layer / File(s) Summary
Boolean coercion and coverage
config/src/ty.rs
Boolean coercion matches true, yes, y, on, false, no, n, and off without regard to case. Tests cover mixed- and uppercase spellings.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 41cbf

This change makes textual boolean values case-insensitive while preserving numeric and unknown-value behavior; no actionable merge-blocking risk remains after normal checks and review.

Poem

A rabbit checks the words at night,
“YES” and “On” now parse just right.
“nO” and “FALSE” join the show,
While numbers keep their steady flow.
Tests hop after, ears held high.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the case-insensitive boolean word parsing change.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jdx
jdx marked this pull request as ready for review August 22, 2026 02:44
@jdx
jdx enabled auto-merge (squash) August 22, 2026 02:44
@github-actions

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
markdown ▁▁▁▁▅▅█████████ 270,596,874 → 270,682,712 +0.03% 23.46 → 23.66ms +0.88%
startup ▁▁▁▁▃▃▆▆▆▆█████ 868,282 → 868,323 +0.00% 0.93 → 0.97ms +4.15%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

Shadow comparison

Parsing mise use -g node@20 against a shadow of mise's committed spec.
Reported, not gated: the shadow grows as the derive learns to express more, so
what to watch is the ratio rather than either column.

framework instructions, cold parse vs usage
usage 8425
argh 6307 0.7x
clap 6316072 749x
bpaf 21909147 2600x
                                              min       p01       p10    median
usage-rs: argv -> struct                      422       427       431       441  ns
argh: argv -> struct                          299       305       308       319  ns
clap: build tree + parse -> struct         520890    521441    522736    525356  ns
bpaf: build parser + parse -> struct      1586334   1586334   1595807   1621211  ns

usage: argv -> struct                             487 ns      0.49 µs
clap: build tree + parse -> struct             525022 ns    525.02 µs
clap: parse -> struct, tree reused              22733 ns     22.73 µs
clap: build tree only                          323898 ns    323.90 µs

41cbf6fc9387 vs b0e079525ed4 · measured on the runner, not pushed to the history.

@jdx
jdx merged commit 8006c6f into main Aug 22, 2026
10 checks passed
@jdx
jdx deleted the cursor/fix-settings-stack-9f61 branch August 22, 2026 02:52
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.

2 participants