docs: pull our configuration guidance into STYLE_GUIDE.md - #4739
Conversation
|
@coderabbitai full_review, thanks! |
|
🐇 ✅ Action performedFull review finished. |
Summary by CodeRabbit
WalkthroughSTYLE_GUIDE.md adds guidance for configuration necessity, ownership, defaults, validation, activation timing, source precedence, and schema reuse. ChangesConfiguration guidance
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@STYLE_GUIDE.md`:
- Around line 416-419: Clarify the guidance around configuration options so
protocol invariants remain immutable and non-configurable. For configurable
operational limits, require a non-configurable hard maximum and mandate
rejecting values outside that maximum before activation; distinguish these
bounded limits from true protocol invariants.
- Around line 421-424: Expand the configuration checklist in the relevant
STYLE_GUIDE section to require documentation of each setting’s type, accepted
values, units, bounds, interactions, invalid combinations, validation errors,
ordering, outputs, side effects, and unsupported paths, alongside the existing
omission, activation, and source-resolution requirements.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b17e8fdd-8b69-4dac-a734-f11396c9ae30
📒 Files selected for processing (1)
STYLE_GUIDE.md
This is an attempt to capture the general NICo maintainer design principles and guidance around configuration ownership for the codebase. This change is derived from the pre-OSS review corpus as a whole -- years of MRs and tens of thousands of comments and discussions. As such, it leans into the guiding design decisions and principles used to define and grow the project into the product we have today. The idea is to ensure we capture our core principles in `STYLE_GUIDE.md`. If any of those principles have changed, we should capture that too, ensuring we don't lose sight of why decisions were made as the codebase evolves with new contributors, human and agentic alike. For this change specifically, I focused on where configuration belongs and how it resolves. The search surfaced related duplicate-source, unsafe-default, hard-coded-site-value, precedence, reload, and unnecessary-knob conversations throughout the corpus and across multiple participants. This pulls out the recurring parts: - First ask whether a configuration option is necessary. - Give variable behavior one canonical owner and resolution path. - Define omission and fallback behavior, validation, precedence and conflict handling, and restart or dynamic-update behavior. - Keep site- and environment-specific values behind declared configuration instead of baking them into behavior. - Keep true protocol invariants non-configurable; tunable operational limits still have a hard, non-configurable maximum. It also keeps the important exceptions that configuration does not have one universal storage location and that some settings must be required and fail closed because no safe default exists. Files, flags, environment variables, Helm, database values, and APIs can each be the right owner; the rule is to make ownership, omission behavior, and precedence explicit instead of creating accidental parallel sources. Again, we can always adjust this now or later. The hope is that we don't lose the reasoning behind why we made certain decisions to get us where we are now, and can continue using that reasoning to help drive future decisions. This supports NVIDIA#4626 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
@coderabbitai full_review, thanks! |
|
🐇 ✅ Action performedFull review finished. |
This is an attempt to capture the general NICo maintainer design principles and guidance around configuration ownership for the codebase. This change is derived from the pre-OSS review corpus as a whole -- years of MRs and tens of thousands of comments and discussions. As such, it leans into the guiding design decisions and principles used to define and grow the project into the product we have today.
The idea is to ensure we capture our core principles in
STYLE_GUIDE.md. If any of those principles have changed, we should capture that too, ensuring we don't lose sight of why decisions were made as the codebase evolves with new contributors, human and agentic alike.For this change specifically, I focused on where configuration belongs and how it resolves. The search surfaced related duplicate-source, unsafe-default, hard-coded-site-value, precedence, reload, and unnecessary-knob conversations throughout the corpus and across multiple participants.
This pulls out the recurring parts:
It also keeps the important exceptions that configuration does not have one universal storage location and that some settings must be required and fail closed because no safe default exists. Files, flags, environment variables, Helm, database values, and APIs can each be the right owner; the rule is to make ownership, omission behavior, and precedence explicit instead of creating accidental parallel sources.
Again, we can always adjust this now or later. The hope is that we don't lose the reasoning behind why we made certain decisions to get us where we are now, and can continue using that reasoning to help drive future decisions.
Related issues
This supports #4626
Type of Change
Breaking Changes
Testing
Validation passed with
cargo make format-nightly,cargo make clippy, the cachedcarbide-lints --all-targets --all-featuresworkflow,rumdl check --config docs/.rumdl.toml AGENTS.md STYLE_GUIDE.md,git diff --check, and a Pandoc HTML render.Additional Notes