Skip to content

docs: pull our configuration guidance into STYLE_GUIDE.md - #4739

Open
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-4626
Open

docs: pull our configuration guidance into STYLE_GUIDE.md#4739
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-4626

Conversation

@chet

@chet chet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

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.

Related issues

This supports #4626

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • 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
  • No testing required (docs, internal refactor, etc.)

Validation passed with cargo make format-nightly, cargo make clippy, the cached carbide-lints --all-targets --all-features workflow, rumdl check --config docs/.rumdl.toml AGENTS.md STYLE_GUIDE.md, git diff --check, and a Pandoc HTML render.

Additional Notes

@chet
chet requested a review from a team as a code owner August 8, 2026 00:51
@chet

chet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@chet: I will perform a complete review of the pull request.

🐇

✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • Documentation
    • Added guidance on configuration ownership and precedence.
    • Documented configuration requirements, defaults, validation, activation timing, source precedence, and schema reuse.

Walkthrough

STYLE_GUIDE.md adds guidance for configuration necessity, ownership, defaults, validation, activation timing, source precedence, and schema reuse.

Changes

Configuration guidance

Layer / File(s) Summary
Configuration ownership and precedence
STYLE_GUIDE.md
Adds guidance for configuration necessity, canonical ownership, resolution behavior, omission defaults, validation timing, activation semantics, source precedence, and schema reuse.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly identifies the documentation change and names the target file, STYLE_GUIDE.md.
Description check ✅ Passed The description directly explains the configuration guidance added to STYLE_GUIDE.md and its purpose.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 86ec7af and 3c0a0c9.

📒 Files selected for processing (1)
  • STYLE_GUIDE.md

Comment thread STYLE_GUIDE.md Outdated
Comment thread 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>
@chet

chet commented Aug 8, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

@chet: I will perform a complete review of this pull request.

🐇

✅ Action performed

Full review finished.

@chet chet changed the title docs: define where each setting belongs and how it resolves docs: pull our configuration guidance into STYLE_GUIDE.md Aug 8, 2026
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.

1 participant