refactor: standardize error messages on the Rust API guidelines#3566
Conversation
|
@coderabbitai full_review, thanks! |
|
✅ Action performedFull review finished. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Summary by CodeRabbit
WalkthroughThis PR adds a ChangesError message casing normalization and enforcement tooling
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CI as CI workflow
participant Makefile as Makefile task
participant Xtask as xtask CLI
participant Checker as error_message_case::check
CI->>Makefile: run lint-error-messages
Makefile->>Xtask: invoke lint-error-messages
Xtask->>Checker: scan and optionally fix Rust literals
Checker-->>Xtask: return CheckOutcome
Xtask-->>CI: report pass or failure
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ast-grep (0.44.1)crates/api-web/src/lib.rsast-grep timed out on this file Comment |
|
Tip For best results, initiate chat on the files or code changes.
ヽ(•‿•)ノ |
There was a problem hiding this comment.
Actionable comments posted: 7
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/api-core/src/attestation/measured_boot.rs (1)
169-175: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the path-conversion error message.
This
to_str()failure is reported as a path-join failure, andseession_key_pathis misspelled. Use an accurate message such ascould not convert session_key_path to str.Proposed fix
- "could not join seession_key_path".to_string(), + "could not convert session_key_path to str".to_string(),🤖 Prompt for 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. In `@crates/api-core/src/attestation/measured_boot.rs` around lines 169 - 175, Update the CarbideError message in the session_key_path.to_str() conversion within the measured-boot flow to accurately describe string conversion, correcting the misspelled path name; use wording equivalent to “could not convert session_key_path to str” while leaving the path construction unchanged.
🟡 Minor comments (21)
crates/api-web/src/lib.rs-418-418 (1)
418-418: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winKeep the authentication error grammatical.
The period after
supportedmakes the following sentence begin with lowercaseuse. Replace it with a semicolon so the operator-facing guidance remains clear.As per path instructions, API-facing error messages should remain actionable and clear.
Proposed fix
- "{AUTH_TYPE_ENV}=basic is not supported. use \"none\" (default; secure the UI with network controls or an auth proxy) or \"oauth2\" (SSO via entra)" + "{AUTH_TYPE_ENV}=basic is not supported; use \"none\" (default; secure the UI with network controls or an auth proxy) or \"oauth2\" (SSO via entra)"🤖 Prompt for 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. In `@crates/api-web/src/lib.rs` at line 418, Update the authentication error message in the visible unsupported AUTH_TYPE_ENV branch by replacing the period after “not supported” with a semicolon, keeping the existing actionable guidance and option text unchanged.Source: Path instructions
crates/dhcp-server/src/errors.rs-60-67 (1)
60-67: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve the actual failure type in these messages.
PacketEncodeFailureandAddressParseErrorboth render as"utf8 decoding failure", so encoding and address-parse failures are reported as decoding errors. Use messages that identify packet encoding and address parsing respectively; otherwise operators and tests cannot reliably distinguish the failure cause.🤖 Prompt for 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. In `@crates/dhcp-server/src/errors.rs` around lines 60 - 67, Update the error annotations for PacketEncodeFailure and AddressParseError in the error enum so their messages identify packet encoding and address parsing respectively, while leaving PacketDecodeFailure’s decoding message unchanged.crates/ipmi/src/tool.rs-65-67 (1)
65-67: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the credential error-message typo.
credentilasis emitted to operators and may be asserted by tests; change it tocredentials.Proposed fix
- eyre!("secret engine getting credentilas for key {credential_key:#?}: {e:#?}") + eyre!("secret engine getting credentials for key {credential_key:#?}: {e:#?}")🤖 Prompt for 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. In `@crates/ipmi/src/tool.rs` around lines 65 - 67, Correct the typo in the error message within the credential lookup error mapping: change “credentilas” to “credentials” while preserving the existing credential key and underlying error details.crates/machine-controller/src/handler.rs-4767-4767 (1)
4767-4767: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the
paramterstypo.Line 4767 still emits
paramters; change it toparametersbefore exposing this error to operators.Proposed fix
- "poorly configured paramters: next_potential_reboot_time: {}, entered_state_at: {}, wait_period: {}", + "poorly configured parameters: next_potential_reboot_time: {}, entered_state_at: {}, wait_period: {}",🤖 Prompt for 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. In `@crates/machine-controller/src/handler.rs` at line 4767, Correct the typo in the error message near the reboot timing diagnostics by changing “paramters” to “parameters”; preserve the existing placeholders and logging behavior.crates/machine-controller/src/handler.rs-8604-8605 (1)
8604-8605: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the credentials error grammar.
Line 8604 uses plural
credentialswith singularexists; useexist(or change the noun to singular).Proposed fix
- "no BMC credentials exists" + "no BMC credentials exist"🤖 Prompt for 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. In `@crates/machine-controller/src/handler.rs` around lines 8604 - 8605, Update the credentials error message in the surrounding handler code to use grammatically correct agreement: retain the plural “credentials” and change “exists” to “exist,” or make the noun singular.crates/machine-validation/src/errors.rs-21-22 (1)
21-22: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse idiomatic wording for the config-read failure.
"unable to config read: {0}"is grammatically awkward. Since this PR already rewrites the message, change it to"unable to read config: {0}".Proposed wording
- #[error("unable to config read: {0}")] + #[error("unable to read config: {0}")]🤖 Prompt for 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. In `@crates/machine-validation/src/errors.rs` around lines 21 - 22, Update the #[error] message for ConfigFileRead in the error enum to use the idiomatic wording “unable to read config: {0}”, preserving the existing error variant and interpolation.crates/network/src/lib.rs-96-96 (1)
96-96: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winClose the formatted error message.
The string at Line 96 opens an
(beforeinputbut never closes it, producing malformed diagnostics.Proposed fix
- MacAddress::from_str(&sanitized_mac).map_err(|e| eyre::eyre!("failed to initialize MacAddress from sanitized MAC: {} (input: {}, stripped: {}, sanitized: {}", e, input_mac, stripped_mac, sanitized_mac)) + MacAddress::from_str(&sanitized_mac).map_err(|e| eyre::eyre!("failed to initialize MacAddress from sanitized MAC: {} (input: {}, stripped: {}, sanitized: {})", e, input_mac, stripped_mac, sanitized_mac))🤖 Prompt for 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. In `@crates/network/src/lib.rs` at line 96, Correct the formatted error message in the MacAddress::from_str call by closing the parenthesis opened before the input details, while preserving the existing error and MAC value context.crates/rpc/src/errors.rs-57-60 (1)
57-60: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winNormalize the
IdentifierSpecifiedForNewObjectmessage.Line 58 still starts with uppercase
A, and the second clause begins with lowercasewhenafter a period. Rewrite it as one lowercase phrase to satisfy the error-message convention and avoid malformed user-facing output.As per coding guidelines, error Display messages must be lowercase phrases without trailing periods.
Proposed fix
- "A unique identifier was specified for a new object. when creating a new object of type {0}, do not specify an identifier" + "a unique identifier was specified for a new object; do not specify an identifier when creating a new object of type {0}"🤖 Prompt for 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. In `@crates/rpc/src/errors.rs` around lines 57 - 60, Update the Display text for IdentifierSpecifiedForNewObject to be a single lowercase phrase, correcting the capitalization and sentence break while preserving the identifier and object-type details; do not add a trailing period.Source: Coding guidelines
crates/agent/src/health.rs-490-490 (1)
490-490: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winAlign the diagnostic with the parser’s actual validation.
The message says the level line needs a single colon, but
split(':').nth(1)accepts multiple colons and silently returns the second field. Either reject extra separators or change the message to describe the actual requirement.🤖 Prompt for 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. In `@crates/agent/src/health.rs` at line 490, Update the validation and diagnostic in the level-line parsing logic around the eyre::bail call so they agree: either reject lines containing extra colon separators, or revise the message to state that at least the required field is present. Preserve the parser’s intended handling of valid level lines.crates/api-core/src/errors.rs-122-125 (1)
122-125: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winLowercase this display message.
Line 123 still starts with “A” and has no
// xtask:allow-error-caseexception, so it violates the newly enforced error-message convention.Proposed fix
- "A unique identifier was specified for a new object. when creating a new object of type {0}, do not specify an identifier" + "a unique identifier was specified for a new object. when creating a new object of type {0}, do not specify an identifier"As per coding guidelines, “Error Display messages must be lowercase phrases without trailing periods.”
🤖 Prompt for 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. In `@crates/api-core/src/errors.rs` around lines 122 - 125, Update the display string for IdentifierSpecifiedForNewObject to begin with lowercase “a”, preserving the existing wording and ensuring it remains a lowercase phrase without a trailing period.Source: Coding guidelines
crates/api-core/src/handlers/credential.rs-129-129 (1)
129-129: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse grammatical wording for the DPU UEFI reset error.
"not support to reset DPU UEFI credential"is malformed and inconsistent with the Host UEFI message. Replace it with"resetting the DPU UEFI credential is not supported".🤖 Prompt for 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. In `@crates/api-core/src/handlers/credential.rs` at line 129, Update the DPU UEFI reset error message in the credential handler to use the exact grammatical wording “resetting the DPU UEFI credential is not supported,” matching the Host UEFI message style.crates/api-core/src/handlers/extension_service.rs-487-488 (1)
487-488: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the plural wording in this client-facing error.
Use plural agreement and identify what must be detached:
- "one or more extension service version is in use by instances; detach before deleting" + "one or more extension service versions are in use by instances; detach them before deleting"🤖 Prompt for 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. In `@crates/api-core/src/handlers/extension_service.rs` around lines 487 - 488, Update the client-facing error message in the extension deletion handler to use plural agreement and explicitly state that the extension service versions must be detached before deletion.crates/api-core/src/handlers/ib_partition.rs-82-83 (1)
82-83: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse clearer wording for the partition-limit error.
“maximum limit” is redundant, and “had been reached” is unnecessarily indirect:
- "maximum limit of infiniband partitions had been reached" + "maximum number of InfiniBand partitions has been reached"🤖 Prompt for 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. In `@crates/api-core/src/handlers/ib_partition.rs` around lines 82 - 83, Update the partition-limit error message in the Infiniband partition handler to use concise, direct wording, replacing the redundant “maximum limit” and indirect “had been reached” phrasing while preserving the existing error behavior.crates/api-core/src/handlers/machine_validation.rs-375-375 (1)
375-375: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winPreserve acronyms in normalized error messages.
The changed literals lowercase
ID/URL, conflicting with the PR’s stated acronym-preservation contract and creating inconsistent API error vocabulary.
crates/api-core/src/handlers/machine_validation.rs#L375-L375: usevalidation IDandmachine ID.crates/api-core/src/handlers/machine_validation.rs#L990-L990: usevalidation ID.crates/api-core/src/handlers/managed_host.rs#L387-L387: usereference URL.🤖 Prompt for 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. In `@crates/api-core/src/handlers/machine_validation.rs` at line 375, Preserve acronym capitalization in the normalized error messages: update the machine validation messages at crates/api-core/src/handlers/machine_validation.rs:375-375 to use “validation ID” and “machine ID”, update crates/api-core/src/handlers/machine_validation.rs:990-990 to use “validation ID”, and update crates/api-core/src/handlers/managed_host.rs:387-387 to use “reference URL”.crates/api-core/src/handlers/machine_interface.rs-55-55 (1)
55-55: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUse “parse,” not “marshall,” in this error message.
IpAddr::from_strparses the request value; “marshall” is misleading and misspelled in this context.Proposed wording
- "could not marshall an IP from the request".to_string(), + "could not parse an IP address from the request".to_string(),🤖 Prompt for 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. In `@crates/api-core/src/handlers/machine_interface.rs` at line 55, Update the error message in the IP address parsing path using IpAddr::from_str to say “parse” instead of “marshall,” correcting the terminology and spelling while preserving the existing error-handling behavior.crates/api-core/src/handlers/managed_host.rs-375-375 (1)
375-375: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRewrite this validation message as one clear phrase.
"DPU ID provided. need managed host"is grammatically incorrect after the casing change.- "DPU ID provided. need managed host".to_string(), + "DPU ID provided; a managed host ID is required".to_string(),🤖 Prompt for 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. In `@crates/api-core/src/handlers/managed_host.rs` at line 375, Update the validation message in the managed-host handler to use one clear, grammatically correct phrase, preserving its meaning that a managed host is required when a DPU ID is provided.crates/api-core/src/handlers/managed_host.rs-394-394 (1)
394-394: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winDescribe the validation that is actually performed.
This branch only trims the value and checks that its length is at least five; it does not validate that the reference is semantically valid.
- "provide some valid reference. minimum expected length is 5".into(), + "reference must contain at least 5 characters".into(),🤖 Prompt for 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. In `@crates/api-core/src/handlers/managed_host.rs` at line 394, Update the validation error message in the managed-host reference validation branch to describe the actual checks performed: trimming the value and requiring a minimum length of five characters. Remove the claim that the input must be a semantically valid reference.crates/api-core/src/handlers/power_options.rs-161-161 (1)
161-161: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the user-facing typo in both MAC-address errors.
supliedshould besupplied.Also applies to: 223-223
🤖 Prompt for 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. In `@crates/api-core/src/handlers/power_options.rs` at line 161, Correct the user-facing typo from “suplied” to “supplied” in both MAC-address error messages within the relevant handler, including the errors at both referenced locations.crates/api-core/src/handlers/power_options.rs-110-110 (1)
110-110: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the classification spelling consistently. The implementation uses
suppress_external_alerting(), but both the production error and its integration assertion spell the classification asSupressExternalAlerting.
crates/api-core/src/handlers/power_options.rs#L110-L110: change the user-facing token toSuppressExternalAlerting.crates/api-core/tests/integration/power_options.rs#L113-L116: update the expected error message to match.🤖 Prompt for 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. In `@crates/api-core/src/handlers/power_options.rs` at line 110, Correct the classification token from “SupressExternalAlerting” to “SuppressExternalAlerting” in the production error in crates/api-core/src/handlers/power_options.rs:110 and the matching expected assertion in crates/api-core/tests/integration/power_options.rs:113-116, keeping both messages consistent with suppress_external_alerting().crates/xtask/src/error_message_case.rs-439-489 (1)
439-489: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve case-sensitive identifiers during auto-fix.
The fixer lowercases exact path-like names, causing diagnostics to name a different file on case-sensitive systems.
crates/xtask/src/error_message_case.rs#L439-L489: exempt exact path-like identifiers from blanket word lowercasing.crates/xtask/src/workspace_deps.rs#L31-L31: restoreCargo.toml.crates/xtask/src/workspace_deps.rs#L271-L271: restoreCargo.toml.🤖 Prompt for 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. In `@crates/xtask/src/error_message_case.rs` around lines 439 - 489, Exempt exact path-like identifiers from lowercase_words so case-sensitive names such as Cargo.toml retain their original casing while ordinary prose words continue to be normalized. In crates/xtask/src/workspace_deps.rs lines 31 and 271, restore the affected Cargo.toml references; both sibling sites require direct restoration.crates/xtask/src/error_message_case.rs-339-349 (1)
339-349: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winSelect the message argument by constructor.
visit_expr_callalways inspectsnode.args.first(), sotonic::Status::new(code, message)is checked against the status code instead of the user-facing message. Dispatch on the constructor name and read the message position for eachStatusvariant.🤖 Prompt for 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. In `@crates/xtask/src/error_message_case.rs` around lines 339 - 349, Update visit_expr_call to select the inspected argument based on the constructor name instead of always using node.args.first(). For tonic::Status constructors, map each Status variant to its user-facing message argument position, then pass that argument to leading_str_lit and self.inspect while preserving the existing owner filtering.
🧹 Nitpick comments (2)
crates/ipmi/src/tool.rs (1)
91-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAvoid cloning
machine_idfor formatting.The error-formatting arguments can borrow
machine_id; both clones are unnecessary.Proposed fix
- machine_id.clone(), + machine_id, ... - .ok_or_else(|| eyre!("no credentials for machine {} found", machine_id.clone()))?; + .ok_or_else(|| eyre!("no credentials for machine {} found", machine_id))?;As per coding guidelines, avoid needless clones by borrowing or moving values where possible.
🤖 Prompt for 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. In `@crates/ipmi/src/tool.rs` around lines 91 - 95, Update the error formatting in the credential lookup flow to borrow machine_id instead of cloning it in both the “secret engine error” and “no credentials” messages. Preserve the existing error text and behavior while removing the unnecessary clones.Source: Coding guidelines
crates/xtask/src/error_message_case.rs (1)
581-707: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMake the checker tests table-driven and enumerate every supported surface.
Use
check_values/value_scenarios!for helper mappings andcheck_cases/scenarios!for attributes, macros, context methods, opt-outs, and constructor variants. This would expose coverage gaps such as differingStatusargument positions.As per coding guidelines, “use table-driven tests for functions mapping inputs to outputs or errors”; the matching path instruction prefers scenarios or direct case/value tables for grouped Rust variants.
🤖 Prompt for 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. In `@crates/xtask/src/error_message_case.rs` around lines 581 - 707, The checker tests are currently organized as individual assertions and do not systematically cover all supported syntax surfaces. Refactor the tests around helpers such as is_capitalized_word, lowercase_words, strip_trailing_period, and fix_literal to use check_values/value_scenarios!, and organize attribute, macro, context-method, opt-out, and constructor-variant coverage with check_cases/scenarios!. Include cases for each supported variant, especially differing Status argument positions, while preserving the existing expected outcomes.Sources: Coding guidelines, Path instructions
🤖 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 `@crates/agent/src/util.rs`:
- Around line 368-371: Update the error message in the btime lookup flow near
btime_value parsing to begin with a lowercase letter, while preserving its
meaning and keeping it as a period-free phrase.
In `@crates/api-core/src/handlers/dpu.rs`:
- Around line 1284-1285: Update the restart validation error in the DPU handler
to use one lowercase, punctuation-free phrase, preserving the existing meaning
that restarts require all DPUs and only a host ID is accepted.
In `@crates/api-model/src/machine/mod.rs`:
- Around line 239-240: Update the HealthAlert error message in the health_report
error enum to begin with lowercase “a health alert...”, preserving the existing
wording and interpolation while keeping the message free of a trailing period.
In `@crates/api-test-helper/src/instance.rs`:
- Around line 375-378: Update the eyre::bail! message in the instance state-wait
error path to use a valid Rust string literal, keeping the message content
intact while removing the unescaped source newline or replacing it with an
appropriate escaped newline/raw-string form.
In `@crates/state-controller/src/controller.rs`:
- Around line 149-150: Update the Panic variant’s #[error] message in the
controller error enum from “A task panicked: {0}” to the lowercase “a task
panicked: {0}”, preserving the existing formatting placeholder.
In `@crates/state-controller/src/controller/processor.rs`:
- Around line 590-591: Update the Panic variant’s #[error] message in the
relevant error enum to start with lowercase, changing the text from “A task
panicked: {0}” to “a task panicked: {0}”.
In `@crates/xtask/src/error_message_case.rs`:
- Around line 81-92: Update the Rust-file scanning flow around the walk loop,
std::fs::read_to_string, and syn::parse_file to fail closed on traversal, read,
and parse errors instead of discarding them or only incrementing skipped. Report
the affected path and return a nonzero failure for both initial and post-fix
scans, ensuring a successful lint result only occurs after the complete tree is
checked.
---
Outside diff comments:
In `@crates/api-core/src/attestation/measured_boot.rs`:
- Around line 169-175: Update the CarbideError message in the
session_key_path.to_str() conversion within the measured-boot flow to accurately
describe string conversion, correcting the misspelled path name; use wording
equivalent to “could not convert session_key_path to str” while leaving the path
construction unchanged.
---
Minor comments:
In `@crates/agent/src/health.rs`:
- Line 490: Update the validation and diagnostic in the level-line parsing logic
around the eyre::bail call so they agree: either reject lines containing extra
colon separators, or revise the message to state that at least the required
field is present. Preserve the parser’s intended handling of valid level lines.
In `@crates/api-core/src/errors.rs`:
- Around line 122-125: Update the display string for
IdentifierSpecifiedForNewObject to begin with lowercase “a”, preserving the
existing wording and ensuring it remains a lowercase phrase without a trailing
period.
In `@crates/api-core/src/handlers/credential.rs`:
- Line 129: Update the DPU UEFI reset error message in the credential handler to
use the exact grammatical wording “resetting the DPU UEFI credential is not
supported,” matching the Host UEFI message style.
In `@crates/api-core/src/handlers/extension_service.rs`:
- Around line 487-488: Update the client-facing error message in the extension
deletion handler to use plural agreement and explicitly state that the extension
service versions must be detached before deletion.
In `@crates/api-core/src/handlers/ib_partition.rs`:
- Around line 82-83: Update the partition-limit error message in the Infiniband
partition handler to use concise, direct wording, replacing the redundant
“maximum limit” and indirect “had been reached” phrasing while preserving the
existing error behavior.
In `@crates/api-core/src/handlers/machine_interface.rs`:
- Line 55: Update the error message in the IP address parsing path using
IpAddr::from_str to say “parse” instead of “marshall,” correcting the
terminology and spelling while preserving the existing error-handling behavior.
In `@crates/api-core/src/handlers/machine_validation.rs`:
- Line 375: Preserve acronym capitalization in the normalized error messages:
update the machine validation messages at
crates/api-core/src/handlers/machine_validation.rs:375-375 to use “validation
ID” and “machine ID”, update
crates/api-core/src/handlers/machine_validation.rs:990-990 to use “validation
ID”, and update crates/api-core/src/handlers/managed_host.rs:387-387 to use
“reference URL”.
In `@crates/api-core/src/handlers/managed_host.rs`:
- Line 375: Update the validation message in the managed-host handler to use one
clear, grammatically correct phrase, preserving its meaning that a managed host
is required when a DPU ID is provided.
- Line 394: Update the validation error message in the managed-host reference
validation branch to describe the actual checks performed: trimming the value
and requiring a minimum length of five characters. Remove the claim that the
input must be a semantically valid reference.
In `@crates/api-core/src/handlers/power_options.rs`:
- Line 161: Correct the user-facing typo from “suplied” to “supplied” in both
MAC-address error messages within the relevant handler, including the errors at
both referenced locations.
- Line 110: Correct the classification token from “SupressExternalAlerting” to
“SuppressExternalAlerting” in the production error in
crates/api-core/src/handlers/power_options.rs:110 and the matching expected
assertion in crates/api-core/tests/integration/power_options.rs:113-116, keeping
both messages consistent with suppress_external_alerting().
In `@crates/api-web/src/lib.rs`:
- Line 418: Update the authentication error message in the visible unsupported
AUTH_TYPE_ENV branch by replacing the period after “not supported” with a
semicolon, keeping the existing actionable guidance and option text unchanged.
In `@crates/dhcp-server/src/errors.rs`:
- Around line 60-67: Update the error annotations for PacketEncodeFailure and
AddressParseError in the error enum so their messages identify packet encoding
and address parsing respectively, while leaving PacketDecodeFailure’s decoding
message unchanged.
In `@crates/ipmi/src/tool.rs`:
- Around line 65-67: Correct the typo in the error message within the credential
lookup error mapping: change “credentilas” to “credentials” while preserving the
existing credential key and underlying error details.
In `@crates/machine-controller/src/handler.rs`:
- Line 4767: Correct the typo in the error message near the reboot timing
diagnostics by changing “paramters” to “parameters”; preserve the existing
placeholders and logging behavior.
- Around line 8604-8605: Update the credentials error message in the surrounding
handler code to use grammatically correct agreement: retain the plural
“credentials” and change “exists” to “exist,” or make the noun singular.
In `@crates/machine-validation/src/errors.rs`:
- Around line 21-22: Update the #[error] message for ConfigFileRead in the error
enum to use the idiomatic wording “unable to read config: {0}”, preserving the
existing error variant and interpolation.
In `@crates/network/src/lib.rs`:
- Line 96: Correct the formatted error message in the MacAddress::from_str call
by closing the parenthesis opened before the input details, while preserving the
existing error and MAC value context.
In `@crates/rpc/src/errors.rs`:
- Around line 57-60: Update the Display text for IdentifierSpecifiedForNewObject
to be a single lowercase phrase, correcting the capitalization and sentence
break while preserving the identifier and object-type details; do not add a
trailing period.
In `@crates/xtask/src/error_message_case.rs`:
- Around line 439-489: Exempt exact path-like identifiers from lowercase_words
so case-sensitive names such as Cargo.toml retain their original casing while
ordinary prose words continue to be normalized. In
crates/xtask/src/workspace_deps.rs lines 31 and 271, restore the affected
Cargo.toml references; both sibling sites require direct restoration.
- Around line 339-349: Update visit_expr_call to select the inspected argument
based on the constructor name instead of always using node.args.first(). For
tonic::Status constructors, map each Status variant to its user-facing message
argument position, then pass that argument to leading_str_lit and self.inspect
while preserving the existing owner filtering.
---
Nitpick comments:
In `@crates/ipmi/src/tool.rs`:
- Around line 91-95: Update the error formatting in the credential lookup flow
to borrow machine_id instead of cloning it in both the “secret engine error” and
“no credentials” messages. Preserve the existing error text and behavior while
removing the unnecessary clones.
In `@crates/xtask/src/error_message_case.rs`:
- Around line 581-707: The checker tests are currently organized as individual
assertions and do not systematically cover all supported syntax surfaces.
Refactor the tests around helpers such as is_capitalized_word, lowercase_words,
strip_trailing_period, and fix_literal to use check_values/value_scenarios!, and
organize attribute, macro, context-method, opt-out, and constructor-variant
coverage with check_cases/scenarios!. Include cases for each supported variant,
especially differing Status argument positions, while preserving the existing
expected outcomes.
🪄 Autofix (Beta)
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: a08112be-fc50-472d-be6f-d3f83bf64ba5
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (270)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
There was a problem hiding this comment.
Actionable comments posted: 6
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
crates/log-parser/src/carbide_reporting.rs (1)
367-371:⚠️ Potential issue | 🟠 MajorLowercase the remaining
btimeerror message.Line 368 still starts with
Couldn't, so the newlint-error-messagesgate will reject this line. Change it to"couldn't find btime line in /proc/stat".Proposed fix
- .ok_or_eyre("Couldn't find btime line in /proc/stat")?; + .ok_or_eyre("couldn't find btime line in /proc/stat")?;🤖 Prompt for 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. In `@crates/log-parser/src/carbide_reporting.rs` around lines 367 - 371, Lowercase the remaining btime error message in the /proc/stat parsing path, changing its initial “Couldn't” capitalization to “couldn't” while preserving the rest of the message and behavior.Source: Coding guidelines
♻️ Duplicate comments (1)
crates/api-test-helper/src/instance.rs (1)
375-378: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winFix the multiline string literal before merging.
The normal Rust string literal is split across a source newline at Lines 376-377, which causes a compile error. Encode the newline as
\nor use a raw string.Proposed fix
eyre::bail!( - "even after {MAX_WAIT:?} time, {instance_id} did not reach state {target_state}\n - latest state: {latest_state}" + "even after {MAX_WAIT:?} time, {instance_id} did not reach state {target_state}\n\ +latest state: {latest_state}" );🤖 Prompt for 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. In `@crates/api-test-helper/src/instance.rs` around lines 375 - 378, Update the error message string in the eyre::bail! call to avoid splitting a normal Rust string literal across a source newline; encode the line break as \n while preserving the existing message content and interpolation.
🟡 Minor comments (19)
crates/network/src/lib.rs-96-96 (1)
96-96: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRestore the closing parenthesis in the error message.
The rewritten format string ends after
sanitized: {}but does not render the closing)implied by the opening(input: ...), producing malformed diagnostics when parsing fails.Proposed fix
- MacAddress::from_str(&sanitized_mac).map_err(|e| eyre::eyre!("failed to initialize MacAddress from sanitized MAC: {} (input: {}, stripped: {}, sanitized: {}", e, input_mac, stripped_mac, sanitized_mac)) + MacAddress::from_str(&sanitized_mac).map_err(|e| eyre::eyre!("failed to initialize MacAddress from sanitized MAC: {} (input: {}, stripped: {}, sanitized: {})", e, input_mac, stripped_mac, sanitized_mac))🤖 Prompt for 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. In `@crates/network/src/lib.rs` at line 96, Update the error format string in the MacAddress::from_str call to include the missing closing parenthesis after the sanitized MAC value, keeping the existing diagnostic fields and error propagation unchanged.crates/api-core/src/attestation/measured_boot.rs-174-174 (1)
174-174: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winCorrect the path-conversion diagnostics.
These branches fail during
Path::to_str(), not during joining. Also fix the typo inseession_key_path. Use messages such ascould not convert session_key_path to strandcould not convert cred_out_path to str.Also applies to: 191-195
🤖 Prompt for 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. In `@crates/api-core/src/attestation/measured_boot.rs` at line 174, Update the path-conversion error messages in the measured-boot flow to describe `Path::to_str()` failures rather than joining failures. Correct the `seession_key_path` typo and use path-specific diagnostics such as converting `session_key_path` and `cred_out_path` to str, including the branches around the referenced locations.crates/agent/src/tests/full.rs-357-357 (1)
357-357: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep the timeout diagnostic consistent with the actual deadline.
Line 355 waits 60 seconds, but this error reports 30 seconds. Update the message to
60sor derive it from a shared timeout constant.🤖 Prompt for 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. In `@crates/agent/src/tests/full.rs` at line 357, Update the timeout diagnostic in the test assertion around the health report wait to report 60s, matching the actual 60-second deadline. Prefer a shared timeout constant if one already exists; otherwise change the message text from 30s to 60s.crates/dhcp-server/src/errors.rs-60-67 (1)
60-67: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep wrapped error messages specific to their variants.
PacketEncodeFailureandAddressParseErrorare both rendered asutf8 decoding failure, so production diagnostics identify the wrong failure type. Use distinct messages for packet decoding, packet encoding, and address parsing.Proposed fix
- #[error("utf8 decoding failure: {0}")] + #[error("packet decode failure: {0}")] PacketDecodeFailure(#[from] dhcproto::error::DecodeError), - #[error("utf8 decoding failure: {0}")] + #[error("packet encode failure: {0}")] PacketEncodeFailure(#[from] dhcproto::error::EncodeError), - #[error("utf8 decoding failure: {0}")] + #[error("address parse failure: {0}")] AddressParseError(#[from] AddrParseError),🤖 Prompt for 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. In `@crates/dhcp-server/src/errors.rs` around lines 60 - 67, Update the #[error] messages on PacketDecodeFailure, PacketEncodeFailure, and AddressParseError in the error enum so each identifies its specific operation: packet decoding, packet encoding, or address parsing. Preserve the wrapped error formatting while replacing the duplicated “utf8 decoding failure” text with variant-appropriate messages.crates/api-web/src/lib.rs-418-418 (1)
418-418: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep the
Entraproduct name capitalized.Only the sentence-leading
useshould be lowercased; retainEntra(or useMicrosoft Entra) in the operator-facing error.Suggested correction
- "{AUTH_TYPE_ENV}=basic is not supported. use \"none\" (default; secure the UI with network controls or an auth proxy) or \"oauth2\" (SSO via entra)" + "{AUTH_TYPE_ENV}=basic is not supported. use \"none\" (default; secure the UI with network controls or an auth proxy) or \"oauth2\" (SSO via Entra)"As per coding guidelines, preserve intentional presentation formatting when changing it would alter behavior.
🤖 Prompt for 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. In `@crates/api-web/src/lib.rs` at line 418, Update the operator-facing AUTH_TYPE_ENV error message to retain the product name capitalization as “Entra” (or “Microsoft Entra”), while keeping only the sentence-leading “use” lowercase. Preserve the existing supported-authentication guidance and wording otherwise.Source: Coding guidelines
crates/ipmi/src/tool.rs-65-66 (1)
65-66: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the
credentialstypo.The new error message spells
credentialsascredentilas, which will appear in operator-facing diagnostics.Proposed fix
- eyre!("secret engine getting credentilas for key {credential_key:#?}: {e:#?}") + eyre!("secret engine getting credentials for key {credential_key:#?}: {e:#?}")🤖 Prompt for 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. In `@crates/ipmi/src/tool.rs` around lines 65 - 66, Correct the misspelled “credentilas” text in the eyre error message within the credential retrieval flow, preserving the existing credential_key and underlying error details.crates/api-core/src/handlers/extension_service.rs-487-488 (1)
487-488: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the plural agreement in the delete error message.
“One or more extension service version is” should use plural agreement: “one or more extension service versions are”.
Suggested wording
- "one or more extension service version is in use by instances; detach before deleting" + "one or more extension service versions are in use by instances; detach before deleting"🤖 Prompt for 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. In `@crates/api-core/src/handlers/extension_service.rs` around lines 487 - 488, Update the delete error message in the extension service handler to use plural agreement: change “one or more extension service version is” to “one or more extension service versions are,” while preserving the rest of the message.crates/api-core/src/handlers/attestation.rs-266-266 (1)
266-266: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReport the actual missing AK public key.
This branch is reached when the database query succeeds but returns
None; it does not indicate that SQL construction failed. The misleading message will send operators toward the wrong failure mode.Proposed fix
- "could not form SQL query to fetch AK pub".into(), + "no AK public key found for credential".into(),🤖 Prompt for 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. In `@crates/api-core/src/handlers/attestation.rs` at line 266, Update the error message in the missing AK public-key branch of the attestation handler to report that the database returned no AK public key, rather than claiming SQL query construction failed. Keep the existing handling and error flow unchanged.crates/api-core/src/handlers/credential.rs-115-115 (1)
115-115: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winPreserve the
URLacronym.The normalized message lowercases
URLtourl, despite the PR objective requiring acronyms to remain preserved. Use"missing UFM URL"in both create and delete paths.Proposed fix
- return Err(CarbideError::InvalidArgument("missing UFM url".to_string()).into()); + return Err(CarbideError::InvalidArgument("missing UFM URL".to_string()).into());Based on the PR objective, acronyms should remain preserved during error-message normalization.
Also applies to: 325-325
🤖 Prompt for 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. In `@crates/api-core/src/handlers/credential.rs` at line 115, Update the InvalidArgument messages in both the create and delete paths to use the exact text “missing UFM URL”, preserving the uppercase URL acronym instead of “missing UFM url”.crates/api-core/src/handlers/dpf.rs-41-41 (1)
41-41: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse one canonical DPF validation message.
modify_dpf_stateandget_dpf_statestill return"only host id is expected!!", whileget_dpf_host_snapshotreturns"only host id is expected". Normalize the first two branches to the punctuation-free form so equivalent API failures have identical text.Proposed fix
- return Err(CarbideError::InvalidArgument("only host id is expected!!".to_string()).into()); + return Err(CarbideError::InvalidArgument("only host id is expected".to_string()).into());As per coding guidelines, error messages should be lowercase phrases without trailing periods.
Based on the PR objective, equivalent normalized errors should retain one canonical representation.Also applies to: 82-82
🤖 Prompt for 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. In `@crates/api-core/src/handlers/dpf.rs` at line 41, Normalize the invalid-argument message in the DPF validation branches of modify_dpf_state and get_dpf_state to the canonical punctuation-free text “only host id is expected”, matching get_dpf_host_snapshot. Remove the trailing exclamation marks while preserving the existing error type and control flow.Source: Coding guidelines
crates/api-core/src/handlers/credential.rs-129-129 (1)
129-129: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winFix the DPU UEFI reset message grammar.
"not support to reset DPU UEFI credential"is ungrammatical and inconsistent with the host variant. Use"resetting the DPU UEFI credential is not supported"for a clear client-facing error.🤖 Prompt for 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. In `@crates/api-core/src/handlers/credential.rs` at line 129, Update the DPU UEFI reset error message in the credential handler to exactly state that resetting the DPU UEFI credential is not supported, matching the host variant’s grammar and preserving the existing error behavior.crates/api-core/src/handlers/power_options.rs-76-76 (1)
76-76: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winUse an error that describes missing power options.
When
current_power_state.first()isNone, this message incorrectly says that only a host ID is expected—the DPU validation already occurred above. Return a message such aspower options not found for machineso operators receive the correct diagnosis.🤖 Prompt for 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. In `@crates/api-core/src/handlers/power_options.rs` at line 76, Update the error returned when current_power_state.first() is None to describe missing power options for the machine, replacing the misleading host-ID validation message while preserving the existing error type and control flow.crates/api-core/src/handlers/power_options.rs-161-162 (1)
161-162: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the
supliedtypo in both MAC-address errors.Change
no MAC address supliedtono MAC address supplied.Also applies to: 223-224
🤖 Prompt for 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. In `@crates/api-core/src/handlers/power_options.rs` around lines 161 - 162, Correct the misspelled “suplied” text in both MAC-address errors within the relevant handler, including the occurrences near the current error and the additional location, so each message reads “no MAC address supplied”.crates/api-db/src/lib.rs-364-367 (1)
364-367: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winCorrect the concurrent-modification message grammar.
The message is missing a conjunction:
was intended to be modified did not have. Since this string is already being changed, make it readwas intended to be modified but did not have.Proposed wording
- "an object of type {0} was intended to be modified did not have the expected version {1}" + "an object of type {0} was intended to be modified but did not have the expected version {1}"🤖 Prompt for 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. In `@crates/api-db/src/lib.rs` around lines 364 - 367, Update the #[error] message for ConcurrentModificationError to insert “but” between “modified” and “did not have,” preserving the rest of the wording and placeholders.crates/agent/src/ethernet_virtualization.rs-1733-1739 (1)
1733-1739: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winPreserve acronyms and CamelCase identifiers during normalization.
The fixer lowercased tokens that are part of the documented Rust/domain vocabulary.
crates/agent/src/ethernet_virtualization.rs#L1733-L1739: keepFDBuppercase in the diagnostic.crates/agent/src/ethernet_virtualization.rs#L3589-L3590: keep the Rust identifierUuid::try_fromunchanged.🤖 Prompt for 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. In `@crates/agent/src/ethernet_virtualization.rs` around lines 1733 - 1739, Preserve documented Rust/domain vocabulary during normalization: in the diagnostic around vlan_fdb validation, keep the acronym “FDB” uppercase, and at the Uuid::try_from site leave the Rust identifier’s CamelCase unchanged. Apply the fix at both referenced locations in ethernet_virtualization.rs.Source: Coding guidelines
crates/api-core/src/tests/common/metadata.rs-38-38 (1)
38-38: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winRemove the trailing period from the expected error.
This test still expects
Label key cannot be empty.with a trailing period, contradicting C-GOOD-ERR and likely mismatching the normalized validator output.Proposed fix
- "invalid value: Label key cannot be empty.".to_string(), + "invalid value: Label key cannot be empty".to_string(),🤖 Prompt for 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. In `@crates/api-core/src/tests/common/metadata.rs` at line 38, Update the expected error string in the metadata test to remove the trailing period from “Label key cannot be empty”, matching the normalized validator output and C-GOOD-ERR.Source: Coding guidelines
crates/machine-controller/src/handler.rs-8604-8609 (1)
8604-8609: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the plural agreement in the credential error.
credentialsis plural, so the message should sayexist, notexists.Proposed fix
- "no BMC credentials exists" + "no BMC credentials exist"🤖 Prompt for 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. In `@crates/machine-controller/src/handler.rs` around lines 8604 - 8609, Update the error message in the Err(e) branch handling BMC credential retrieval to use the grammatically correct phrase “no BMC credentials exist,” preserving the surrounding StateHandlerError and eyre behavior.crates/machine-controller/src/handler.rs-4767-4767 (1)
4767-4767: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winFix the
paramterstypo.This operator-facing error is already being rewritten by the fixer; correct
paramterstoparameters.Proposed fix
- "poorly configured paramters: next_potential_reboot_time: {}, entered_state_at: {}, wait_period: {}", + "poorly configured parameters: next_potential_reboot_time: {}, entered_state_at: {}, wait_period: {}",🤖 Prompt for 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. In `@crates/machine-controller/src/handler.rs` at line 4767, Correct the operator-facing error message near the reboot timing fields by changing the misspelled word “paramters” to “parameters”; leave the remaining message and behavior unchanged.crates/machine-controller/src/handler.rs-7556-7557 (1)
7556-7557: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winPreserve acronym casing in the normalized error text.
The PR objective explicitly preserves acronyms, but this message now renders
DPU IDasdpu id. Keep the established operator-facing spelling.Proposed fix
- "could not find primary dpu id" + "could not find primary DPU ID"🤖 Prompt for 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. In `@crates/machine-controller/src/handler.rs` around lines 7556 - 7557, Update the normalized error text in the handler’s “could not find primary dpu id” message to preserve the operator-facing acronym casing as “DPU ID.” Keep the surrounding error construction and wording unchanged.
🤖 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 `@crates/agent/src/extension_services/k8s_pod_handler.rs`:
- Line 216: Update systemctl_restart and crictl_output to log subprocess stderr
internally, then return stable sanitized errors without embedding raw stderr. In
get_service_status, ensure the propagated
DpuExtensionServiceStatusObservation.message uses only the sanitized error and
never exposes crictl output details.
In `@crates/agent/src/network_monitor.rs`:
- Around line 633-641: Update parse_ping_stdout to parse summary_line and
success_count before consuming or requiring the RTT line. Return the existing
zero-success result immediately when success_count is 0, and only parse rtt_line
and its RTT values when success_count > 0.
In `@crates/agent/src/util.rs`:
- Around line 267-270: Lowercase the initial word of every remaining error
message in the affected btime error-handling branches, including the message
associated with FindInstanceByMachineId and the other listed call sites. Update
messages beginning with “Couldn't” or other uppercase text to follow the
repository’s lowercase error-message convention, without changing their meaning.
In `@crates/api-core/src/errors.rs`:
- Around line 122-125: Lowercase the leading “A” in the
IdentifierSpecifiedForNewObject error message in crates/api-core/src/errors.rs
(lines 122-125) and the corresponding error enum message in
crates/rpc/src/errors.rs (lines 57-60); preserve the existing wording and
no-trailing-period format.
In `@crates/api-core/src/tests/instance.rs`:
- Line 1440: Update the duplicate-instance error handling exercised by the test
around err.message() to return a stable, sanitized API error instead of
PostgreSQL duplicate-key details, including the instances_pkey constraint;
change the assertion to verify the stable client-facing error contract.
In `@crates/xtask/src/error_message_case.rs`:
- Around line 339-349: The visit_expr_call logic currently inspects the first
argument for every error-type constructor; update it to use argument 1 for
Status::new and Status::with_details, while preserving argument 0 for other
constructors. Identify Status constructors explicitly from the path segments,
and add coverage exercising both forms so their message literals are inspected.
---
Outside diff comments:
In `@crates/log-parser/src/carbide_reporting.rs`:
- Around line 367-371: Lowercase the remaining btime error message in the
/proc/stat parsing path, changing its initial “Couldn't” capitalization to
“couldn't” while preserving the rest of the message and behavior.
---
Minor comments:
In `@crates/agent/src/ethernet_virtualization.rs`:
- Around line 1733-1739: Preserve documented Rust/domain vocabulary during
normalization: in the diagnostic around vlan_fdb validation, keep the acronym
“FDB” uppercase, and at the Uuid::try_from site leave the Rust identifier’s
CamelCase unchanged. Apply the fix at both referenced locations in
ethernet_virtualization.rs.
In `@crates/agent/src/tests/full.rs`:
- Line 357: Update the timeout diagnostic in the test assertion around the
health report wait to report 60s, matching the actual 60-second deadline. Prefer
a shared timeout constant if one already exists; otherwise change the message
text from 30s to 60s.
In `@crates/api-core/src/attestation/measured_boot.rs`:
- Line 174: Update the path-conversion error messages in the measured-boot flow
to describe `Path::to_str()` failures rather than joining failures. Correct the
`seession_key_path` typo and use path-specific diagnostics such as converting
`session_key_path` and `cred_out_path` to str, including the branches around the
referenced locations.
In `@crates/api-core/src/handlers/attestation.rs`:
- Line 266: Update the error message in the missing AK public-key branch of the
attestation handler to report that the database returned no AK public key,
rather than claiming SQL query construction failed. Keep the existing handling
and error flow unchanged.
In `@crates/api-core/src/handlers/credential.rs`:
- Line 115: Update the InvalidArgument messages in both the create and delete
paths to use the exact text “missing UFM URL”, preserving the uppercase URL
acronym instead of “missing UFM url”.
- Line 129: Update the DPU UEFI reset error message in the credential handler to
exactly state that resetting the DPU UEFI credential is not supported, matching
the host variant’s grammar and preserving the existing error behavior.
In `@crates/api-core/src/handlers/dpf.rs`:
- Line 41: Normalize the invalid-argument message in the DPF validation branches
of modify_dpf_state and get_dpf_state to the canonical punctuation-free text
“only host id is expected”, matching get_dpf_host_snapshot. Remove the trailing
exclamation marks while preserving the existing error type and control flow.
In `@crates/api-core/src/handlers/extension_service.rs`:
- Around line 487-488: Update the delete error message in the extension service
handler to use plural agreement: change “one or more extension service version
is” to “one or more extension service versions are,” while preserving the rest
of the message.
In `@crates/api-core/src/handlers/power_options.rs`:
- Line 76: Update the error returned when current_power_state.first() is None to
describe missing power options for the machine, replacing the misleading host-ID
validation message while preserving the existing error type and control flow.
- Around line 161-162: Correct the misspelled “suplied” text in both MAC-address
errors within the relevant handler, including the occurrences near the current
error and the additional location, so each message reads “no MAC address
supplied”.
In `@crates/api-core/src/tests/common/metadata.rs`:
- Line 38: Update the expected error string in the metadata test to remove the
trailing period from “Label key cannot be empty”, matching the normalized
validator output and C-GOOD-ERR.
In `@crates/api-db/src/lib.rs`:
- Around line 364-367: Update the #[error] message for
ConcurrentModificationError to insert “but” between “modified” and “did not
have,” preserving the rest of the wording and placeholders.
In `@crates/api-web/src/lib.rs`:
- Line 418: Update the operator-facing AUTH_TYPE_ENV error message to retain the
product name capitalization as “Entra” (or “Microsoft Entra”), while keeping
only the sentence-leading “use” lowercase. Preserve the existing
supported-authentication guidance and wording otherwise.
In `@crates/dhcp-server/src/errors.rs`:
- Around line 60-67: Update the #[error] messages on PacketDecodeFailure,
PacketEncodeFailure, and AddressParseError in the error enum so each identifies
its specific operation: packet decoding, packet encoding, or address parsing.
Preserve the wrapped error formatting while replacing the duplicated “utf8
decoding failure” text with variant-appropriate messages.
In `@crates/ipmi/src/tool.rs`:
- Around line 65-66: Correct the misspelled “credentilas” text in the eyre error
message within the credential retrieval flow, preserving the existing
credential_key and underlying error details.
In `@crates/machine-controller/src/handler.rs`:
- Around line 8604-8609: Update the error message in the Err(e) branch handling
BMC credential retrieval to use the grammatically correct phrase “no BMC
credentials exist,” preserving the surrounding StateHandlerError and eyre
behavior.
- Line 4767: Correct the operator-facing error message near the reboot timing
fields by changing the misspelled word “paramters” to “parameters”; leave the
remaining message and behavior unchanged.
- Around line 7556-7557: Update the normalized error text in the handler’s
“could not find primary dpu id” message to preserve the operator-facing acronym
casing as “DPU ID.” Keep the surrounding error construction and wording
unchanged.
In `@crates/network/src/lib.rs`:
- Line 96: Update the error format string in the MacAddress::from_str call to
include the missing closing parenthesis after the sanitized MAC value, keeping
the existing diagnostic fields and error propagation unchanged.
---
Duplicate comments:
In `@crates/api-test-helper/src/instance.rs`:
- Around line 375-378: Update the error message string in the eyre::bail! call
to avoid splitting a normal Rust string literal across a source newline; encode
the line break as \n while preserving the existing message content and
interpolation.
🪄 Autofix (Beta)
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: ff282aec-da3c-4673-b28c-f2f1ead6b599
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (270)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/agent/src/extension_services/k8s_pod_handler.rs`:
- Around line 356-359: Update the error context passed to wrap_err in the
crictl_output call within the pod-listing flow to use the stable message “failed
to list pods with crictl” instead of the misleading current wording.
🪄 Autofix (Beta)
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: 40ac1000-a463-4a44-a0ac-bcc6ba931201
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (270)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
🚧 Files skipped from review as they are similar to previous changes (240)
- crates/api-core/src/handlers/tpm_ca.rs
- crates/api-core/src/handlers/api.rs
- crates/api-test-helper/src/vault.rs
- crates/api-core/src/handlers/bmc_metadata.rs
- crates/state-controller/src/controller/builder.rs
- crates/api-test-helper/src/utils.rs
- crates/api-core/src/handlers/machine_hardware_info.rs
- crates/network-segment-controller/src/io.rs
- crates/authn/src/lib.rs
- crates/ssh-console/src/console_logger.rs
- crates/api-test-helper/src/subnet.rs
- crates/api-model/src/bmc_info.rs
- crates/rack/src/rms_client.rs
- crates/api-core/src/auth/mqtt_auth.rs
- crates/dns/src/config.rs
- crates/api-core/src/handlers/switch.rs
- crates/agent/src/machine_inventory_updater.rs
- crates/api-core/src/handlers/logical_partition.rs
- crates/api-core/src/handlers/utils.rs
- crates/bmc-mock/src/redfish/expander_router.rs
- crates/secrets/src/test_support/credentials.rs
- crates/api-core/src/handlers/measured_boot.rs
- crates/api-core/src/handlers/machine_interface.rs
- crates/xtask/Cargo.toml
- crates/dpu-fmds-shared/src/machine_identity.rs
- crates/admin-cli/src/jump/cmd.rs
- crates/api-model/src/power_shelf/power_shelf_id.rs
- crates/health/src/collectors/nmxc.rs
- crates/bmc-proxy/src/acl.rs
- crates/api-core/src/attestation/tpm_ca_cert.rs
- crates/nvlink-manager/src/errors.rs
- crates/ib-fabric/src/ib/disable.rs
- crates/api-core/src/handlers/machine_discovery.rs
- crates/api-core/src/handlers/power_shelf.rs
- crates/api-model/src/network_devices.rs
- crates/machine-a-tron/src/subnet.rs
- crates/vpc-prefix-controller/src/io.rs
- crates/fmds/src/http_request_metrics.rs
- crates/ib-partition-controller/src/io.rs
- crates/api-core/src/handlers/redfish.rs
- crates/api-core/src/db_init.rs
- crates/api-core/src/handlers/finder.rs
- crates/api-core/src/ipxe.rs
- crates/config-version/src/lib.rs
- crates/preingestion-manager/src/errors.rs
- crates/api-core/src/handlers/component_manager.rs
- crates/api-core/src/handlers/attestation.rs
- crates/systemd/src/systemd.rs
- crates/api-core/src/handlers/network_security_group.rs
- crates/tls/src/client_config.rs
- crates/dhcp-server/src/errors.rs
- crates/switch-controller/src/endpoint.rs
- crates/dpf/src/error.rs
- crates/uuid/src/power_shelf/mod.rs
- crates/host-support/src/hardware_enumeration.rs
- crates/api-core/src/handlers/rack.rs
- crates/ssh-console/tests/util/metrics.rs
- crates/scout/src/stream.rs
- crates/api-core/src/attestation/mod.rs
- crates/ipmi/src/tool.rs
- crates/site-explorer/tests/integration/health_report.rs
- crates/switch-controller/src/io.rs
- crates/uuid/src/machine/mod.rs
- crates/fmds/src/identity_signer.rs
- crates/agent/src/dpu/route.rs
- crates/power-shelf-controller/src/io.rs
- crates/host-support/src/hardware_enumeration/dpu.rs
- Makefile.toml
- crates/api-model/src/switch/switch_id.rs
- crates/agent/src/dpu/link.rs
- crates/agent/src/upgrade.rs
- crates/certs/src/cert_renewal.rs
- crates/api-core/src/handlers/tenant_identity_config.rs
- crates/libmlx/tests/lockdown/test_error.rs
- crates/api-core/src/tests/vpc_prefix.rs
- crates/ssh-console-mock-api-server/src/api.rs
- crates/agent/src/extension_services/manager.rs
- crates/api-core/src/handlers/vpc_peering.rs
- crates/api-core/src/handlers/dpf.rs
- crates/agent/src/dpu/interface.rs
- crates/rack-controller/src/validating.rs
- crates/admin-cli/src/main.rs
- crates/libmlx/src/lockdown/runner.rs
- crates/api-web/src/network_segment.rs
- crates/agent/src/traffic_intercept_bridging.rs
- crates/api-core/src/credentials/bmc_session_manager.rs
- crates/api-model/src/tenant/mod.rs
- crates/uuid/src/lib.rs
- crates/redfish/src/libredfish/error.rs
- crates/agent/src/ovs.rs
- crates/agent/src/lib.rs
- crates/log-parser/src/carbide_reporting.rs
- crates/site-explorer/src/lib.rs
- crates/agent/src/lldp.rs
- crates/state-controller/src/controller/processor.rs
- crates/api-core/src/handlers/scout_stream.rs
- crates/api-core/src/handlers/power_options.rs
- crates/agent/src/weave_ew_vpc_mock_server.rs
- crates/bmc-mock/src/mock_machine_router.rs
- crates/api-core/src/handlers/bmc_endpoint_explorer.rs
- crates/rpc/src/errors.rs
- crates/host-support/src/hardware_enumeration/tpm.rs
- crates/bmc-proxy/src/main.rs
- crates/preingestion-manager/src/bfb_rshim_copier.rs
- STYLE_GUIDE.md
- crates/firmware/src/downloader.rs
- crates/api-integration-tests/tests/lib.rs
- crates/utils/src/host_port_pair.rs
- crates/utils/src/cmd.rs
- crates/ib-fabric/src/ib/ufmclient/rest.rs
- crates/api-core/src/handlers/vpc_prefix.rs
- crates/switch-controller/src/configuring.rs
- crates/api-model/src/machine/upgrade_policy.rs
- crates/rpc/src/forge_resolver/mod.rs
- crates/api-core/src/handlers/ib_partition.rs
- crates/api-core/tests/integration/power_options.rs
- crates/api-model/src/machine/machine_id.rs
- crates/site-explorer/tests/integration/site_explorer.rs
- crates/fmds/src/phone_home.rs
- crates/machine-validation/src/errors.rs
- crates/api-model/src/resource_pool/mod.rs
- crates/switch-controller/src/certificate.rs
- crates/agent/src/periodic_config_fetcher.rs
- crates/network/src/base_mac.rs
- crates/dsx-exchange-consumer/src/lib.rs
- crates/ssh-console/tests/main.rs
- crates/ssh-console/src/main.rs
- crates/rpc/src/forge_tls_client.rs
- crates/ssh-console/src/bmc/connection_impl/ipmi.rs
- crates/mqttea/tests/errors.rs
- crates/api-web/src/lib.rs
- crates/agent/src/command_line.rs
- crates/agent/src/nvue.rs
- crates/agent/src/hbn.rs
- crates/api-core/src/errors.rs
- crates/api-core/src/handlers/credential.rs
- crates/api-core/src/handlers/host_reprovisioning.rs
- crates/dns/src/main.rs
- crates/agent/src/instrumentation/config.rs
- crates/api-model/src/ib_partition/mod.rs
- crates/ib-fabric/src/errors.rs
- crates/dpa-manager/src/card_handler/svpc.rs
- crates/dhcp/tests/common/kea.rs
- crates/rpc-utils/src/dhcp.rs
- crates/api-core/src/handlers/uefi.rs
- crates/libmlx/src/runner/error.rs
- crates/rack/src/bms_client.rs
- crates/api-core/src/run.rs
- crates/ssh/src/lib.rs
- crates/api-core/src/tests/network_segment.rs
- crates/ib-fabric/src/ib/ufmclient/mod.rs
- crates/admin-cli/src/rack/maintenance/cmd.rs
- crates/ssh-console/src/ssh_server.rs
- crates/machine-controller/src/scout_firmware_scripts.rs
- .github/workflows/ci.yaml
- crates/api-core/src/handlers/machine_validation.rs
- crates/api-db/src/ip_allocator.rs
- crates/xtask/src/main.rs
- crates/api-core/src/tests/ib_partition_lifecycle.rs
- crates/api-model/src/errors.rs
- crates/rvs/src/error.rs
- crates/api-core/src/handlers/sku.rs
- crates/api-test-helper/src/instance.rs
- crates/agent/src/tests/common/mod.rs
- crates/api-core/src/handlers/firmware.rs
- crates/network/src/lib.rs
- crates/xtask/src/workspace_deps.rs
- crates/state-controller/src/state_handler.rs
- crates/tonic-client-wrapper/src/codegen.rs
- crates/libmlx/src/lockdown/error.rs
- crates/log-parser/src/main.rs
- crates/bmc-proxy/src/setup.rs
- crates/admin-cli/src/errors.rs
- crates/api-core/src/handlers/machine.rs
- crates/ssh-console/tests/util/mod.rs
- crates/mqttea/src/errors.rs
- crates/api-model/src/lib.rs
- crates/host-support/src/registration.rs
- crates/agent/src/network_monitor.rs
- crates/ssh-console/src/bmc/connection_impl/ssh.rs
- crates/api-core/src/handlers/managed_host.rs
- crates/api-core/src/tests/ib_instance.rs
- crates/bmc-proxy/src/bmc_proxy.rs
- crates/libmlx/src/firmware/error.rs
- crates/ssh-console/tests/util/ssh_console_test_helper.rs
- crates/secrets/src/forge_vault.rs
- crates/site-explorer/src/errors.rs
- crates/api-core/src/tests/common/metadata.rs
- crates/api-model/src/attestation.rs
- crates/scout/src/main.rs
- crates/nvue-client/src/client.rs
- crates/api-model/src/machine/mod.rs
- crates/dpf/build.rs
- crates/machine-a-tron/src/dhcp_wrapper.rs
- crates/api-core/src/handlers/machine_identity.rs
- crates/ib-fabric/src/ib/mod.rs
- crates/ssh-console/src/bmc/connection.rs
- crates/agent/src/tests/full.rs
- crates/ssh-console/src/config.rs
- crates/ssh-console/src/bmc/vendor.rs
- crates/ssh-console/src/lib.rs
- crates/api-core/src/credentials/mod.rs
- crates/api-db/src/resource_pool.rs
- crates/api-model/src/site_explorer/mod.rs
- crates/uuid/src/switch/mod.rs
- crates/ssh-console/tests/util/ssh_client.rs
- crates/nras/src/lib.rs
- crates/machine-a-tron/src/machine_state_machine.rs
- crates/api-core/src/instance/mod.rs
- crates/agent/src/agent_platform.rs
- crates/xtask/src/error_message_case.rs
- crates/health/src/lib.rs
- crates/api-core/src/tests/instance_os.rs
- crates/api-core/src/handlers/dpu.rs
- crates/machine-a-tron/src/api_client.rs
- crates/api-core/src/tests/instance_config_update.rs
- crates/api-core/src/tests/tpm_ca.rs
- crates/dhcp/tests/common/kea_v6.rs
- crates/machine-controller/src/lib.rs
- crates/scout/src/lib.rs
- crates/api-core/src/handlers/instance.rs
- crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
- crates/api-core/src/attestation/measured_boot.rs
- crates/health-report/src/lib.rs
- crates/api-core/src/handlers/extension_service.rs
- crates/agent/src/astra_weave.rs
- crates/api-core/src/ethernet_virtualization.rs
- crates/state-controller/src/controller.rs
- crates/prometheus-text-parser/src/lib.rs
- crates/api-model/src/hardware_info.rs
- crates/agent/src/util.rs
- crates/machine-controller/src/handler.rs
- crates/api-core/src/tests/instance.rs
- crates/ssh-console/src/frontend.rs
- crates/api-core/src/tests/extension_service.rs
- crates/api-core/src/setup.rs
- crates/agent/src/containerd/container.rs
- crates/api-core/src/tests/measured_boot.rs
- crates/agent/src/ethernet_virtualization.rs
- crates/api-core/src/handlers/dpu_remediation.rs
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
|
🌿 Preview your docs: https://nvidia-preview-pull-request-3566.docs.buildwithfern.com/infra-controller |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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 `@crates/api-core/src/handlers/managed_host.rs`:
- Around line 387-388: Update the InvalidArgument message in the managed host
handler to use the exact operator-facing text “missing reference URL,”
preserving the URL acronym while leaving the surrounding error handling
unchanged.
In `@crates/ipmi/src/tool.rs`:
- Line 65: Correct the misspelled “credentilas” text in the eyre error message
for credential lookup, preserving the existing credential_key and error details.
In `@crates/log-parser/src/carbide_reporting.rs`:
- Around line 42-43: Update the JsonError display message in the Carbide
reporting error enum to use the uppercase acronym “JSON,” preserving the exact
wording “error while handling JSON: {0}.”
In `@crates/network/src/lib.rs`:
- Line 96: Update the error format string in the MacAddress::from_str call to
emit the missing closing parenthesis after sanitized_mac, while preserving the
existing error and input details.
🪄 Autofix (Beta)
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: 51955267-ac81-4bf7-a8a2-40e1d859a8fd
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (270)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
🚧 Files skipped from review as they are similar to previous changes (247)
- crates/agent/src/machine_inventory_updater.rs
- crates/api-test-helper/src/vault.rs
- crates/api-core/src/handlers/utils.rs
- crates/api-db/src/machine_interface_address.rs
- crates/vpc-prefix-controller/src/io.rs
- crates/api-core/src/handlers/finder.rs
- crates/api-core/src/attestation/tpm_ca_cert.rs
- crates/api-core/src/handlers/sku.rs
- crates/api-core/src/handlers/vpc_prefix.rs
- crates/rack-controller/src/validating.rs
- crates/api-core/src/handlers/power_shelf.rs
- crates/machine-a-tron/src/dhcp_wrapper.rs
- crates/agent/src/instrumentation/config.rs
- crates/rpc/src/forge_resolver/mod.rs
- crates/api-model/src/machine/machine_id.rs
- crates/api-test-helper/src/utils.rs
- crates/api-core/src/auth/mqtt_auth.rs
- crates/api-core/src/db_init.rs
- crates/bmc-mock/src/mock_machine_router.rs
- crates/api-core/src/handlers/scout_stream.rs
- crates/agent/src/dpu/route.rs
- crates/ssh-console/tests/util/metrics.rs
- crates/agent/src/weave_ew_vpc_mock_server.rs
- crates/agent/src/extension_services/manager.rs
- crates/api-core/src/handlers/logical_partition.rs
- crates/site-explorer/tests/integration/health_report.rs
- crates/agent/src/traffic_intercept_bridging.rs
- crates/api-core/src/tests/vpc_prefix.rs
- crates/api-model/src/tenant/mod.rs
- crates/api-core/src/handlers/vpc_peering.rs
- crates/api-core/tests/integration/power_options.rs
- crates/ssh-console/tests/util/ssh_console_test_helper.rs
- crates/api-core/src/handlers/machine_hardware_info.rs
- crates/api-core/src/handlers/attestation.rs
- crates/bmc-proxy/src/main.rs
- crates/api-core/src/handlers/tpm_ca.rs
- crates/nvlink-manager/src/errors.rs
- crates/machine-controller/src/lib.rs
- crates/agent/src/ovs.rs
- crates/api-core/src/handlers/network_segment.rs
- crates/ib-partition-controller/src/io.rs
- crates/bmc-proxy/src/acl.rs
- crates/api-core/src/network_segment/allocate.rs
- crates/api-core/src/credentials/mod.rs
- crates/ib-fabric/src/ib/disable.rs
- crates/api-core/src/tests/instance_os.rs
- crates/utils/src/cmd.rs
- crates/api-core/src/run.rs
- crates/secrets/src/test_support/credentials.rs
- crates/api-model/src/extension_service/mod.rs
- crates/power-shelf-controller/src/io.rs
- crates/api-core/src/handlers/machine_interface.rs
- crates/dhcp/tests/common/kea.rs
- crates/api-test-helper/src/machine.rs
- crates/authn/src/lib.rs
- crates/api-core/src/handlers/measured_boot.rs
- crates/dpu-agent-utils/src/utils.rs
- crates/switch-controller/src/certificate.rs
- crates/state-controller/src/controller.rs
- crates/admin-cli/src/rack/maintenance/cmd.rs
- crates/api-core/src/handlers/dpu_remediation.rs
- crates/api-web/src/lib.rs
- crates/api-core/src/handlers/dpf.rs
- crates/api-core/src/handlers/network_security_group.rs
- crates/agent/src/tests/full.rs
- crates/utils/src/host_port_pair.rs
- crates/api-test-helper/src/grpcurl.rs
- crates/api-core/src/tests/ib_partition_lifecycle.rs
- crates/ssh-console/src/config.rs
- crates/ssh-console/tests/util/mod.rs
- crates/api-core/src/tests/common/metadata.rs
- crates/api-core/src/handlers/machine.rs
- crates/rack-controller/src/io.rs
- crates/api-core/src/handlers/tenant_identity_config.rs
- crates/bmc-mock/src/redfish/expander_router.rs
- crates/ssh-console/src/ssh_server.rs
- crates/api-core/src/tests/sku.rs
- crates/dpu-fmds-shared/src/machine_identity.rs
- crates/switch-controller/src/endpoint.rs
- crates/bmc-proxy/src/setup.rs
- crates/api-core/src/handlers/component_manager.rs
- crates/rpc-utils/src/dhcp.rs
- crates/preingestion-manager/src/errors.rs
- crates/ssh-console/src/console_logger.rs
- crates/site-explorer/tests/integration/site_explorer.rs
- crates/ssh-console/src/lib.rs
- crates/redfish/src/libredfish/error.rs
- crates/nvue-client/src/client.rs
- crates/fmds/src/identity_signer.rs
- crates/dns/src/main.rs
- crates/api-db/src/ip_allocator.rs
- crates/agent/src/health.rs
- crates/fmds/src/http_request_metrics.rs
- crates/rack/src/bms_client.rs
- crates/agent/src/lldp.rs
- crates/agent/src/lib.rs
- crates/api-web/src/network_segment.rs
- crates/switch-controller/src/configuring.rs
- crates/api-core/src/auth.rs
- crates/api-db/src/work_lock_manager.rs
- crates/network/src/base_mac.rs
- crates/ipmi/src/bmc_mock.rs
- crates/api-db/src/power_shelf.rs
- crates/ib-fabric/src/ib/mod.rs
- crates/api-core/src/handlers/bmc_endpoint_explorer.rs
- crates/api-db/src/switch.rs
- crates/dpa-manager/src/errors.rs
- crates/api-core/src/handlers/redfish.rs
- crates/mqttea/tests/errors.rs
- crates/agent/src/mtu.rs
- crates/api-core/src/handlers/bmc_metadata.rs
- crates/api-model/src/switch/switch_id.rs
- crates/machine-a-tron/src/api_client.rs
- crates/xtask/Cargo.toml
- crates/ssh-console-mock-api-server/src/api.rs
- crates/api-core/src/handlers/uefi.rs
- crates/api-core/src/handlers/ib_partition.rs
- crates/agent/src/dpu/interface.rs
- crates/api-core/src/ethernet_virtualization.rs
- crates/agent/src/upgrade.rs
- crates/api-core/src/tests/network_segment.rs
- crates/api-test-helper/src/instance.rs
- crates/state-controller/src/controller/builder.rs
- crates/firmware/src/downloader.rs
- crates/agent/src/hbn.rs
- crates/rpc/src/forge_resolver/resolver.rs
- crates/agent/src/agent_platform.rs
- crates/dpf/build.rs
- crates/ib-fabric/src/errors.rs
- crates/host-support/src/hardware_enumeration/dpu.rs
- crates/dpa-manager/src/card_handler/svpc.rs
- crates/api-model/src/power_shelf/power_shelf_id.rs
- crates/rack/src/rms_client.rs
- .github/workflows/ci.yaml
- crates/health/src/collectors/nmxc.rs
- crates/rvs/src/error.rs
- crates/api-core/src/handlers/rack.rs
- crates/api-core/src/attestation/mod.rs
- crates/api-model/src/attestation.rs
- crates/scout/src/main.rs
- crates/machine-controller/src/scout_firmware_scripts.rs
- crates/ssh-console/tests/main.rs
- crates/api-test-helper/src/subnet.rs
- crates/dsx-exchange-consumer/src/lib.rs
- crates/libmlx/src/lockdown/runner.rs
- crates/api-core/src/handlers/credential.rs
- crates/api-core/src/handlers/switch.rs
- crates/agent/src/nvue.rs
- crates/bmc-proxy/src/bmc_proxy.rs
- crates/api-model/src/lib.rs
- crates/agent/src/command_line.rs
- crates/api-core/src/tests/tpm_ca.rs
- crates/api-core/src/credentials/bmc_session_manager.rs
- crates/dhcp-server/src/errors.rs
- crates/api-core/src/handlers/power_options.rs
- crates/preingestion-manager/src/bfb_rshim_copier.rs
- crates/ib-fabric/src/ib/ufmclient/rest.rs
- crates/dpf/src/error.rs
- crates/admin-cli/src/jump/cmd.rs
- crates/ssh-console/src/frontend.rs
- crates/xtask/src/main.rs
- crates/api-core/src/handlers/host_reprovisioning.rs
- crates/api-model/src/errors.rs
- crates/api-core/src/handlers/machine_discovery.rs
- crates/api-model/src/resource_pool/mod.rs
- crates/libmlx/src/firmware/error.rs
- crates/api-core/src/handlers/instance.rs
- crates/bmc-mock/src/mac_address_pool.rs
- crates/scout/src/stream.rs
- crates/nras/src/lib.rs
- crates/api-model/src/bmc_info.rs
- crates/metrics-utils/src/lib.rs
- crates/api-core/src/handlers/machine_identity.rs
- crates/api-model/src/ib_partition/mod.rs
- crates/xtask/src/workspace_deps.rs
- crates/agent/src/tests/common/mod.rs
- crates/rpc/src/forge_tls_client.rs
- crates/api-integration-tests/tests/lib.rs
- crates/libmlx/src/profile/error.rs
- crates/api-core/src/attestation/measured_boot.rs
- crates/systemd/src/systemd.rs
- crates/uuid/src/machine/mod.rs
- crates/ib-fabric/src/ib/ufmclient/mod.rs
- crates/api-core/src/tests/instance_config_update.rs
- crates/site-explorer/src/errors.rs
- crates/agent/src/network_monitor.rs
- crates/api-core/src/handlers/api.rs
- crates/api-model/src/hardware_info.rs
- crates/network/src/ip/prefix.rs
- crates/uuid/src/lib.rs
- crates/tls/src/client_config.rs
- crates/api-model/src/machine/mod.rs
- crates/machine-a-tron/src/machine_utils.rs
- crates/api-core/src/instance/mod.rs
- crates/uuid/src/switch/mod.rs
- crates/ssh-console/src/bmc/connection_impl/ipmi.rs
- crates/dhcp/tests/common/kea_v6.rs
- crates/ssh-console/src/bmc/client_pool.rs
- crates/mqttea/src/errors.rs
- crates/health/src/lib.rs
- crates/health-report/src/lib.rs
- crates/rpc/src/errors.rs
- crates/scout/src/lib.rs
- crates/ssh/src/lib.rs
- crates/api-core/src/handlers/machine_validation.rs
- crates/api-core/src/setup.rs
- crates/api-model/src/network_devices.rs
- Makefile.toml
- crates/api-core/src/handlers/dpu.rs
- crates/api-core/src/ipxe.rs
- crates/host-support/src/hardware_enumeration/tpm.rs
- crates/agent/src/dpu/link.rs
- crates/api-core/src/tests/ib_instance.rs
- crates/libmlx/src/runner/error.rs
- crates/agent/src/main_loop.rs
- crates/tonic-client-wrapper/src/codegen.rs
- crates/host-support/src/hardware_enumeration.rs
- crates/ssh-console/tests/util/ssh_client.rs
- crates/agent/src/util.rs
- crates/api-model/src/machine/upgrade_policy.rs
- crates/libnmxm/src/lib.rs
- crates/secrets/src/forge_vault.rs
- crates/ssh-console/src/bmc/vendor.rs
- crates/api-core/src/handlers/extension_service.rs
- crates/api-db/src/resource_pool.rs
- crates/ssh-console/src/bmc/connection_impl/ssh.rs
- crates/site-explorer/src/lib.rs
- crates/libnmxc/src/lib.rs
- crates/state-controller/src/state_handler.rs
- crates/api-core/src/errors.rs
- crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
- crates/machine-validation/src/errors.rs
- crates/libmlx/tests/lockdown/test_error.rs
- STYLE_GUIDE.md
- crates/agent/src/astra_weave.rs
- crates/state-controller/src/controller/processor.rs
- crates/api-core/src/tests/extension_service.rs
- crates/machine-a-tron/src/machine_state_machine.rs
- crates/api-db/src/lib.rs
- crates/api-core/src/tests/measured_boot.rs
- crates/agent/src/containerd/container.rs
- crates/xtask/src/error_message_case.rs
- crates/ssh-console/src/bmc/connection.rs
- crates/admin-cli/src/errors.rs
- crates/api-model/src/site_explorer/mod.rs
- crates/agent/src/ethernet_virtualization.rs
- crates/machine-controller/src/handler.rs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/agent/src/network_monitor.rs`:
- Line 654: Update the error message in the latency parsing flow around the
visible ok_or_else call to use “failed to parse average latency” instead of
“failed to average latency,” without changing the surrounding error handling.
🪄 Autofix (Beta)
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: 1847cc09-0734-4b88-a291-579be6cf2a2d
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (271)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/machine_states.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
🚧 Files skipped from review as they are similar to previous changes (249)
- crates/switch-controller/src/configuring.rs
- crates/admin-cli/src/jump/cmd.rs
- crates/state-controller/src/controller/builder.rs
- crates/ssh/src/lib.rs
- crates/api-core/src/credentials/mod.rs
- crates/api-core/src/handlers/bmc_metadata.rs
- crates/api-core/src/handlers/finder.rs
- crates/secrets/src/test_support/credentials.rs
- crates/admin-cli/src/main.rs
- crates/api-core/src/handlers/network_segment.rs
- crates/api-test-helper/src/grpcurl.rs
- crates/api-core/src/handlers/rack.rs
- crates/api-core/src/handlers/switch.rs
- crates/rack/src/rms_client.rs
- crates/network-segment-controller/src/io.rs
- crates/uuid/src/switch/mod.rs
- .github/workflows/ci.yaml
- crates/bmc-proxy/src/main.rs
- crates/uuid/src/power_shelf/mod.rs
- crates/rack-controller/src/io.rs
- crates/switch-controller/src/io.rs
- crates/api-core/tests/integration/power_options.rs
- crates/vpc-prefix-controller/src/io.rs
- crates/nvlink-manager/src/errors.rs
- crates/agent/src/weave_ew_vpc_mock_server.rs
- crates/api-core/src/handlers/component_manager.rs
- crates/admin-cli/src/rack/maintenance/cmd.rs
- crates/api-model/src/bmc_info.rs
- crates/api-core/src/handlers/measured_boot.rs
- crates/api-core/src/handlers/machine_interface.rs
- crates/api-model/src/switch/switch_id.rs
- crates/api-core/src/handlers/attestation.rs
- crates/ib-partition-controller/src/io.rs
- crates/rpc/src/forge_resolver/resolver.rs
- crates/api-core/src/handlers/bmc_endpoint_explorer.rs
- crates/api-core/src/handlers/vpc_prefix.rs
- crates/api-model/src/resource_pool/mod.rs
- crates/agent/src/traffic_intercept_bridging.rs
- crates/ib-fabric/src/ib/ufmclient/rest.rs
- crates/api-core/src/handlers/dpu_remediation.rs
- crates/bmc-proxy/src/acl.rs
- crates/api-model/src/network_devices.rs
- crates/agent/src/tests/common/mod.rs
- crates/ssh-console/src/console_logger.rs
- crates/api-core/src/ipxe.rs
- crates/ipxe-renderer/src/lib.rs
- crates/api-web/src/network_segment.rs
- crates/api-test-helper/src/vault.rs
- crates/api-core/src/auth/mqtt_auth.rs
- crates/fmds/src/identity_signer.rs
- crates/agent/src/ovs.rs
- crates/api-core/src/handlers/machine_hardware_info.rs
- crates/bmc-mock/src/mock_machine_router.rs
- crates/api-model/src/extension_service/mod.rs
- crates/api-core/src/handlers/utils.rs
- crates/api-core/src/handlers/vpc_peering.rs
- crates/ssh-console/src/main.rs
- crates/api-core/src/handlers/tpm_ca.rs
- crates/api-test-helper/src/machine.rs
- crates/rpc/src/forge_resolver/mod.rs
- crates/api-core/src/handlers/sku.rs
- crates/tls/src/client_config.rs
- crates/agent/src/tests/full.rs
- crates/dpu-fmds-shared/src/machine_identity.rs
- crates/dsx-exchange-consumer/src/lib.rs
- crates/authn/src/lib.rs
- crates/api-core/src/handlers/tenant_identity_config.rs
- crates/agent/src/machine_inventory_updater.rs
- crates/xtask/src/workspace_deps.rs
- crates/xtask/src/main.rs
- crates/ssh-console/src/config.rs
- crates/ssh-console/src/bmc/connection_impl/ipmi.rs
- crates/ssh-console/tests/util/mod.rs
- crates/machine-a-tron/src/dhcp_wrapper.rs
- crates/machine-a-tron/src/subnet.rs
- crates/agent/src/lib.rs
- crates/dpa-manager/src/card_handler/svpc.rs
- crates/machine-a-tron/src/api_client.rs
- crates/agent/src/hbn.rs
- crates/api-core/src/handlers/redfish.rs
- crates/ipmi/src/bmc_mock.rs
- crates/power-shelf-controller/src/io.rs
- crates/api-core/src/auth.rs
- crates/dns/src/config.rs
- crates/api-model/src/power_shelf/power_shelf_id.rs
- crates/api-core/src/handlers/power_shelf.rs
- crates/uuid/src/machine/mod.rs
- crates/api-core/src/handlers/host_reprovisioning.rs
- crates/agent/src/upgrade.rs
- crates/bmc-mock/src/redfish/expander_router.rs
- crates/ssh-console/tests/util/ssh_console_test_helper.rs
- crates/api-test-helper/src/instance.rs
- crates/metrics-utils/src/lib.rs
- crates/dpf/build.rs
- crates/systemd/src/systemd.rs
- crates/api-db/src/power_shelf.rs
- crates/machine-validation/src/errors.rs
- crates/agent/src/instrumentation/config.rs
- crates/ssh-console/tests/util/metrics.rs
- crates/api-core/src/handlers/machine.rs
- crates/api-db/src/lib.rs
- crates/preingestion-manager/src/errors.rs
- crates/api-core/src/handlers/machine_discovery.rs
- crates/api-core/src/handlers/dpf.rs
- crates/ipmi/src/tool.rs
- crates/api-test-helper/src/utils.rs
- crates/api-core/src/instance/mod.rs
- crates/api-db/src/ip_allocator.rs
- Makefile.toml
- crates/xtask/Cargo.toml
- crates/tonic-client-wrapper/src/codegen.rs
- crates/api-model/src/machine/upgrade_policy.rs
- crates/host-support/src/hardware_enumeration/dpu.rs
- crates/site-explorer/tests/integration/site_explorer.rs
- crates/host-support/src/registration.rs
- crates/bmc-mock/src/mac_address_pool.rs
- crates/health/src/collectors/nmxc.rs
- crates/host-support/src/hardware_enumeration/tpm.rs
- crates/agent/src/extension_services/manager.rs
- crates/agent/src/mtu.rs
- crates/api-model/src/tenant/mod.rs
- crates/api-core/src/handlers/network_security_group.rs
- crates/api-core/src/handlers/ib_partition.rs
- crates/api-core/src/tests/network_segment.rs
- crates/switch-controller/src/certificate.rs
- crates/ib-fabric/src/errors.rs
- crates/config-version/src/lib.rs
- crates/fmds/src/http_request_metrics.rs
- crates/agent/src/astra_weave.rs
- crates/network/src/base_mac.rs
- crates/api-core/src/handlers/logical_partition.rs
- crates/ib-fabric/src/ib/ufmclient/mod.rs
- crates/api-core/src/tests/vpc_prefix.rs
- crates/agent/src/command_line.rs
- crates/dpf/src/error.rs
- crates/api-web/src/lib.rs
- crates/api-core/src/tests/sku.rs
- crates/agent/src/health.rs
- crates/utils/src/host_port_pair.rs
- crates/rack/src/bms_client.rs
- crates/api-core/src/tests/instance_os.rs
- crates/agent/src/lldp.rs
- crates/ssh-console/src/bmc/client_pool.rs
- crates/state-controller/src/controller.rs
- crates/ssh-console/tests/main.rs
- crates/ssh-console/src/bmc/vendor.rs
- crates/api-model/src/ib_partition/mod.rs
- crates/api-core/src/handlers/api.rs
- crates/network/src/lib.rs
- crates/api-core/src/network_segment/allocate.rs
- crates/api-core/src/ethernet_virtualization.rs
- crates/ssh-console/src/ssh_server.rs
- crates/api-core/src/tests/ib_instance.rs
- crates/dpa-manager/src/errors.rs
- crates/libmlx/src/lockdown/error.rs
- crates/nvue-client/src/client.rs
- crates/firmware/src/downloader.rs
- crates/libmlx/src/firmware/error.rs
- crates/libnmxc/src/lib.rs
- crates/api-core/src/attestation/tpm_ca_cert.rs
- crates/switch-controller/src/endpoint.rs
- crates/ssh-console-mock-api-server/src/api.rs
- crates/api-core/src/handlers/machine_identity.rs
- crates/api-core/src/errors.rs
- crates/api-core/src/handlers/uefi.rs
- crates/api-core/src/handlers/dpu.rs
- crates/rpc-utils/src/dhcp.rs
- crates/bmc-proxy/src/bmc_proxy.rs
- crates/state-controller/src/controller/processor.rs
- crates/rvs/src/error.rs
- crates/mqttea/tests/errors.rs
- crates/prometheus-text-parser/src/lib.rs
- crates/agent/src/agent_platform.rs
- crates/host-support/src/hardware_enumeration.rs
- crates/api-core/src/db_init.rs
- crates/health/src/lib.rs
- crates/site-explorer/tests/integration/health_report.rs
- crates/ssh-console/src/lib.rs
- crates/agent/src/main_loop.rs
- STYLE_GUIDE.md
- crates/api-core/src/handlers/instance.rs
- crates/api-db/src/work_lock_manager.rs
- crates/network/src/ip/prefix.rs
- crates/scout/src/lib.rs
- crates/agent/src/nvue.rs
- crates/state-controller/src/state_handler.rs
- crates/api-core/src/tests/measured_boot.rs
- crates/machine-controller/src/scout_firmware_scripts.rs
- crates/agent/src/dpu/link.rs
- crates/scout/src/main.rs
- crates/log-parser/src/carbide_reporting.rs
- crates/api-db/src/switch.rs
- crates/api-model/src/attestation.rs
- crates/api-db/src/machine_interface_address.rs
- crates/api-core/src/run.rs
- crates/ssh-console/src/bmc/connection_impl/ssh.rs
- crates/api-core/src/tests/ib_partition_lifecycle.rs
- crates/api-model/src/lib.rs
- crates/preingestion-manager/src/bfb_rshim_copier.rs
- crates/dhcp/tests/common/kea.rs
- crates/api-core/src/attestation/measured_boot.rs
- crates/dns/src/main.rs
- crates/health-report/src/lib.rs
- crates/nras/src/lib.rs
- crates/api-core/src/handlers/credential.rs
- crates/api-model/src/errors.rs
- crates/ssh-console/src/bmc/connection.rs
- crates/agent/src/dpu/route.rs
- crates/api-core/src/tests/tpm_ca.rs
- crates/libmlx/src/lockdown/runner.rs
- crates/log-parser/src/main.rs
- crates/api-model/src/machine/mod.rs
- crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
- crates/api-model/src/machine/machine_id.rs
- crates/mqttea/src/errors.rs
- crates/admin-cli/src/errors.rs
- crates/redfish/src/libredfish/error.rs
- crates/rpc/src/forge_tls_client.rs
- crates/api-model/src/site_explorer/mod.rs
- crates/dhcp-server/src/errors.rs
- crates/api-core/src/credentials/bmc_session_manager.rs
- crates/api-db/src/resource_pool.rs
- crates/ssh-console/tests/util/ssh_client.rs
- crates/api-core/src/handlers/machine_validation.rs
- crates/site-explorer/src/lib.rs
- crates/api-core/src/handlers/extension_service.rs
- crates/agent/src/util.rs
- crates/libnmxm/src/lib.rs
- crates/rpc/src/errors.rs
- crates/secrets/src/forge_vault.rs
- crates/libmlx/src/runner/error.rs
- crates/dhcp/tests/common/kea_v6.rs
- crates/libmlx/src/profile/error.rs
- crates/api-core/src/handlers/power_options.rs
- crates/xtask/src/error_message_case.rs
- crates/api-core/src/tests/extension_service.rs
- crates/agent/src/ethernet_virtualization.rs
- crates/agent/src/containerd/container.rs
- crates/api-core/src/tests/common/metadata.rs
- crates/machine-a-tron/src/machine_state_machine.rs
- crates/api-core/src/tests/instance.rs
- crates/agent/src/extension_services/k8s_pod_handler.rs
- crates/api-core/src/setup.rs
- crates/api-core/src/tests/instance_config_update.rs
- crates/ib-fabric/src/ib/mod.rs
- crates/machine-controller/src/handler.rs
- crates/agent/src/periodic_config_fetcher.rs
- crates/ssh-console/src/frontend.rs
- crates/api-test-helper/src/subnet.rs
| .captures(rtt_line) | ||
| .and_then(|caps| caps.get(1).and_then(|m| m.as_str().parse::<f64>().ok())) | ||
| .ok_or_else(|| eyre::eyre!("Failed to average latency"))?; | ||
| .ok_or_else(|| eyre::eyre!("failed to average latency"))?; |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Make the latency error message parse-specific.
This branch reports a regex or f64 parsing failure, but "failed to average latency" describes a different operation. Use "failed to parse average latency" so the diagnostic identifies the actual failure.
Suggested fix
- .ok_or_else(|| eyre::eyre!("failed to average latency"))?;
+ .ok_or_else(|| eyre::eyre!("failed to parse average latency"))?;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .ok_or_else(|| eyre::eyre!("failed to average latency"))?; | |
| .ok_or_else(|| eyre::eyre!("failed to parse average latency"))?; |
🤖 Prompt for 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.
In `@crates/agent/src/network_monitor.rs` at line 654, Update the error message in
the latency parsing flow around the visible ok_or_else call to use “failed to
parse average latency” instead of “failed to average latency,” without changing
the surrounding error handling.
Our error messages were split about 50/50 on casing -- `"Failed to X"` next to `"failed to X"`, `"Error"` vs `"error"` -- with no rule written down anywhere. This adopts the Rust API Guidelines convention (C-GOOD-ERR) across the board: an error's `Display` text reads as a lowercase phrase with no trailing period, so it composes cleanly once it's wrapped into a larger chain. A new `cargo xtask lint-error-messages` check keeps it that way.
Primary callouts are:
- New `xtask lint-error-messages` subcommand -- a `syn`-based check that flags, and with `--fix` rewrites, the message in `#[error(...)]`, `anyhow!`/`bail!`, `.context()`/`.wrap_err()`, and `CarbideError`/`Status` constructors. It lowercases every plain capitalized word and drops a trailing period. Words with an internal capital -- acronyms (`BMC`), CamelCase identifiers (`CreateVirtualNetwork`) -- are left alone; `// xtask:allow-error-case` opts a line out.
- Ran `--fix` over the tree: it lowercased 1,054 error messages in the product crates -- plus 138 more in test and mock helpers -- and dropped trailing periods throughout, across ~260 files. That reach includes the `CarbideError` constructors that carry most of our user-facing API errors. Mixed-case proper nouns (`Redfish`, `Vault`) take the lowercase hit; only unambiguous acronyms (`BMC`) and CamelCase identifiers (`CreateVirtualNetwork`) are exempt.
- `scout`'s attestation retry now matches the error text case-insensitively, so lowercasing the message doesn't quietly change when it retries.
- Wired into the lint gate -- `cargo make lint-error-messages` runs as a new CI step beside `carbide-lints` and in the local `pre-commit-verify-workspace` aggregate -- and documented the convention in `STYLE_GUIDE.md`.
This is the errors half -- logging messages are a separate pass. Messages carried via `format!(...)` or struct-literal error fields (`CarbideError::Internal { message }`) are out of the checker's current reach for now, marked with a `TODO` and left for a documented follow-up.
Tests added! -- checker unit + end-to-end coverage, plus the test assertions that pinned the old strings.
This supports NVIDIA#3468
Signed-off-by: Chet Nichols III <chetn@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@crates/api-core/src/handlers/managed_host.rs`:
- Around line 387-388: Preserve acronym casing in the affected error messages:
update crates/api-core/src/handlers/managed_host.rs lines 387-388 to use
“missing reference URL”; update crates/api-db/src/ip_allocator.rs lines 54-58 to
use “circuit ID”, “instance ID”, and “machine ID”; and update both
conversion-error messages in crates/api-db/src/lib.rs lines 360-363 to use
“UUID”.
🪄 Autofix (Beta)
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: ce7ce403-d5ab-4146-a17f-de2e988db7f8
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (271)
.github/workflows/ci.yamlMakefile.tomlSTYLE_GUIDE.mdcrates/admin-cli/src/errors.rscrates/admin-cli/src/jump/cmd.rscrates/admin-cli/src/main.rscrates/admin-cli/src/rack/maintenance/cmd.rscrates/agent/src/agent_platform.rscrates/agent/src/astra_weave.rscrates/agent/src/command_line.rscrates/agent/src/containerd/container.rscrates/agent/src/dpu/interface.rscrates/agent/src/dpu/link.rscrates/agent/src/dpu/route.rscrates/agent/src/ethernet_virtualization.rscrates/agent/src/extension_services/k8s_pod_handler.rscrates/agent/src/extension_services/manager.rscrates/agent/src/hbn.rscrates/agent/src/health.rscrates/agent/src/instrumentation/config.rscrates/agent/src/lib.rscrates/agent/src/lldp.rscrates/agent/src/machine_inventory_updater.rscrates/agent/src/main_loop.rscrates/agent/src/mtu.rscrates/agent/src/network_monitor.rscrates/agent/src/nvue.rscrates/agent/src/ovs.rscrates/agent/src/periodic_config_fetcher.rscrates/agent/src/tests/common/mod.rscrates/agent/src/tests/full.rscrates/agent/src/traffic_intercept_bridging.rscrates/agent/src/upgrade.rscrates/agent/src/util.rscrates/agent/src/weave_ew_vpc_mock_server.rscrates/api-core/src/attestation/measured_boot.rscrates/api-core/src/attestation/mod.rscrates/api-core/src/attestation/tpm_ca_cert.rscrates/api-core/src/auth.rscrates/api-core/src/auth/mqtt_auth.rscrates/api-core/src/credentials/bmc_session_manager.rscrates/api-core/src/credentials/mod.rscrates/api-core/src/db_init.rscrates/api-core/src/errors.rscrates/api-core/src/ethernet_virtualization.rscrates/api-core/src/handlers/api.rscrates/api-core/src/handlers/attestation.rscrates/api-core/src/handlers/bmc_endpoint_explorer.rscrates/api-core/src/handlers/bmc_metadata.rscrates/api-core/src/handlers/component_manager.rscrates/api-core/src/handlers/credential.rscrates/api-core/src/handlers/dpf.rscrates/api-core/src/handlers/dpu.rscrates/api-core/src/handlers/dpu_remediation.rscrates/api-core/src/handlers/extension_service.rscrates/api-core/src/handlers/finder.rscrates/api-core/src/handlers/firmware.rscrates/api-core/src/handlers/host_reprovisioning.rscrates/api-core/src/handlers/ib_partition.rscrates/api-core/src/handlers/instance.rscrates/api-core/src/handlers/logical_partition.rscrates/api-core/src/handlers/machine.rscrates/api-core/src/handlers/machine_discovery.rscrates/api-core/src/handlers/machine_hardware_info.rscrates/api-core/src/handlers/machine_identity.rscrates/api-core/src/handlers/machine_interface.rscrates/api-core/src/handlers/machine_validation.rscrates/api-core/src/handlers/managed_host.rscrates/api-core/src/handlers/measured_boot.rscrates/api-core/src/handlers/network_security_group.rscrates/api-core/src/handlers/network_segment.rscrates/api-core/src/handlers/power_options.rscrates/api-core/src/handlers/power_shelf.rscrates/api-core/src/handlers/rack.rscrates/api-core/src/handlers/redfish.rscrates/api-core/src/handlers/scout_stream.rscrates/api-core/src/handlers/sku.rscrates/api-core/src/handlers/switch.rscrates/api-core/src/handlers/tenant_identity_config.rscrates/api-core/src/handlers/tpm_ca.rscrates/api-core/src/handlers/uefi.rscrates/api-core/src/handlers/utils.rscrates/api-core/src/handlers/vpc_peering.rscrates/api-core/src/handlers/vpc_prefix.rscrates/api-core/src/instance/mod.rscrates/api-core/src/ipxe.rscrates/api-core/src/network_segment/allocate.rscrates/api-core/src/run.rscrates/api-core/src/setup.rscrates/api-core/src/tests/common/api_fixtures/site_explorer.rscrates/api-core/src/tests/common/metadata.rscrates/api-core/src/tests/extension_service.rscrates/api-core/src/tests/ib_instance.rscrates/api-core/src/tests/ib_partition_lifecycle.rscrates/api-core/src/tests/instance.rscrates/api-core/src/tests/instance_config_update.rscrates/api-core/src/tests/instance_os.rscrates/api-core/src/tests/machine_states.rscrates/api-core/src/tests/measured_boot.rscrates/api-core/src/tests/network_segment.rscrates/api-core/src/tests/sku.rscrates/api-core/src/tests/tpm_ca.rscrates/api-core/src/tests/vpc_prefix.rscrates/api-core/tests/integration/power_options.rscrates/api-db/src/ip_allocator.rscrates/api-db/src/lib.rscrates/api-db/src/machine_interface_address.rscrates/api-db/src/power_shelf.rscrates/api-db/src/resource_pool.rscrates/api-db/src/switch.rscrates/api-db/src/work_lock_manager.rscrates/api-integration-tests/tests/lib.rscrates/api-model/src/attestation.rscrates/api-model/src/bmc_info.rscrates/api-model/src/errors.rscrates/api-model/src/extension_service/mod.rscrates/api-model/src/hardware_info.rscrates/api-model/src/ib_partition/mod.rscrates/api-model/src/lib.rscrates/api-model/src/machine/machine_id.rscrates/api-model/src/machine/mod.rscrates/api-model/src/machine/upgrade_policy.rscrates/api-model/src/network_devices.rscrates/api-model/src/power_shelf/power_shelf_id.rscrates/api-model/src/resource_pool/mod.rscrates/api-model/src/site_explorer/mod.rscrates/api-model/src/switch/switch_id.rscrates/api-model/src/tenant/mod.rscrates/api-test-helper/src/grpcurl.rscrates/api-test-helper/src/instance.rscrates/api-test-helper/src/machine.rscrates/api-test-helper/src/subnet.rscrates/api-test-helper/src/utils.rscrates/api-test-helper/src/vault.rscrates/api-web/src/lib.rscrates/api-web/src/network_segment.rscrates/authn/src/lib.rscrates/bmc-mock/src/mac_address_pool.rscrates/bmc-mock/src/mock_machine_router.rscrates/bmc-mock/src/redfish/expander_router.rscrates/bmc-proxy/src/acl.rscrates/bmc-proxy/src/bmc_proxy.rscrates/bmc-proxy/src/main.rscrates/bmc-proxy/src/setup.rscrates/certs/src/cert_renewal.rscrates/config-version/src/lib.rscrates/dhcp-server/src/errors.rscrates/dhcp/tests/common/kea.rscrates/dhcp/tests/common/kea_v6.rscrates/dns/src/config.rscrates/dns/src/main.rscrates/dpa-manager/src/card_handler/svpc.rscrates/dpa-manager/src/errors.rscrates/dpf/build.rscrates/dpf/src/error.rscrates/dpu-agent-utils/src/utils.rscrates/dpu-fmds-shared/src/machine_identity.rscrates/dsx-exchange-consumer/src/lib.rscrates/firmware/src/downloader.rscrates/fmds/src/http_request_metrics.rscrates/fmds/src/identity_signer.rscrates/fmds/src/phone_home.rscrates/health-report/src/lib.rscrates/health/src/collectors/nmxc.rscrates/health/src/lib.rscrates/host-support/src/hardware_enumeration.rscrates/host-support/src/hardware_enumeration/dpu.rscrates/host-support/src/hardware_enumeration/tpm.rscrates/host-support/src/registration.rscrates/ib-fabric/src/errors.rscrates/ib-fabric/src/ib/disable.rscrates/ib-fabric/src/ib/mod.rscrates/ib-fabric/src/ib/ufmclient/mod.rscrates/ib-fabric/src/ib/ufmclient/rest.rscrates/ib-partition-controller/src/io.rscrates/ipmi/src/bmc_mock.rscrates/ipmi/src/tool.rscrates/ipxe-renderer/src/lib.rscrates/libmlx/src/firmware/error.rscrates/libmlx/src/lockdown/error.rscrates/libmlx/src/lockdown/runner.rscrates/libmlx/src/profile/error.rscrates/libmlx/src/runner/error.rscrates/libmlx/tests/lockdown/test_error.rscrates/libnmxc/src/lib.rscrates/libnmxm/src/lib.rscrates/log-parser/src/carbide_reporting.rscrates/log-parser/src/main.rscrates/machine-a-tron/src/api_client.rscrates/machine-a-tron/src/dhcp_wrapper.rscrates/machine-a-tron/src/machine_state_machine.rscrates/machine-a-tron/src/machine_utils.rscrates/machine-a-tron/src/subnet.rscrates/machine-controller/src/handler.rscrates/machine-controller/src/lib.rscrates/machine-controller/src/scout_firmware_scripts.rscrates/machine-validation/src/errors.rscrates/metrics-utils/src/lib.rscrates/mqttea/src/errors.rscrates/mqttea/tests/errors.rscrates/network-segment-controller/src/io.rscrates/network/src/base_mac.rscrates/network/src/ip/prefix.rscrates/network/src/lib.rscrates/nras/src/lib.rscrates/nvlink-manager/src/errors.rscrates/nvue-client/src/client.rscrates/power-shelf-controller/src/io.rscrates/preingestion-manager/src/bfb_rshim_copier.rscrates/preingestion-manager/src/errors.rscrates/prometheus-text-parser/src/lib.rscrates/rack-controller/src/io.rscrates/rack-controller/src/validating.rscrates/rack/src/bms_client.rscrates/rack/src/rms_client.rscrates/redfish/src/libredfish/error.rscrates/rpc-utils/src/dhcp.rscrates/rpc/src/errors.rscrates/rpc/src/forge_resolver/mod.rscrates/rpc/src/forge_resolver/resolver.rscrates/rpc/src/forge_tls_client.rscrates/rvs/src/error.rscrates/scout/src/lib.rscrates/scout/src/main.rscrates/scout/src/stream.rscrates/secrets/src/forge_vault.rscrates/secrets/src/test_support/credentials.rscrates/site-explorer/src/errors.rscrates/site-explorer/src/lib.rscrates/site-explorer/tests/integration/health_report.rscrates/site-explorer/tests/integration/site_explorer.rscrates/ssh-console-mock-api-server/src/api.rscrates/ssh-console/src/bmc/client_pool.rscrates/ssh-console/src/bmc/connection.rscrates/ssh-console/src/bmc/connection_impl/ipmi.rscrates/ssh-console/src/bmc/connection_impl/ssh.rscrates/ssh-console/src/bmc/vendor.rscrates/ssh-console/src/config.rscrates/ssh-console/src/console_logger.rscrates/ssh-console/src/frontend.rscrates/ssh-console/src/lib.rscrates/ssh-console/src/main.rscrates/ssh-console/src/ssh_server.rscrates/ssh-console/tests/main.rscrates/ssh-console/tests/util/metrics.rscrates/ssh-console/tests/util/mod.rscrates/ssh-console/tests/util/ssh_client.rscrates/ssh-console/tests/util/ssh_console_test_helper.rscrates/ssh/src/lib.rscrates/state-controller/src/controller.rscrates/state-controller/src/controller/builder.rscrates/state-controller/src/controller/processor.rscrates/state-controller/src/state_handler.rscrates/switch-controller/src/certificate.rscrates/switch-controller/src/configuring.rscrates/switch-controller/src/endpoint.rscrates/switch-controller/src/io.rscrates/systemd/src/systemd.rscrates/tls/src/client_config.rscrates/tonic-client-wrapper/src/codegen.rscrates/utils/src/cmd.rscrates/utils/src/host_port_pair.rscrates/uuid/src/lib.rscrates/uuid/src/machine/mod.rscrates/uuid/src/power_shelf/mod.rscrates/uuid/src/switch/mod.rscrates/vpc-prefix-controller/src/io.rscrates/xtask/Cargo.tomlcrates/xtask/src/error_message_case.rscrates/xtask/src/main.rscrates/xtask/src/workspace_deps.rs
🚧 Files skipped from review as they are similar to previous changes (246)
- crates/fmds/src/phone_home.rs
- crates/api-core/src/handlers/api.rs
- crates/api-test-helper/src/machine.rs
- crates/api-core/src/handlers/attestation.rs
- crates/api-core/src/handlers/bmc_metadata.rs
- crates/agent/src/dpu/interface.rs
- crates/dpu-fmds-shared/src/machine_identity.rs
- crates/api-model/src/extension_service/mod.rs
- crates/api-model/src/bmc_info.rs
- crates/utils/src/host_port_pair.rs
- crates/api-model/src/network_devices.rs
- crates/api-core/src/handlers/switch.rs
- crates/agent/src/machine_inventory_updater.rs
- crates/api-web/src/network_segment.rs
- crates/api-db/src/machine_interface_address.rs
- crates/agent/src/lldp.rs
- crates/api-core/src/handlers/dpu_remediation.rs
- crates/api-core/src/handlers/scout_stream.rs
- crates/api-core/src/handlers/host_reprovisioning.rs
- crates/api-model/src/tenant/mod.rs
- crates/admin-cli/src/jump/cmd.rs
- crates/api-core/src/handlers/tpm_ca.rs
- crates/api-core/src/handlers/finder.rs
- crates/api-core/src/handlers/dpf.rs
- crates/api-core/src/handlers/logical_partition.rs
- crates/machine-controller/src/lib.rs
- crates/secrets/src/test_support/credentials.rs
- crates/admin-cli/src/rack/maintenance/cmd.rs
- crates/power-shelf-controller/src/io.rs
- crates/config-version/src/lib.rs
- crates/agent/src/traffic_intercept_bridging.rs
- crates/ib-fabric/src/ib/disable.rs
- crates/uuid/src/switch/mod.rs
- crates/api-core/src/attestation/tpm_ca_cert.rs
- crates/api-core/src/handlers/redfish.rs
- crates/ssh-console/src/config.rs
- crates/machine-a-tron/src/subnet.rs
- crates/api-core/src/handlers/network_security_group.rs
- crates/bmc-proxy/src/acl.rs
- crates/rack-controller/src/validating.rs
- crates/ssh-console/src/main.rs
- crates/switch-controller/src/certificate.rs
- crates/api-core/src/auth/mqtt_auth.rs
- crates/api-core/src/handlers/uefi.rs
- crates/dpf/src/error.rs
- crates/site-explorer/tests/integration/health_report.rs
- crates/rack-controller/src/io.rs
- crates/agent/src/ovs.rs
- crates/api-core/src/auth.rs
- crates/agent/src/hbn.rs
- crates/dhcp-server/src/errors.rs
- crates/agent/src/command_line.rs
- crates/api-core/src/handlers/rack.rs
- crates/api-core/src/db_init.rs
- crates/switch-controller/src/configuring.rs
- crates/api-core/src/ipxe.rs
- crates/uuid/src/power_shelf/mod.rs
- crates/agent/src/instrumentation/config.rs
- crates/api-core/src/network_segment/allocate.rs
- crates/dpu-agent-utils/src/utils.rs
- crates/health/src/collectors/nmxc.rs
- crates/ssh-console/src/lib.rs
- crates/ssh-console-mock-api-server/src/api.rs
- crates/xtask/src/main.rs
- crates/api-model/src/switch/switch_id.rs
- crates/dpa-manager/src/card_handler/svpc.rs
- crates/ssh-console/tests/util/metrics.rs
- crates/network/src/base_mac.rs
- crates/ssh-console/src/bmc/vendor.rs
- crates/authn/src/lib.rs
- crates/dpf/build.rs
- crates/api-model/src/machine/machine_id.rs
- crates/api-db/src/power_shelf.rs
- crates/switch-controller/src/endpoint.rs
- crates/nras/src/lib.rs
- crates/ssh-console/src/bmc/connection_impl/ipmi.rs
- crates/fmds/src/http_request_metrics.rs
- crates/api-model/src/power_shelf/power_shelf_id.rs
- crates/ipmi/src/bmc_mock.rs
- crates/api-core/tests/integration/power_options.rs
- crates/rpc/src/forge_resolver/mod.rs
- crates/network/src/ip/prefix.rs
- crates/tls/src/client_config.rs
- crates/site-explorer/tests/integration/site_explorer.rs
- crates/switch-controller/src/io.rs
- crates/api-test-helper/src/utils.rs
- crates/xtask/Cargo.toml
- crates/bmc-proxy/src/main.rs
- crates/api-core/src/handlers/component_manager.rs
- crates/agent/src/health.rs
- crates/ssh-console/tests/main.rs
- crates/api-core/src/credentials/bmc_session_manager.rs
- crates/agent/src/tests/common/mod.rs
- crates/ssh-console/src/frontend.rs
- crates/api-model/src/ib_partition/mod.rs
- STYLE_GUIDE.md
- crates/api-model/src/attestation.rs
- crates/ipmi/src/tool.rs
- crates/agent/src/extension_services/manager.rs
- crates/network/src/lib.rs
- crates/api-core/src/tests/ib_partition_lifecycle.rs
- crates/xtask/src/workspace_deps.rs
- crates/preingestion-manager/src/errors.rs
- crates/admin-cli/src/errors.rs
- crates/ib-fabric/src/ib/mod.rs
- crates/ib-fabric/src/ib/ufmclient/rest.rs
- crates/api-core/src/handlers/vpc_prefix.rs
- crates/api-db/src/resource_pool.rs
- crates/api-core/src/tests/extension_service.rs
- .github/workflows/ci.yaml
- crates/firmware/src/downloader.rs
- crates/api-core/src/handlers/machine_discovery.rs
- crates/nvue-client/src/client.rs
- crates/api-core/src/tests/vpc_prefix.rs
- crates/ssh-console/tests/util/ssh_console_test_helper.rs
- crates/systemd/src/systemd.rs
- crates/rpc-utils/src/dhcp.rs
- crates/dns/src/main.rs
- crates/rack/src/rms_client.rs
- crates/host-support/src/hardware_enumeration/dpu.rs
- crates/nvlink-manager/src/errors.rs
- crates/api-core/src/handlers/bmc_endpoint_explorer.rs
- crates/state-controller/src/controller/builder.rs
- crates/api-core/src/handlers/measured_boot.rs
- crates/dhcp/tests/common/kea.rs
- crates/state-controller/src/controller.rs
- crates/api-core/src/handlers/power_shelf.rs
- crates/metrics-utils/src/lib.rs
- crates/api-core/src/tests/tpm_ca.rs
- crates/ssh-console/src/console_logger.rs
- crates/agent/src/weave_ew_vpc_mock_server.rs
- crates/utils/src/cmd.rs
- crates/uuid/src/machine/mod.rs
- crates/rack/src/bms_client.rs
- crates/tonic-client-wrapper/src/codegen.rs
- crates/agent/src/lib.rs
- crates/bmc-mock/src/redfish/expander_router.rs
- crates/api-core/src/tests/common/metadata.rs
- Makefile.toml
- crates/api-test-helper/src/grpcurl.rs
- crates/api-test-helper/src/subnet.rs
- crates/ib-fabric/src/ib/ufmclient/mod.rs
- crates/scout/src/main.rs
- crates/ssh-console/tests/util/ssh_client.rs
- crates/agent/src/util.rs
- crates/machine-a-tron/src/dhcp_wrapper.rs
- crates/mqttea/tests/errors.rs
- crates/api-core/src/handlers/firmware.rs
- crates/ipxe-renderer/src/lib.rs
- crates/host-support/src/registration.rs
- crates/api-core/src/handlers/sku.rs
- crates/vpc-prefix-controller/src/io.rs
- crates/agent/src/mtu.rs
- crates/rpc/src/forge_resolver/resolver.rs
- crates/api-model/src/hardware_info.rs
- crates/api-core/src/handlers/tenant_identity_config.rs
- crates/dsx-exchange-consumer/src/lib.rs
- crates/agent/src/agent_platform.rs
- crates/api-core/src/handlers/instance.rs
- crates/libmlx/tests/lockdown/test_error.rs
- crates/agent/src/upgrade.rs
- crates/ssh/src/lib.rs
- crates/host-support/src/hardware_enumeration.rs
- crates/mqttea/src/errors.rs
- crates/machine-validation/src/errors.rs
- crates/api-integration-tests/tests/lib.rs
- crates/bmc-proxy/src/setup.rs
- crates/network-segment-controller/src/io.rs
- crates/api-core/src/ethernet_virtualization.rs
- crates/redfish/src/libredfish/error.rs
- crates/dpa-manager/src/errors.rs
- crates/api-core/src/tests/machine_states.rs
- crates/scout/src/stream.rs
- crates/libmlx/src/lockdown/runner.rs
- crates/api-core/src/handlers/machine.rs
- crates/api-core/src/handlers/machine_identity.rs
- crates/site-explorer/src/lib.rs
- crates/api-core/src/attestation/mod.rs
- crates/agent/src/network_monitor.rs
- crates/api-core/src/handlers/machine_validation.rs
- crates/api-core/src/handlers/power_options.rs
- crates/api-model/src/machine/upgrade_policy.rs
- crates/libmlx/src/runner/error.rs
- crates/api-model/src/site_explorer/mod.rs
- crates/api-model/src/errors.rs
- crates/state-controller/src/state_handler.rs
- crates/dhcp/tests/common/kea_v6.rs
- crates/prometheus-text-parser/src/lib.rs
- crates/rpc/src/forge_tls_client.rs
- crates/api-core/src/tests/network_segment.rs
- crates/preingestion-manager/src/bfb_rshim_copier.rs
- crates/log-parser/src/carbide_reporting.rs
- crates/api-core/src/run.rs
- crates/api-web/src/lib.rs
- crates/bmc-proxy/src/bmc_proxy.rs
- crates/health/src/lib.rs
- crates/certs/src/cert_renewal.rs
- crates/uuid/src/lib.rs
- crates/libmlx/src/lockdown/error.rs
- crates/machine-a-tron/src/machine_utils.rs
- crates/log-parser/src/main.rs
- crates/api-core/src/tests/ib_instance.rs
- crates/rvs/src/error.rs
- crates/api-model/src/lib.rs
- crates/machine-controller/src/scout_firmware_scripts.rs
- crates/api-core/src/attestation/measured_boot.rs
- crates/state-controller/src/controller/processor.rs
- crates/site-explorer/src/errors.rs
- crates/api-test-helper/src/instance.rs
- crates/agent/src/nvue.rs
- crates/libnmxc/src/lib.rs
- crates/ssh-console/src/ssh_server.rs
- crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
- crates/api-core/src/errors.rs
- crates/api-model/src/machine/mod.rs
- crates/ib-fabric/src/errors.rs
- crates/ssh-console/src/bmc/connection.rs
- crates/api-core/src/handlers/dpu.rs
- crates/libnmxm/src/lib.rs
- crates/bmc-mock/src/mac_address_pool.rs
- crates/api-core/src/handlers/credential.rs
- crates/api-core/src/tests/instance_os.rs
- crates/host-support/src/hardware_enumeration/tpm.rs
- crates/ssh-console/src/bmc/connection_impl/ssh.rs
- crates/rpc/src/errors.rs
- crates/agent/src/main_loop.rs
- crates/api-core/src/tests/instance_config_update.rs
- crates/ssh-console/tests/util/mod.rs
- crates/health-report/src/lib.rs
- crates/api-db/src/switch.rs
- crates/api-core/src/tests/measured_boot.rs
- crates/agent/src/periodic_config_fetcher.rs
- crates/agent/src/ethernet_virtualization.rs
- crates/api-core/src/setup.rs
- crates/secrets/src/forge_vault.rs
- crates/agent/src/containerd/container.rs
- crates/agent/src/astra_weave.rs
- crates/libmlx/src/profile/error.rs
- crates/xtask/src/error_message_case.rs
- crates/api-core/src/handlers/extension_service.rs
- crates/api-core/src/tests/instance.rs
- crates/machine-a-tron/src/machine_state_machine.rs
- crates/machine-controller/src/handler.rs
- crates/agent/src/extension_services/k8s_pod_handler.rs
- crates/ssh-console/src/bmc/client_pool.rs
- crates/libmlx/src/firmware/error.rs
| CarbideError::InvalidArgument("missing reference url".to_string()).into(), | ||
| ); |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Preserve meaningful acronyms and identifiers in error messages.
The normalized strings lowercase URL, ID, and UUID, conflicting with this PR’s stated preservation rule.
crates/api-core/src/handlers/managed_host.rs#L387-L388: usemissing reference URL.crates/api-db/src/ip_allocator.rs#L54-L58: usecircuit ID,instance ID, andmachine ID.crates/api-db/src/lib.rs#L360-L363: useUUIDin both conversion-error messages.
As per coding guidelines, error display messages must preserve meaningful acronyms and identifiers.
📍 Affects 3 files
crates/api-core/src/handlers/managed_host.rs#L387-L388(this comment)crates/api-db/src/ip_allocator.rs#L54-L58crates/api-db/src/lib.rs#L360-L363
🤖 Prompt for 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.
In `@crates/api-core/src/handlers/managed_host.rs` around lines 387 - 388,
Preserve acronym casing in the affected error messages: update
crates/api-core/src/handlers/managed_host.rs lines 387-388 to use “missing
reference URL”; update crates/api-db/src/ip_allocator.rs lines 54-58 to use
“circuit ID”, “instance ID”, and “machine ID”; and update both conversion-error
messages in crates/api-db/src/lib.rs lines 360-363 to use “UUID”.
Source: Coding guidelines
The `lint-error-messages` checker from NVIDIA#3566 only saw a message passed as a bare string literal, so anything wrapped in a `format!` slipped through -- `CarbideError::invalid_argument(format!("Duplicate ..."))`, `.context(format!("Failed ..."))`, and friends kept their capital lead because the literal hid inside the macro. That was a documented gap, and it was the exact class that drifted between source and test while NVIDIA#3566 was landing: the checker couldn't `--fix` the source, so a hand-edited assertion could silently disagree with it. This teaches the checker to peel a wrapping `format!` when it sits in a slot we already treat as an error message, then sweeps what it now reaches. Primary callouts are: - `leading_str_lit` now peels a `format!`/`format_args!` macro down to its format-string literal, but only in the argument slots the checker already trusts -- a `CarbideError`/`Status` constructor or a `.context`/`.wrap_err` method. A bare `format!` (a log line, a `flint` command echo) is never touched, and the existing `{placeholder}` handling leaves interpolation names like `{MachineId}` intact. - Ran `--fix` over what the widening reaches: it lowercased 246 previously-invisible messages across 69 files, all inside error constructs, with acronyms (`VPC`, `EK`), CamelCase types (`RsaPublicKey`, `MachineId`), and placeholders preserved. - Updated the test assertions that pinned the old strings -- attestation, tpm-ca, site/rack explorers, machine discovery/interfaces, instance allocation, ib-partition, and the duplicate-extension-services allocate path, whose `format!` source is now swept so it rejoins its already-lowercased twin. Manual `impl Display`/`write!` bodies and struct-literal error fields (`CarbideError::Internal { message }`) stay out of reach, still marked with the checker's `TODO` -- a further follow-up. Tests added! -- `end_to_end_rewrite_reaches_format` drives the real span -> byte-range -> splice path across a `CarbideError` constructor and a `.context`, checks that `{MachineId}` survives, and asserts a bare `format!`/log macro is left alone. This continues NVIDIA#3566 and supports NVIDIA#3468 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
The `lint-error-messages` checker from NVIDIA#3566 only saw a message passed as a bare string literal, so anything wrapped in a `format!` slipped through -- `CarbideError::invalid_argument(format!("Duplicate ..."))`, `.context(format!("Failed ..."))`, and friends kept their capital lead because the literal hid inside the macro. That was a documented gap, and it was the exact class that drifted between source and test while NVIDIA#3566 was landing: the checker couldn't `--fix` the source, so a hand-edited assertion could silently disagree with it. This teaches the checker to peel a wrapping `format!` when it sits in a slot we already treat as an error message, then sweeps what it now reaches. Primary callouts are: - `leading_str_lit` now peels a `format!`/`format_args!` macro down to its format-string literal, but only in the argument slots the checker already trusts -- a `CarbideError`/`Status` constructor or a `.context`/`.wrap_err` method. A bare `format!` (a log line, a `flint` command echo) is never touched, and the existing `{placeholder}` handling leaves interpolation names like `{MachineId}` intact. - Ran `--fix` over what the widening reaches: it lowercased 246 previously-invisible messages across 69 files, all inside error constructs, with acronyms (`VPC`, `EK`), CamelCase types (`RsaPublicKey`, `MachineId`), and placeholders preserved. - Updated the test assertions that pinned the old strings -- attestation, tpm-ca, site/rack explorers, machine discovery/interfaces, instance allocation, ib-partition, and the duplicate-extension-services allocate path, whose `format!` source is now swept so it rejoins its already-lowercased twin. Manual `impl Display`/`write!` bodies and struct-literal error fields (`CarbideError::Internal { message }`) stay out of reach, still marked with the checker's `TODO` -- a further follow-up. Tests added! -- `end_to_end_rewrite_reaches_format` drives the real span -> byte-range -> splice path across a `CarbideError` constructor and a `.context`, checks that `{MachineId}` survives, and asserts a bare `format!`/log macro is left alone. This continues NVIDIA#3566 and supports NVIDIA#3468 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
The `lint-error-messages` checker from NVIDIA#3566 only saw a message passed as a bare string literal, so anything wrapped in a `format!` slipped through -- `CarbideError::invalid_argument(format!("Duplicate ..."))`, `.context(format!("Failed ..."))`, and friends kept their capital lead because the literal hid inside the macro. That was a documented gap, and it was the exact class that drifted between source and test while NVIDIA#3566 was landing: the checker couldn't `--fix` the source, so a hand-edited assertion could silently disagree with it. This teaches the checker to peel a wrapping `format!` when it sits in a slot we already treat as an error message, then sweeps what it now reaches. Primary callouts are: - `leading_str_lit` now peels a `format!`/`format_args!` macro down to its format-string literal, but only in the argument slots the checker already trusts -- a `CarbideError`/`Status` constructor or a `.context`/`.wrap_err` method. A bare `format!` (a log line, a `flint` command echo) is never touched, and the existing `{placeholder}` handling leaves interpolation names like `{MachineId}` intact. - Ran `--fix` over what the widening reaches: it lowercased 246 previously-invisible messages across 69 files, all inside error constructs, with acronyms (`VPC`, `EK`), CamelCase types (`RsaPublicKey`, `MachineId`), and placeholders preserved. - Updated the test assertions that pinned the old strings -- attestation, tpm-ca, site/rack explorers, machine discovery/interfaces, instance allocation, ib-partition, and the duplicate-extension-services allocate path, whose `format!` source is now swept so it rejoins its already-lowercased twin. Manual `impl Display`/`write!` bodies and struct-literal error fields (`CarbideError::Internal { message }`) stay out of reach, still marked with the checker's `TODO` -- a further follow-up. Tests added! -- `end_to_end_rewrite_reaches_format` drives the real span -> byte-range -> splice path across a `CarbideError` constructor and a `.context`, checks that `{MachineId}` survives, and asserts a bare `format!`/log macro is left alone. This continues NVIDIA#3566 and supports NVIDIA#3468 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
#3595) ## Summary A follow-up to #3566, as part of adopting the _Rust API Guidelines convention (C-GOOD-ERR)_: that extends the `lint-error-messages` checker to reach messages wrapped in a `format!`. The original checker only saw a bare string literal, so `CarbideError::invalid_argument(format!("Duplicate ..."))` and `.context(format!("Failed ..."))` kept their capital lead -- and because the checker couldn't `--fix` them, those were the sites that drifted between source and test as #3566 landed. - `leading_str_lit` now peels a `format!`/`format_args!` down to its format-string literal, but only in the slots the checker already trusts -- a `CarbideError`/`Status` constructor or a `.context`/`.wrap_err` method. A bare `format!` (a log line, a command echo) is left alone, and `{placeholder}` names like `{MachineId}` are preserved. - `--fix` then lowercased **246 messages across 69 files** that were previously invisible, with acronyms (`VPC`, `EK`), CamelCase types (`RsaPublicKey`), and placeholders preserved. - Updated the test assertions that pinned the old strings -- attestation, tpm-ca, site-explorer, ib-partition, and the duplicate-extension-services allocate path, whose `format!` source now rejoins its already-lowercased twin. Manual `impl Display`/`write!` bodies and struct-literal error fields (`CarbideError::Internal { message }`) stay out of reach, still marked with the checker's `TODO` -- a further follow-up. Continues #3566 · supports #3468 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
Our error messages were split about 50/50 on casing --
"Failed to X"next to"failed to X","Error"vs"error"-- with no rule written down anywhere. This adopts the Rust API Guidelines convention (C-GOOD-ERR): an error'sDisplaytext reads as a lowercase phrase with no trailing period, so it composes cleanly once it's wrapped into a larger chain. A newcargo xtask lint-error-messagescheck keeps it that way.xtask lint-error-messages-- asyn-based check that flags, and with--fixrewrites, the message in#[error(...)],anyhow!/bail!,.context()/.wrap_err(), andCarbideError/Statusconstructors. It lowercases every plain capitalized word and drops a trailing period; a word with an internal capital -- an acronym (BMC) or a CamelCase identifier (CreateVirtualNetwork) -- is left alone, and// xtask:allow-error-caseopts a line out.--fix-- 1,054 messages in the product crates plus 138 in test and mock helpers, roughly 260 files in all (this includes theCarbideErrorconstructors that carry most of our user-facing API errors). Mixed-case proper nouns (Redfish,Vault) take the lowercase hit;scout's attestation retry now matches its trigger text case-insensitively, so the sweep doesn't quietly change when it retries.cargo make lint-error-messages, a new CI step besidecarbide-lints, with the convention documented inSTYLE_GUIDE.md.This is the errors half -- logging messages are a separate pass. Messages carried via
format!(...)or struct-literal error fields (CarbideError::Internal { message }) are out of the checker's current reach, marked with aTODOand left for a documented follow-up.This supports #3468