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 continues the style-guide series from #4608, #4648, #4739, and #4641, with more to come._ This is an attempt to capture the general NICo maintainer design principles and guidance around external-I/O and async-capacity boundaries 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 external I/O and async admission.** The search through previous reviews surfaced discussions related to: - Request deadlines and transport timeouts. - Long-lived stream cancellation and liveness. - Retry safety and backoff behavior. - Task spawning and queue growth. - Backpressure and overload handling. This pulls out the recurring parts: - Give each external I/O attempt that should finish an intentional client-side deadline. - Make cancellation propagation, error mapping, retry safety/backoff, and observability explicit. - Bound retry work within each reconciliation iteration and any enclosing caller deadline. - Bound active and pending work and define what happens on overload. - Give long-lived streams explicit cancellation, liveness detection, and loss handling. - Document the invariant or nonblocking control-path reason when a channel is deliberately unbounded. It also keeps the important exceptions for deliberately long-lived operations, protocol-derived timeout values, nonblocking lifecycle and control paths, and producers whose outstanding work is already provably bounded. I don't want to fix one missing rule by accidentally outlawing something NICo does on purpose. 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 #4622 ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [x] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [ ] **This PR contains breaking changes** ## Testing - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [x] No testing required (docs, internal refactor, etc.) ## Additional Notes Validated with `cargo make format-nightly`, `cargo make clippy`, the cached Carbide-lints workflow, `rumdl`, `git diff --check`, and a Pandoc render. No tests were run because this is a documentation-only change. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
_This continues the style-guide series from NVIDIA#4608, NVIDIA#4648, NVIDIA#4739, and NVIDIA#4641, with more to come._ This is an attempt to capture the general NICo maintainer design principles and guidance around external-I/O and async-capacity boundaries 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 external I/O and async admission.** The search through previous reviews surfaced discussions related to: - Request deadlines and transport timeouts. - Long-lived stream cancellation and liveness. - Retry safety and backoff behavior. - Task spawning and queue growth. - Backpressure and overload handling. This pulls out the recurring parts: - Give each external I/O attempt that should finish an intentional client-side deadline. - Make cancellation propagation, error mapping, retry safety/backoff, and observability explicit. - Bound retry work within each reconciliation iteration and any enclosing caller deadline. - Bound active and pending work and define what happens on overload. - Give long-lived streams explicit cancellation, liveness detection, and loss handling. - Document the invariant or nonblocking control-path reason when a channel is deliberately unbounded. It also keeps the important exceptions for deliberately long-lived operations, protocol-derived timeout values, nonblocking lifecycle and control paths, and producers whose outstanding work is already provably bounded. I don't want to fix one missing rule by accidentally outlawing something NICo does on purpose. 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 NVIDIA#4622 ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [x] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [ ] **This PR contains breaking changes** ## Testing - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [x] No testing required (docs, internal refactor, etc.) ## Additional Notes Validated with `cargo make format-nightly`, `cargo make clippy`, the cached Carbide-lints workflow, `rumdl`, `git diff --check`, and a Pandoc render. No tests were run because this is a documentation-only change. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
_This continues the style-guide series from #4608, #4648, #4739, #4641, and #4783 This is the `STYLE_GUIDE.md` half of the state-controller durability guidance from #4623. **Transactions cannot make external side effects atomic.** State-controller work that crosses database and external-system boundaries needs a durable recovery point, must avoid holding database transactions open across external I/O, and needs fencing, idempotency, or reconciliation when work can repeat or overlap. The short rule has its own scan point beside the existing long-running work-lock contract and links to the repository's current state-handling page for controller-model background. The detailed `docs/architecture/state_handling.md` refresh is in #4867 so it can move through the technical-writer queue separately. ## Related issues This supports #4623 Documentation companion: #4867 ## Type of Change - [ ] **Add** - New feature or capability - [ ] **Change** - Changes in existing functionality - [ ] **Fix** - Bug fixes - [ ] **Remove** - Removed features or deprecated functionality - [x] **Internal** - Internal changes (refactoring, tests, docs, etc.) ## Breaking Changes - [ ] **This PR contains breaking changes** ## Testing - [ ] Unit tests added/updated - [ ] Integration tests added/updated - [ ] Manual testing performed - [x] No testing required (docs, internal refactor, etc.) ## Additional Notes Validated with `cargo make format-nightly`, `cargo make clippy`, the cached Carbide-lints workflow, `rumdl`, `git diff --check`, and a Pandoc render. No tests were run because this is a documentation-only change. Signed-off-by: Chet Nichols III <chetn@nvidia.com>
This continues the series from #4641, #4608, #4648, (and related to #4522), with more to come.
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 through previous reviews surfaced discussions related to:
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
Additional Notes
Closes #4626