Skip to content

refactor: make tracing logs consistently structured and searchable#3479

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

refactor: make tracing logs consistently structured and searchable#3479
chet wants to merge 1 commit into
NVIDIA:mainfrom
chet:gh-issue-3476

Conversation

@chet

@chet chet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Convert roughly 1,400 direct tracing events across more than 50 crates to stable messages with semantic structured fields.
  • Keep IDs, endpoints, counts, states, and errors typed and searchable while preserving trace levels and intentional Display, Debug, and custom formatting.
  • Document the structured-logging convention in STYLE_GUIDE.md, including field-formatting guidance and narrow presentation-oriented exceptions.
  • Preserve CLI output, child-process streams, aligned or multiline displays, and logging fixtures where the rendered text is itself the payload.

Verification

  • cargo make format-nightly
  • cargo make clippy
  • cargo make carbide-lints
  • cargo test across 24 affected libraries, followed by all 1,442 API-core library tests and a nine-library regression matrix for the final review deltas
  • Six local CodeRabbit review passes; all actionable findings addressed and the final 17-file feedback delta returned no findings
  • Syntax-aware residual audit of interpolated tracing calls; 70 reviewed presentation/passthrough exceptions remain intentionally rendered

This supports #3476

@chet chet requested a review from a team as a code owner July 14, 2026 08:35
@chet

chet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The pull request standardizes tracing across application, controller, service, library, mock, and test code by replacing interpolated messages with stable messages and structured fields. It also documents the conventions and exceptions in STYLE_GUIDE.md.

Changes

Structured tracing migration

Layer / File(s) Summary
Logging conventions
STYLE_GUIDE.md
Defines stable literal event messages, structured dynamic fields, shorthand formatting, semantic field naming, formatter-key restrictions, and payload-formatting exceptions.
Runtime instrumentation
crates/agent/..., crates/api-core/..., crates/api-db/..., crates/machine-controller/..., crates/preingestion-manager/..., crates/site-explorer/...
Converts operational logs and error reports to structured tracing fields while preserving control flow.
Supporting components and tests
crates/*
Applies the same logging format across networking, hardware, firmware, MQTT, controllers, mocks, helpers, and integration tests.
Focused observability refactors
crates/health/src/discovery/*, crates/api-db/src/work_lock_manager.rs, crates/ib-fabric/src/lib.rs
Standardizes collector stop reasons, task logging, failure-stage fields, and selected tracing imports.

Estimated code review effort: 5 (Critical) | ~120 minutes

Possibly related issues

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: standardizing tracing logs to structured, searchable fields.
Description check ✅ Passed The description matches the changeset and clearly summarizes the logging refactor, documentation update, and validation work.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.rs

ast-grep timed out on this file


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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 17

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
crates/ib-fabric/src/lib.rs (1)

387-438: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Model failure_stage as an enum.

failure_stage has a closed set of values (build_client, health_check, load_ports, and load_partitions) but is represented as &'static str. Introduce an internal enum with Display, pass variants at these call sites, and log it with %failure_stage so invalid stage values cannot be introduced accidentally.

As per coding guidelines, finite Rust values should be modeled with enums rather than raw strings.

Also applies to: 456-468

🤖 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/ib-fabric/src/lib.rs` around lines 387 - 438, Replace the raw
`&'static str` failure-stage parameter used by `note_fabric_error` with an
internal enum covering `build_client`, `health_check`, `load_ports`, and
`load_partitions`; implement `Display` for that enum, pass the corresponding
variants at every visible call site, and format the stage with `%failure_stage`
in logging.

Source: Coding guidelines

crates/nvlink-manager/src/lib.rs (1)

2381-2397: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Do not skip DB persistence for a created NMX-C partition. If partition_id is missing or does not fit i32, this path records success and commits the transaction while leaving the new external partition without a database row. That leaves reconciliation with an inconsistent source of truth; either widen the stored ID type or fail the operation with a recovery path instead of continueing.

🤖 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/nvlink-manager/src/lib.rs` around lines 2381 - 2397, The NMX-C
partition creation flow must not commit success when the partition ID is missing
or cannot fit the database type. Update the handling around
matching_partition.partition_id and the i32::try_from conversion to use a
compatible wider stored ID or fail the operation through the existing
recovery/error path, ensuring no successful transaction commits without
persisting the created partition.
🧹 Nitpick comments (13)
crates/machine-controller/src/handler.rs (1)

4101-4101: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Avoid discarding the Result with let _ =.

This path intentionally treats rshim failure as non-blocking, but let _ = obscures that intent. Use an explicit if let Err(e) branch (or .ok()) so the ignored failure is deliberate and readable.

As per coding guidelines, intentionally ignored results should use .ok() rather than discarding them with let _.

🤖 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 4101, Update the rshim
enablement error-handling chain around the tracing call to avoid discarding the
Result with let _. Use .ok() to explicitly mark the non-blocking failure as
intentionally ignored, while preserving the existing info-level error logging.

Source: Coding guidelines

crates/agent/src/upgrade.rs (1)

72-75: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Record errors directly instead of eagerly flattening them.

error = format!("{err:#}") allocates and converts the report into an untyped string, contrary to the structured-field convention. Use error = ?err for debug/chain context, or %err when display formatting is intended, including at Line 146.

Also applies to: 83-86, 146-146

🤖 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/upgrade.rs` around lines 72 - 75, Update the error fields in
the upgrade error logs, including the branches around the shown log and line
146, to record the error directly with structured tracing syntax instead of
eagerly calling format!. Use debug capture for chained report context (or
display capture where explicitly intended), preserving the existing messages and
control flow.

Source: Coding guidelines

crates/api-core/src/scout_stream.rs (1)

103-106: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Apply tracing shorthand consistently across the refactor. These explicit same-name assignments are valid but redundant and conflict with the repository logging convention.

  • crates/api-core/src/scout_stream.rs#L103-L106: replace machine_id = %machine_id with %machine_id.
  • crates/api-core/src/scout_stream.rs#L120-L125: replace same-name machine_id and flow_uuid assignments with shorthand.
  • crates/api-core/src/scout_stream.rs#L128-L133: replace same-name machine_id, flow_uuid, and response assignments with shorthand.
  • crates/api-core/src/scout_stream.rs#L140-L143: replace machine_id = %machine_id with %machine_id.
  • crates/api-core/src/scout_stream.rs#L150-L153: replace machine_id = %machine_id with %machine_id.
  • crates/api-core/src/scout_stream.rs#L156-L158: replace machine_id = %machine_id with %machine_id.
  • crates/api-core/src/scout_stream.rs#L218-L220: replace same-name machine_id and flow_uuid assignments with shorthand.
  • crates/api-core/src/scout_stream.rs#L270-L274: replace same-name machine_id and response assignments with shorthand.
  • crates/api-core/src/scout_stream.rs#L278-L282: replace same-name machine_id and flow_uuid_pb assignments with shorthand.
  • crates/api-core/src/handlers/machine_discovery.rs#L421-L421: replace stable_machine_id = %stable_machine_id with %stable_machine_id.
  • crates/api-test-helper/src/machine_a_tron.rs#L78-L78: replace desired_firmware = ?desired_firmware with ?desired_firmware.
  • crates/api-core/src/handlers/site_explorer.rs#L261-L261: replace bmc_ip = %bmc_ip with %bmc_ip.
  • crates/firmware/src/config.rs#L69-L69: replace key = %key with %key.
  • crates/firmware/src/config.rs#L186-L186: replace firmware_directory = ?firmware_directory with ?firmware_directory.
  • crates/firmware/src/config.rs#L207-L207: replace metadata_path = ?metadata_path with ?metadata_path.

As per coding guidelines, use native shorthand for tracing::Value fields.

🤖 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/scout_stream.rs` around lines 103 - 106, Replace
redundant same-name tracing field assignments with native shorthand while
preserving each field’s existing `%` or `?` formatter: update machine_id,
flow_uuid, response, and flow_uuid_pb in crates/api-core/src/scout_stream.rs at
103-106, 120-125, 128-133, 140-143, 150-153, 156-158, 218-220, 270-274, and
278-282; stable_machine_id in crates/api-core/src/handlers/machine_discovery.rs
at 421-421; desired_firmware in crates/api-test-helper/src/machine_a_tron.rs at
78-78; bmc_ip in crates/api-core/src/handlers/site_explorer.rs at 261-261; and
key, firmware_directory, and metadata_path in crates/firmware/src/config.rs at
69-69, 186-186, and 207-207.

Source: Coding guidelines

crates/api-db/src/machine_interface.rs (1)

610-614: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Preserve the relay list as a structured value.

relays = %relaystr records a preformatted comma-separated string instead of the existing &[IpAddr]. Use relays = ?relays at both sites so the structured event retains the endpoint collection; keep relaystr only where the warning logs still require it.

Proposed change
 tracing::info!(
     %mac_address,
-    relays = %relaystr,
+    relays = ?relays,
     "Found no existing machine with mac address using networks with relays",
 );

As per coding guidelines and the PR objective, dynamic endpoint values should remain structured and searchable rather than being preformatted into a string.

Also applies to: 669-673

🤖 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/machine_interface.rs` around lines 610 - 614, Update the
info log in the machine lookup flow, and the corresponding log at the other
relay-reporting site, to record the original relays collection with structured
debug formatting (`relays = ?relays`) instead of the preformatted relaystr
string. Retain relaystr only for warning logs that explicitly require the
formatted representation.

Source: Coding guidelines

crates/agent/src/tests/full.rs (1)

339-339: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Retain the error as a structured tracing value.

format!("{e:#}") eagerly allocates and converts the report into an untyped string. Prefer error = ?e or error = %e, depending on the desired rendering.

Proposed fix
-            tracing::error!(error = format!("{e:#}"), "Failed to start DPU agent");
+            tracing::error!(error = ?e, "Failed to start DPU agent");

As per coding guidelines, dynamic values should use tracing’s %field/?field forms rather than pre-rendered strings.

🤖 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 339, Update the tracing::error! call
in the DPU agent startup failure path to pass the captured error e directly as a
structured field, using tracing’s ? or % formatting syntax instead of
format!("{e:#}"). Preserve the existing "Failed to start DPU agent" message.

Sources: Coding guidelines, Path instructions

crates/api-core/src/machine_update_manager/host_firmware.rs (1)

76-79: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Apply native tracing shorthand consistently.

These fields are valid but unnecessarily spell out same-name variables. Use the shorthand forms required by the repository convention.

  • crates/api-core/src/machine_update_manager/host_firmware.rs#L76-L79: use ?fw_config_snapshot.
  • crates/api-core/src/machine_update_manager/host_firmware.rs#L189-L192: use ?firmware_config.
  • crates/api-core/src/tests/dpu_reprovisioning.rs#L1359-L1362: use ?last_reboot_requested.
  • crates/dpu-remediation/src/remediation.rs#L231-L234: use ?error.
  • crates/machine-a-tron/src/host_machine.rs#L407-L410: use ?request.
  • crates/machine-a-tron/src/host_machine.rs#L429-L430: use dpu_index.
  • crates/machine-a-tron/src/host_machine.rs#L671-L674: use %machine_id.

As per coding guidelines, use native shorthand for tracing::Value fields.

🤖 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/machine_update_manager/host_firmware.rs` around lines 76
- 79, Update the affected tracing fields to use native same-name shorthand: in
crates/api-core/src/machine_update_manager/host_firmware.rs lines 76-79 for
fw_config_snapshot and lines 189-192 for firmware_config;
crates/api-core/src/tests/dpu_reprovisioning.rs lines 1359-1362 for
last_reboot_requested; crates/dpu-remediation/src/remediation.rs lines 231-234
for error; and crates/machine-a-tron/src/host_machine.rs lines 407-410 for
request, 429-430 for dpu_index, and 671-674 for machine_id. Preserve the
existing tracing levels and messages while using the appropriate debug or
display shorthand.

Sources: Coding guidelines, Path instructions

crates/api-core/src/handlers/svpc.rs (1)

424-428: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use Display formatting for the error field.

CarbideError is logged with ?e here, while adjacent handlers use %e. Change this to error = %e for consistent human-readable error output.

🤖 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/svpc.rs` around lines 424 - 428, Update the
tracing::error! call in the DPA device handler to format the CarbideError field
with Display syntax, changing the error field from debug formatting to %e while
preserving the existing device_info field and message.

Source: Coding guidelines

crates/api-core/src/handlers/extension_service.rs (1)

143-146: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use one consistent error field name for credential cleanup failures.

The create/update paths emit delete_error, while the delete path emits error for the same failure class. Standardize on one key so log queries and dashboards do not need two schemas.

This supports the PR objective of stable, searchable structured logging.

Also applies to: 390-393, 524-528

🤖 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 143 - 146,
Standardize credential cleanup failure logging on the existing delete_error
field name. Update the affected tracing::warn! calls in the create, update, and
delete paths, including the referenced locations, so each uses delete_error for
the deletion error value while preserving the existing messages and behavior.
crates/api-core/src/handlers/astra.rs (1)

332-335: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Standardize Display formatting for String-valued tracing fields. These fields use Debug formatting for values that are plain strings, which can introduce quoting and inconsistent log output.

  • crates/api-core/src/handlers/astra.rs#L332-L335: change mac_address = ?obs.mac_address to mac_address = %obs.mac_address.
  • crates/scout/src/main.rs#L532-L535: use %device_action.pci_name.
  • crates/scout/src/main.rs#L565-L568: use %dev_pci_name.
  • crates/scout/src/main.rs#L588-L591: use %dev_pci_name.
  • crates/scout/src/main.rs#L665-L668: use %dev_pci_name.

As per coding guidelines, use %field for Display values and ?field for Debug values.

🤖 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/astra.rs` around lines 332 - 335, Standardize
tracing field formatting by using Display syntax for the String-valued fields:
update mac_address in crates/api-core/src/handlers/astra.rs (lines 332-335),
device_action.pci_name in crates/scout/src/main.rs (lines 532-535), and
dev_pci_name in crates/scout/src/main.rs (lines 565-568, 588-591, and 665-668)
from Debug formatting to Display formatting; leave other fields unchanged.

Source: Coding guidelines

crates/dhcp-server/src/main.rs (1)

118-122: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use Display formatting for listen_address.

Line 119 uses ?listen_address, while Line 159 uses %listen_address for the same SocketAddr field. Use %listen_address consistently so this semantic field follows the repository’s formatting convention.

Suggested fix
-                ?listen_address,
+                %listen_address,

As per coding guidelines, use %field for Display values and ?field for Debug values.

🤖 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/main.rs` around lines 118 - 122, Update the DHCP
server listening log’s listen_address field in the tracing::info! call to use
Display formatting with %listen_address instead of Debug formatting with
?listen_address, matching the existing formatting used for the same field
elsewhere.

Source: Coding guidelines

crates/agent/src/machine_inventory_updater.rs (1)

107-108: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Use tracing’s %/? formatter instead of pre-formatting the error.

error = format!("{e:#}") materializes a new string before tracing records the event and bypasses the repository’s structured-field convention. Record e directly with error = %e or error = ?e, depending on the required rendering.

🤖 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/machine_inventory_updater.rs` around lines 107 - 108, Update
the error field in the update_agent_reported_inventory error log to pass the
captured error directly through tracing’s formatter, using error = %e or error =
?e as appropriate, instead of pre-formatting it with format!("{e:#}").

Sources: Coding guidelines, Path instructions

crates/mqttea/src/client/core.rs (1)

180-183: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use Display formatting for error fields.

These are error values, so record them as error = %e / error = %cred_err rather than implementation-oriented Debug output.

Proposed change
- error = ?e,
+ error = %e,

- error!(error = ?e, "MQTT event loop connection error");
+ error!(error = %e, "MQTT event loop connection error");

- error = ?cred_err,
+ error = %cred_err,

As per coding guidelines, “Use native shorthand for tracing::Value, %field for Display, and ?field for Debug.”

Also applies to: 304-305, 325-327

🤖 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/mqttea/src/client/core.rs` around lines 180 - 183, Update the error
fields in the re-subscription and related error logs to use tracing’s Display
formatter (`%`) instead of Debug formatter (`?`) for the error values `e` and
`cred_err`. Apply this consistently to the occurrences around the fresh-session
handling and the additional locations identified in the comment.

Source: Coding guidelines

crates/preingestion-manager/src/lib.rs (1)

3244-3247: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Handle the ignored RSHIM result explicitly.

Using map_err for logging and then discarding the transformed result obscures that failure is intentionally non-fatal.

Proposed change
- let _ = redfish_client
-     .enable_rshim_bmc()
-     .await
-     .map_err(|e| tracing::error!(error = %e, "Failed to enable RSHIM on BMC"));
+ if let Err(error) = redfish_client.enable_rshim_bmc().await {
+     tracing::error!(%error, "Failed to enable RSHIM on BMC");
+ }

As per coding guidelines, “Do not discard results with let _unused = foo(); use .ok() when failure is intentionally ignored.”

🤖 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/preingestion-manager/src/lib.rs` around lines 3244 - 3247, Update the
enable_rshim_bmc call to handle its non-fatal failure explicitly: retain the
existing error logging while converting the intentionally ignored result with
.ok() instead of using map_err followed by let _. Locate this change in the
RSHIM enablement flow around redfish_client.enable_rshim_bmc().await.

Source: Coding guidelines

🤖 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/admin-cli/src/rpc.rs`:
- Around line 196-199: Preserve the conversion error in both structured logs:
update the invalid UUID-type log in crates/admin-cli/src/rpc.rs lines 196-199
and the invalid machine-owner log in lines 228-231 to include the caught error
as the structured field error = %e, while retaining the existing raw numeric
fields.

In `@crates/agent/src/nvue.rs`:
- Around line 1049-1055: Preserve child-process stdout/stderr as rendered log
message payloads rather than structured fields. Update the affected logging
sites in crates/agent/src/nvue.rs at lines 1049-1055, 923, 1010, 1029, and 1068,
and crates/agent/src/hbn.rs at lines 131-135; each site requires the same change
so multiline output and escaping remain operator-visible.

In `@crates/api-core/src/handlers/bmc_endpoint_explorer.rs`:
- Around line 396-399: In the is_infinite_boot_enabled handler’s successful
tracing::info! call, rename the structured field from ip_address to
endpoint_address while continuing to use bmc_endpoint_request.ip_address as its
value; keep the existing log message and other fields unchanged.

In `@crates/api-core/src/handlers/svpc.rs`:
- Around line 361-364: Update the error logging in the SVPC handler to avoid
serializing complete API payloads or model objects: at
crates/api-core/src/handlers/svpc.rs lines 361-364 remove the full req field; at
lines 372-375 replace full rep logging with a fixed diagnostic message; at lines
402-405 log only bounded report metadata; at lines 414-417 log bounded
observation identifiers; at lines 424-425 log selected device fields instead of
devinfo; and at lines 434-437 log selected DPA identifiers instead of the full
object. Apply the same bounded report metadata approach at lines 640-643, using
filtered identifiers, counts, and error context throughout.

In `@crates/api-core/src/machine_validation/mod.rs`:
- Around line 283-289: In the machine validation metrics update flow, move the
tracing::debug! call containing "Machine validation metrics updated" to execute
after self.metric_holder.update_metrics(metrics). Keep the logged metric fields
unchanged.

In `@crates/api-core/src/tests/common/api_fixtures/mod.rs`:
- Around line 2313-2317: Update the tracing::trace! fields
instance_network_config_version and instance_config_version to log their Option
values with Debug formatting, preserving None rather than converting missing
values to empty strings; leave the existing network_config_version field
unchanged.

In `@crates/api-db/src/work_lock_manager.rs`:
- Around line 322-367: Keep the keepalive task represented in the production
lock lifecycle instead of dropping join_handle, so unexpected task termination
is observed and handled. Update the surrounding release/close flow for the lock
manager to retain and asynchronously await the handle, or register it with the
manager’s JoinSet; use compile-time #[cfg(test)] and #[cfg(not(test))] branches
rather than cfg!(test), preserving the existing test behavior.

In `@crates/dns-record/src/lib.rs`:
- Line 182: Update the logging call in the serial-generation flow to parse
formatted_data into a numeric u32 before recording it. Replace the
string-formatted serial field in the debug! event with the parsed numeric value,
preserving the existing “generated serial for DNS zone” message and handling the
parse result appropriately.

In `@crates/health/src/api_client.rs`:
- Around line 330-333: Update the tracing::debug! call in the machine-details
fetch flow to report the actual fetched chunk size using ids_chunk.len() instead
of the fixed 100 value, while preserving the existing “Fetched machine details”
message and other fields.

In `@crates/machine-a-tron/src/machine_state_machine.rs`:
- Around line 566-569: Update the tracing::warn! call in the relay fallback
branch to use neutral wording that covers relay non-response, send failure, and
channel cancellation. Replace the “did not answer” message while retaining the
primary_mac context and direct-request fallback behavior.

In `@crates/machine-controller/src/handler.rs`:
- Around line 3918-3923: In the firmware lookup error handling within the
inspect_err closure, remove the standalone tracing::error call and retain only
the structured tracing::error event that includes machine_id and error. Ensure
each failed DPU UEFI firmware lookup emits exactly one error event.

In `@crates/nvlink-manager/src/lib.rs`:
- Around line 1817-1821: Update the tracing::error! message in the
RemoveFromUnknownPartition handling to use neutral wording for any missing NMX-C
partition, rather than referring specifically to a default partition; preserve
the existing GPU, machine, and partition context fields.

In `@crates/preingestion-manager/src/lib.rs`:
- Around line 1358-1360: Update the generic error arm in the chassis-reset
handling to include the endpoint address as a structured tracing field with a
stable semantic name, alongside the existing error field. Preserve the current
failure message and behavior while making the address available for correlating
concurrent reset failures.

In `@crates/scout/src/attestation.rs`:
- Around line 162-165: Remove sensitive authentication data from structured
logs: in crates/scout/src/attestation.rs lines 162-165, update the activation
log in the credential activation flow to replace digest.value() with a
non-sensitive indicator or metadata; in
crates/machine-a-tron/src/mock_ssh_server.rs lines 288-303, remove the password
field from both authentication log entries while preserving their non-sensitive
context.

In `@crates/site-explorer/src/bmc_endpoint_explorer.rs`:
- Around line 889-893: Update the credential lookup error branches throughout
the affected logic, including the handlers near the visible NVOS admin lookup
and the listed repeated branches, so they no longer classify every Err as a
missing Vault entry. Preserve and log the underlying error with error = %e while
using a generic failed-to-load-credentials message, or match MissingCredentials
explicitly and retain the setup message only for that case.

In `@crates/site-explorer/src/lib.rs`:
- Line 2631: Update the log message near the site-explorer host activation flow
to replace the malformed contraction “isnt” with “isn't”, preserving the rest of
the message unchanged.

In `@crates/ssh-console/src/bmc/connection.rs`:
- Around line 122-125: Update the tracing::info! call in the BMC connection
override flow to stop logging the full connection_details value. Log only safe
diagnostic fields, or explicitly redact ssh_key_path while preserving
machine_or_instance_id and other necessary context.

---

Outside diff comments:
In `@crates/ib-fabric/src/lib.rs`:
- Around line 387-438: Replace the raw `&'static str` failure-stage parameter
used by `note_fabric_error` with an internal enum covering `build_client`,
`health_check`, `load_ports`, and `load_partitions`; implement `Display` for
that enum, pass the corresponding variants at every visible call site, and
format the stage with `%failure_stage` in logging.

In `@crates/nvlink-manager/src/lib.rs`:
- Around line 2381-2397: The NMX-C partition creation flow must not commit
success when the partition ID is missing or cannot fit the database type. Update
the handling around matching_partition.partition_id and the i32::try_from
conversion to use a compatible wider stored ID or fail the operation through the
existing recovery/error path, ensuring no successful transaction commits without
persisting the created partition.

---

Nitpick comments:
In `@crates/agent/src/machine_inventory_updater.rs`:
- Around line 107-108: Update the error field in the
update_agent_reported_inventory error log to pass the captured error directly
through tracing’s formatter, using error = %e or error = ?e as appropriate,
instead of pre-formatting it with format!("{e:#}").

In `@crates/agent/src/tests/full.rs`:
- Line 339: Update the tracing::error! call in the DPU agent startup failure
path to pass the captured error e directly as a structured field, using
tracing’s ? or % formatting syntax instead of format!("{e:#}"). Preserve the
existing "Failed to start DPU agent" message.

In `@crates/agent/src/upgrade.rs`:
- Around line 72-75: Update the error fields in the upgrade error logs,
including the branches around the shown log and line 146, to record the error
directly with structured tracing syntax instead of eagerly calling format!. Use
debug capture for chained report context (or display capture where explicitly
intended), preserving the existing messages and control flow.

In `@crates/api-core/src/handlers/astra.rs`:
- Around line 332-335: Standardize tracing field formatting by using Display
syntax for the String-valued fields: update mac_address in
crates/api-core/src/handlers/astra.rs (lines 332-335), device_action.pci_name in
crates/scout/src/main.rs (lines 532-535), and dev_pci_name in
crates/scout/src/main.rs (lines 565-568, 588-591, and 665-668) from Debug
formatting to Display formatting; leave other fields unchanged.

In `@crates/api-core/src/handlers/extension_service.rs`:
- Around line 143-146: Standardize credential cleanup failure logging on the
existing delete_error field name. Update the affected tracing::warn! calls in
the create, update, and delete paths, including the referenced locations, so
each uses delete_error for the deletion error value while preserving the
existing messages and behavior.

In `@crates/api-core/src/handlers/svpc.rs`:
- Around line 424-428: Update the tracing::error! call in the DPA device handler
to format the CarbideError field with Display syntax, changing the error field
from debug formatting to %e while preserving the existing device_info field and
message.

In `@crates/api-core/src/machine_update_manager/host_firmware.rs`:
- Around line 76-79: Update the affected tracing fields to use native same-name
shorthand: in crates/api-core/src/machine_update_manager/host_firmware.rs lines
76-79 for fw_config_snapshot and lines 189-192 for firmware_config;
crates/api-core/src/tests/dpu_reprovisioning.rs lines 1359-1362 for
last_reboot_requested; crates/dpu-remediation/src/remediation.rs lines 231-234
for error; and crates/machine-a-tron/src/host_machine.rs lines 407-410 for
request, 429-430 for dpu_index, and 671-674 for machine_id. Preserve the
existing tracing levels and messages while using the appropriate debug or
display shorthand.

In `@crates/api-core/src/scout_stream.rs`:
- Around line 103-106: Replace redundant same-name tracing field assignments
with native shorthand while preserving each field’s existing `%` or `?`
formatter: update machine_id, flow_uuid, response, and flow_uuid_pb in
crates/api-core/src/scout_stream.rs at 103-106, 120-125, 128-133, 140-143,
150-153, 156-158, 218-220, 270-274, and 278-282; stable_machine_id in
crates/api-core/src/handlers/machine_discovery.rs at 421-421; desired_firmware
in crates/api-test-helper/src/machine_a_tron.rs at 78-78; bmc_ip in
crates/api-core/src/handlers/site_explorer.rs at 261-261; and key,
firmware_directory, and metadata_path in crates/firmware/src/config.rs at 69-69,
186-186, and 207-207.

In `@crates/api-db/src/machine_interface.rs`:
- Around line 610-614: Update the info log in the machine lookup flow, and the
corresponding log at the other relay-reporting site, to record the original
relays collection with structured debug formatting (`relays = ?relays`) instead
of the preformatted relaystr string. Retain relaystr only for warning logs that
explicitly require the formatted representation.

In `@crates/dhcp-server/src/main.rs`:
- Around line 118-122: Update the DHCP server listening log’s listen_address
field in the tracing::info! call to use Display formatting with %listen_address
instead of Debug formatting with ?listen_address, matching the existing
formatting used for the same field elsewhere.

In `@crates/machine-controller/src/handler.rs`:
- Line 4101: Update the rshim enablement error-handling chain around the tracing
call to avoid discarding the Result with let _. Use .ok() to explicitly mark the
non-blocking failure as intentionally ignored, while preserving the existing
info-level error logging.

In `@crates/mqttea/src/client/core.rs`:
- Around line 180-183: Update the error fields in the re-subscription and
related error logs to use tracing’s Display formatter (`%`) instead of Debug
formatter (`?`) for the error values `e` and `cred_err`. Apply this consistently
to the occurrences around the fresh-session handling and the additional
locations identified in the comment.

In `@crates/preingestion-manager/src/lib.rs`:
- Around line 3244-3247: Update the enable_rshim_bmc call to handle its
non-fatal failure explicitly: retain the existing error logging while converting
the intentionally ignored result with .ok() instead of using map_err followed by
let _. Locate this change in the RSHIM enablement flow around
redfish_client.enable_rshim_bmc().await.
🪄 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: 154c8f77-5413-4f5a-a6e7-f698f4a3ea25

📥 Commits

Reviewing files that changed from the base of the PR and between 1eb3a7f and a76aefe.

📒 Files selected for processing (271)
  • STYLE_GUIDE.md
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/admin-cli/src/rpc.rs
  • crates/agent/src/agent_platform.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/containerd/container.rs
  • crates/agent/src/containerd/image.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/dpu/link.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/ethernet_virtualization.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/hbn.rs
  • crates/agent/src/health.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/host_machine_id.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/agent/src/instrumentation.rs
  • crates/agent/src/lib.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/agent/src/main_loop.rs
  • crates/agent/src/managed_files.rs
  • crates/agent/src/mtu.rs
  • crates/agent/src/netlink.rs
  • crates/agent/src/network_monitor.rs
  • crates/agent/src/nvue.rs
  • crates/agent/src/ovs.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/agent/src/tests/full.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-core/src/instance/mod.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/listener.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/scout_stream.rs
  • crates/api-core/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/tests/dns.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/carbide_version.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-db/src/instance.rs
  • crates/api-db/src/lib.rs
  • crates/api-db/src/machine.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/api-model/src/firmware.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-model/src/machine/mod.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/api-test-helper/src/domain.rs
  • crates/api-test-helper/src/instance.rs
  • crates/api-test-helper/src/machine.rs
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/interface.rs
  • crates/api-web/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-web/src/search.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-mock/src/main.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/bmc-mock/src/tls.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/dhcp-server/src/cache.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/dhcp-server/src/main.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/dhcp-server/src/util.rs
  • crates/dns-record/src/lib.rs
  • crates/dns/src/lib.rs
  • crates/dns/src/main.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/dpa-manager/src/lib.rs
  • crates/dpa/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/firmware/src/config.rs
  • crates/firmware/src/downloader.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/fmds/src/main.rs
  • crates/fmds/src/nic_init.rs
  • crates/fmds/src/phone_home.rs
  • crates/health/src/api_client.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/health/src/discovery/context.rs
  • crates/health/src/discovery/spawn.rs
  • crates/health/src/metrics.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/host-support/src/registration.rs
  • crates/http-connector/src/connector.rs
  • crates/http-connector/src/resolver.rs
  • crates/ib-fabric/src/lib.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ipmi/src/tool.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/libnmxc/src/lib.rs
  • crates/libnmxm/src/lib.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/machine-a-tron/src/main.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/machine-controller/src/dpf.rs
  • crates/machine-controller/src/handler.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/metrics-utils/src/lib.rs
  • crates/mqttea-example/src/main.rs
  • crates/mqttea/src/client/core.rs
  • crates/mqttea/src/client/messages.rs
  • crates/mqttea/src/registry/core.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/power-shelf-controller/src/configuring.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/power-shelf-controller/src/fetching_data.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/rack-controller/src/created.rs
  • crates/rack-controller/src/discovering.rs
  • crates/rack-controller/src/error_state.rs
  • crates/rack-controller/src/handler.rs
  • crates/rack-controller/src/lib.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/rack-controller/src/ready.rs
  • crates/rack-controller/src/validating.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/rpc/src/errors.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/scout/src/attestation.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/main.rs
  • crates/scout/src/mlx_device.rs
  • crates/scout/src/register.rs
  • crates/scout/src/stream.rs
  • crates/scout/src/tpm.rs
  • crates/secrets/src/forge_vault.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/site-explorer/src/redfish.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/spdm-controller/src/handler.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/ssh-console/src/config.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/ssh-console/src/frontend.rs
  • crates/ssh-console/src/metrics.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/configuring.rs
  • crates/switch-controller/src/created.rs
  • crates/switch-controller/src/deleting.rs
  • crates/switch-controller/src/error_state.rs
  • crates/switch-controller/src/initializing.rs
  • crates/switch-controller/src/ready.rs
  • crates/switch-controller/src/validating.rs
💤 Files with no reviewable changes (1)
  • crates/health/src/discovery/context.rs

Comment thread crates/admin-cli/src/rpc.rs
Comment thread crates/agent/src/nvue.rs Outdated
Comment thread crates/api-core/src/handlers/bmc_endpoint_explorer.rs
Comment thread crates/api-core/src/handlers/svpc.rs Outdated
Comment thread crates/api-core/src/machine_validation/mod.rs
Comment thread crates/preingestion-manager/src/lib.rs
Comment thread crates/scout/src/attestation.rs Outdated
Comment thread crates/site-explorer/src/bmc_endpoint_explorer.rs Outdated
Comment thread crates/site-explorer/src/lib.rs Outdated
Comment thread crates/ssh-console/src/bmc/connection.rs
@chet

chet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the actionable structured-logging, accuracy, and sensitive-field findings in amended commit 1a82cf6. Reverification is green for nightly formatting, all-target/all-feature Clippy, custom lints, and the expanded 16-library unit-test set.

Two review-body concerns were verified against origin/main and intentionally kept out of this refactor:

  • Work-lock keepalive supervision predates this change and needs an async close/release or manager-owned task-supervision design.
  • NMX-C partition persistence recovery also predates this change and needs explicit recovery semantics for an already-created external partition.

The HBN child-process stderr remains a rendered payload under the STYLE_GUIDE.md exception for child-process streams, matching the cloud review request to preserve operator-visible presentation.

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@chet, thanks for the update. Acknowledged:

  • Actionable structured-logging, accuracy, and sensitive-field findings addressed in commit 1a82cf674, with green nightly formatting, all-target/all-feature Clippy, custom lints, and the expanded 16-library unit-test set.
  • Work-lock keepalive supervision and NMX-C partition persistence recovery are confirmed pre-existing issues on origin/main, correctly kept out of scope for this refactor.
  • HBN child-process stderr logging is confirmed intentional under the STYLE_GUIDE.md child-process-stream exception, preserving operator-visible presentation.

I'll kick off a full review of all changes now to verify the amended commit.

(=^・ω・^=)


✏️ Learnings added
Learnt from: chet
URL: https://github.com/NVIDIA/infra-controller/pull/3479

Timestamp: 2026-07-14T09:27:43.782Z
Learning: In the NVIDIA/infra-controller repository, as of PR `#3479` (structured-logging refactor), two known pre-existing issues were identified but intentionally deferred as out of scope: (1) work-lock keepalive supervision (crates/api-db/src/work_lock_manager.rs) needs an async close/release or manager-owned task-supervision design; (2) NMX-C partition persistence recovery (crates/nvlink-manager) needs explicit recovery semantics for an already-created external partition. These predate the structured-logging refactor and should not be flagged as newly introduced by it.

Learnt from: chet
URL: https://github.com/NVIDIA/infra-controller/pull/3479

Timestamp: 2026-07-14T09:27:43.782Z
Learning: In the NVIDIA/infra-controller repository, HBN child-process stderr logging (e.g., crates/agent/src/hbn.rs) is intentionally treated as a rendered payload under the STYLE_GUIDE.md exception for child-process streams, so it should not be flagged for conversion to structured logging fields.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
crates/rack-controller/src/created.rs (1)

95-100: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use native tracing field shorthand.

These fields should use compute_count, switch_count, and power_shelf_count directly rather than repeating the field names. As per coding guidelines, use native tracing field shorthand for tracing values.

Proposed fix
-        compute_count = compute_count,
-        switch_count = switch_count,
-        power_shelf_count = power_shelf_count,
+        compute_count,
+        switch_count,
+        power_shelf_count,
🤖 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/rack-controller/src/created.rs` around lines 95 - 100, Update the
tracing::info! invocation to use native field shorthand for compute_count,
switch_count, and power_shelf_count, removing the repeated field-name
assignments while preserving the existing rack_id field and message.

Source: Coding guidelines

crates/bmc-mock/src/combined_service.rs (1)

114-118: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use native tracing field shorthand.

These fields can be written as ?forwarded_host, ?host, and ?authority. As per coding guidelines, use native tracing field shorthand for Debug values.

Proposed fix
     tracing::info!(
-        forwarded_host = ?forwarded_host,
-        host = ?host,
-        authority = ?authority,
+        ?forwarded_host,
+        ?host,
+        ?authority,
         "No BMC mock router is configured for request",
     );
🤖 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/bmc-mock/src/combined_service.rs` around lines 114 - 118, Update the
tracing::info! call in the combined service request-handling flow to use native
shorthand for the Debug fields: forwarded_host, host, and authority. Preserve
the existing field names, formatting behavior, and log message.

Source: Coding guidelines

🤖 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/mtu.rs`:
- Around line 58-61: Preserve child-process stderr as rendered diagnostic
message text rather than moving it solely into structured fields. Update the MTU
query site at crates/agent/src/mtu.rs lines 58-61, the MTU update site at
crates/agent/src/mtu.rs lines 78-81, and the ip command diagnostic at
crates/agent/src/ethernet_virtualization.rs lines 1753-1757; retain any
structured command metadata separately.

---

Nitpick comments:
In `@crates/bmc-mock/src/combined_service.rs`:
- Around line 114-118: Update the tracing::info! call in the combined service
request-handling flow to use native shorthand for the Debug fields:
forwarded_host, host, and authority. Preserve the existing field names,
formatting behavior, and log message.

In `@crates/rack-controller/src/created.rs`:
- Around line 95-100: Update the tracing::info! invocation to use native field
shorthand for compute_count, switch_count, and power_shelf_count, removing the
repeated field-name assignments while preserving the existing rack_id field and
message.
🪄 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: fa8faf74-bf3c-42c5-8f53-55920d33c13f

📥 Commits

Reviewing files that changed from the base of the PR and between a76aefe and 1a82cf6.

📒 Files selected for processing (271)
  • STYLE_GUIDE.md
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/admin-cli/src/rpc.rs
  • crates/agent/src/agent_platform.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/containerd/container.rs
  • crates/agent/src/containerd/image.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/dpu/link.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/ethernet_virtualization.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/hbn.rs
  • crates/agent/src/health.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/host_machine_id.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/agent/src/instrumentation.rs
  • crates/agent/src/lib.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/agent/src/main_loop.rs
  • crates/agent/src/managed_files.rs
  • crates/agent/src/mtu.rs
  • crates/agent/src/netlink.rs
  • crates/agent/src/network_monitor.rs
  • crates/agent/src/nvue.rs
  • crates/agent/src/ovs.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/agent/src/tests/full.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-core/src/instance/mod.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/listener.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/scout_stream.rs
  • crates/api-core/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/tests/dns.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/carbide_version.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-db/src/instance.rs
  • crates/api-db/src/lib.rs
  • crates/api-db/src/machine.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/api-model/src/firmware.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-model/src/machine/mod.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/api-test-helper/src/domain.rs
  • crates/api-test-helper/src/instance.rs
  • crates/api-test-helper/src/machine.rs
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/interface.rs
  • crates/api-web/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-web/src/search.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-mock/src/main.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/bmc-mock/src/tls.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/dhcp-server/src/cache.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/dhcp-server/src/main.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/dhcp-server/src/util.rs
  • crates/dns-record/src/lib.rs
  • crates/dns/src/lib.rs
  • crates/dns/src/main.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/dpa-manager/src/lib.rs
  • crates/dpa/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/firmware/src/config.rs
  • crates/firmware/src/downloader.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/fmds/src/main.rs
  • crates/fmds/src/nic_init.rs
  • crates/fmds/src/phone_home.rs
  • crates/health/src/api_client.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/health/src/discovery/context.rs
  • crates/health/src/discovery/spawn.rs
  • crates/health/src/metrics.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/host-support/src/registration.rs
  • crates/http-connector/src/connector.rs
  • crates/http-connector/src/resolver.rs
  • crates/ib-fabric/src/lib.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ipmi/src/tool.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/libnmxc/src/lib.rs
  • crates/libnmxm/src/lib.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/machine-a-tron/src/main.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/machine-controller/src/dpf.rs
  • crates/machine-controller/src/handler.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/metrics-utils/src/lib.rs
  • crates/mqttea-example/src/main.rs
  • crates/mqttea/src/client/core.rs
  • crates/mqttea/src/client/messages.rs
  • crates/mqttea/src/registry/core.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/power-shelf-controller/src/configuring.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/power-shelf-controller/src/fetching_data.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/rack-controller/src/created.rs
  • crates/rack-controller/src/discovering.rs
  • crates/rack-controller/src/error_state.rs
  • crates/rack-controller/src/handler.rs
  • crates/rack-controller/src/lib.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/rack-controller/src/ready.rs
  • crates/rack-controller/src/validating.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/rpc/src/errors.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/scout/src/attestation.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/main.rs
  • crates/scout/src/mlx_device.rs
  • crates/scout/src/register.rs
  • crates/scout/src/stream.rs
  • crates/scout/src/tpm.rs
  • crates/secrets/src/forge_vault.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/site-explorer/src/redfish.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/spdm-controller/src/handler.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/ssh-console/src/config.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/ssh-console/src/frontend.rs
  • crates/ssh-console/src/metrics.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/configuring.rs
  • crates/switch-controller/src/created.rs
  • crates/switch-controller/src/deleting.rs
  • crates/switch-controller/src/error_state.rs
  • crates/switch-controller/src/initializing.rs
  • crates/switch-controller/src/ready.rs
  • crates/switch-controller/src/validating.rs
💤 Files with no reviewable changes (1)
  • crates/health/src/discovery/context.rs
🚧 Files skipped from review as they are similar to previous changes (247)
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/metrics-utils/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/fmds/src/phone_home.rs
  • crates/agent/src/host_machine_id.rs
  • crates/switch-controller/src/created.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/agent/src/netlink.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/api-model/src/machine/spx.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/tests/full.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/dpa/src/lib.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/dns/src/main.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-web/src/lib.rs
  • STYLE_GUIDE.md
  • crates/api-test-helper/src/tenant.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/api-web/src/auth.rs
  • crates/switch-controller/src/error_state.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/lib.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/mqttea/src/client/messages.rs
  • crates/rack-controller/src/discovering.rs
  • crates/switch-controller/src/certificate.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/scout/src/tpm.rs
  • crates/api-web/src/interface.rs
  • crates/dhcp-server/src/util.rs
  • crates/fmds/src/main.rs
  • crates/api-model/src/firmware.rs
  • crates/api-core/src/logging/setup.rs
  • crates/firmware/src/downloader.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/api-test-helper/src/domain.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/dhcp-server/src/cache.rs
  • crates/health/src/metrics.rs
  • crates/libnmxc/src/lib.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-web/src/search.rs
  • crates/rack-controller/src/lib.rs
  • crates/ssh-console/src/config.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/fmds/src/nic_init.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/switch-controller/src/configuring.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/rack-controller/src/error_state.rs
  • crates/ssh-console/src/metrics.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/agent/src/agent_platform.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/register.rs
  • crates/ipmi/src/tool.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/health/src/api_client.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/firmware/src/config.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/machine-controller/src/dpf.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/dns-record/src/lib.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/agent/src/dpu/link.rs
  • crates/switch-controller/src/initializing.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/rpc/src/errors.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/api-core/src/listener.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-db/src/expected_switch.rs
  • crates/bmc-mock/src/tls.rs
  • crates/site-explorer/src/redfish.rs
  • crates/mqttea/src/registry/core.rs
  • crates/agent/src/network_monitor.rs
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/rack-controller/src/handler.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/http-connector/src/resolver.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/machine-a-tron/src/main.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/scout/src/stream.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-test-helper/src/instance.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/api-model/src/machine/mod.rs
  • crates/dpa-manager/src/lib.rs
  • crates/bmc-mock/src/main.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/dns/src/lib.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/mqttea-example/src/main.rs
  • crates/api-db/src/instance.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/agent/src/ovs.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/agent/src/astra_weave.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/api-web/src/managed_host.rs
  • crates/spdm-controller/src/handler.rs
  • crates/agent/src/containerd/image.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/libnmxm/src/lib.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/secrets/src/forge_vault.rs
  • crates/agent/src/containerd/container.rs
  • crates/api-core/src/tests/dns.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/agent/src/upgrade.rs
  • crates/host-support/src/registration.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/health/src/discovery/spawn.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/rack-controller/src/ready.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/http-connector/src/connector.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/admin-cli/src/rpc.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/instrumentation.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/scout/src/attestation.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/scout_stream.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/ssh-console/src/frontend.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/api-db/src/carbide_version.rs
  • crates/ib-fabric/src/lib.rs
  • crates/api-core/src/instance/mod.rs
  • crates/dhcp-server/src/main.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/main.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/api-db/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/main_loop.rs
  • crates/api-db/src/machine.rs
  • crates/api-core/src/setup.rs
  • crates/agent/src/health.rs
  • crates/scout/src/mlx_device.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/lib.rs
  • crates/rack-controller/src/validating.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/machine-controller/src/handler.rs

Comment thread crates/agent/src/mtu.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 15

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/agent/src/health.rs (1)

370-390: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not overwrite a failed file check with a pass.

When a non-DHCP file is below MIN_SIZE, this branch records failed(...), then falls through to the unconditional passed(...) call. That can report an invalid file as healthy. Return after recording the failure, or make passed(...) conditional on the size check.

Proposed fix
             failed(
                 hr,
                 probe_ids::FileIsValid.clone(),
                 Some(filename.to_string()),
                 "Too small".to_string(),
             );
+            continue;
         }
         passed(
🤖 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` around lines 370 - 390, Update the file-check
logic around the non-DHCP `stat.len() < MIN_SIZE` branch so it cannot execute
the unconditional `passed(...)` call after recording `failed(...)`. Return
immediately after the failure, or otherwise make `passed(...)` conditional,
while preserving the DHCP size handling and valid-file pass behavior.
🧹 Nitpick comments (8)
crates/bmc-mock/src/main.rs (1)

154-157: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use tracing shorthand for exit_code.

exit_code is already a tracing value; emit it as exit_code rather than exit_code = exit_code to follow the repository’s structured-field convention.

Proposed adjustment
-                        exit_code = exit_code,
+                        exit_code,
🤖 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/bmc-mock/src/main.rs` around lines 154 - 157, Update the
tracing::error! invocation for the virsh reboot failure to use tracing’s
shorthand field syntax for the existing exit_code value, replacing the explicit
exit_code = exit_code form while preserving the message and logging behavior.

Source: Coding guidelines

crates/api-db/src/carbide_version.rs (1)

64-64: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use native shorthand for the structured field.

Replace superseded_count = superseded_count with superseded_count. As per coding guidelines, tracing Value fields should use native shorthand.

Proposed fix
 tracing::warn!(
     version,
-    superseded_count = superseded_count,
+    superseded_count,
     "observed a new forge version, superseded versions",
 );
🤖 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/carbide_version.rs` at line 64, Update the structured
tracing field in the relevant logging statement to use the native shorthand
`superseded_count` instead of the explicit `superseded_count = superseded_count`
form.

Source: Coding guidelines

crates/api-core/src/listener.rs (1)

288-291: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use native shorthand for same-named tracing fields.

These fields repeat a local variable name unnecessarily. Replace them with tracing shorthand while preserving the same field names and formatters:

  • crates/api-core/src/listener.rs#L288-L291: replace trust_config = ?trust_config with ?trust_config.
  • crates/api-core/src/listener.rs#L433-L437: replace error = %error with %error; retain error_debug = ?error.
  • crates/rack-controller/src/handler.rs#L113-L116: replace controller_state = %controller_state with %controller_state.
  • crates/dpa/src/lib.rs#L73-L77: replace topic = %topic with %topic.

As per coding guidelines, tracing events should use native shorthand for tracing::Value fields.

🤖 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/listener.rs` around lines 288 - 291, Update the tracing
fields to use native shorthand while preserving their existing names and
formatters: in crates/api-core/src/listener.rs lines 288-291, change
trust_config = ?trust_config to ?trust_config; in
crates/api-core/src/listener.rs lines 433-437, change error = %error to %error
while retaining error_debug = ?error; in crates/rack-controller/src/handler.rs
lines 113-116, change controller_state = %controller_state to %controller_state;
and in crates/dpa/src/lib.rs lines 73-77, change topic = %topic to %topic.

Source: Coding guidelines

crates/api-db/src/vpc_dpu_loopback.rs (1)

61-61: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use native tracing shorthand for same-name fields.

These structured fields repeat the variable name unnecessarily. Native shorthand preserves the field name and formatting while matching the repository convention.

  • crates/api-db/src/vpc_dpu_loopback.rs#L61-L61: replace admin_segments = ?admin_segments with ?admin_segments.
  • crates/api-model/src/firmware.rs#L146-L146: replace firmware_type = ?firmware_type with ?firmware_type.
  • crates/api-model/src/instance/status/network.rs#L224-L225: replace config = ?config with ?config.
🤖 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/vpc_dpu_loopback.rs` at line 61, Use native tracing
shorthand for the same-name structured fields: replace admin_segments =
?admin_segments with ?admin_segments in
crates/api-db/src/vpc_dpu_loopback.rs:61, firmware_type = ?firmware_type with
?firmware_type in crates/api-model/src/firmware.rs:146, and config = ?config
with ?config in crates/api-model/src/instance/status/network.rs:224-225.
Preserve the existing field values and formatting.

Source: Coding guidelines

crates/health/src/discovery/cleanup.rs (1)

27-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Model the closed stop-reason set as an enum.

stop_reason now accepts arbitrary &'static str, while the shown call sites pass fixed values from a finite set. Introduce a CollectorStopReason enum with a Display implementation and log it with %stop_reason.

As per coding guidelines, finite sets should use enums with string conversion through Display/FromStr, rather than raw strings.

Also applies to: 53-53, 92-97

🤖 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/health/src/discovery/cleanup.rs` around lines 27 - 38, Replace the raw
&'static str stop_reason parameter in the cleanup function with a
CollectorStopReason enum covering all existing fixed reason values. Implement
Display (and FromStr if required by the surrounding API), update all affected
call sites to use the enum variants, and log stop_reason with % formatting in
the tracing::info! call.

Source: Coding guidelines

crates/dns/src/lib.rs (1)

625-625: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Log the underlying server error in the structured field.

Line 625 stores the preformatted error_msg, duplicating the static event message and making error less useful for structured searches. Keep error_msg for the returned report, but log error = %e here.

Proposed fix
-                error!(error = %error_msg, "Carbide-dns has encountered an error");
+                error!(error = %e, "Carbide-dns has encountered an 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/dns/src/lib.rs` at line 625, Update the error logging statement in the
surrounding error-handling flow to use the underlying server error variable e
for the structured error field, while retaining error_msg for the returned
report. Keep the existing static log message unchanged.

Source: Coding guidelines

crates/machine-a-tron/src/machine_state_machine.rs (1)

984-997: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Prefer a structured ?request field over a pre-formatted detail string.

detail re-embeds the whole formatted sentence as one opaque field, defeating the purpose of structuring this log — filtering by the specific unsupported SystemPowerControl variant now requires string matching instead of field matching.

♻️ Proposed refactor
             PushPowerButton | Nmi | Suspend | Pause | Resume => {
                 let msg = format!("Machine-a-tron mock: unsupported power request {request:?}",);
                 tracing::warn!(
-                    detail = %msg,
+                    ?request,
                     "unsupported machine-a-tron mock power request",
                 );
                 return Err(SetSystemPowerError::BadRequest(msg));
             }

As per coding guidelines, "record dynamic values as structured fields rather than interpolated into messages."

🤖 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-a-tron/src/machine_state_machine.rs` around lines 984 - 997,
The unsupported-request branch in set_system_power should log the
SystemPowerControl value as a structured request field instead of pre-formatting
it into the detail field. Preserve the existing warning message and BadRequest
error text, but pass the matched request directly to tracing so individual
variants remain filterable.

Source: Coding guidelines

crates/mqttea/src/client/core.rs (1)

717-725: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Backoff delay is a duration — consider a carbide_instrument::Event instead of warn!.

delay_ms is fired on every backoff step with no paired counter/histogram (unlike the "queue full" branch, which increments queue_stats_producer). As per coding guidelines, "use plain structured tracing:: macros for ordinary logging; define and emit a carbide_instrument::Event when an event needs a count, rate, or duration," and this file already emits events (MqttReconnected, HandlerDispatchDropped) for comparable occurrences.

🤖 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/mqttea/src/client/core.rs` around lines 717 - 725, Update the
next_delay method to emit an appropriate carbide_instrument::Event for each
backoff delay instead of using warn!. Follow the existing event patterns in this
file, include the delay duration in the event fields, and preserve the current
backoff calculation and returned delay.

Source: Coding guidelines

🤖 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/health.rs`:
- Line 597: Update the warning message in parse_disk_utilization from “du status
line too short” to identify the df status line, leaving the surrounding parsing
and logging behavior unchanged.

In `@crates/api-core/src/handlers/instance.rs`:
- Around line 1390-1393: Update the tracing::debug! event in the instance update
method to use the established spx_config field name instead of spxconfig,
matching the earlier SPX configuration log field while leaving the surrounding
log message unchanged.

In `@crates/api-core/src/handlers/site_explorer.rs`:
- Around line 260-263: Update the tracing::info! call in the site exploration
error-clearing flow to replace the unclear message with a stable, grammatically
clear human-readable literal describing that failed preingestion was reset after
clearing the site exploration error; keep the %bmc_ip field unchanged.

In `@crates/api-core/tests/integration/machine_bmc_metadata.rs`:
- Around line 103-105: Update the “Looking up BMC credentials” log in the
relevant test flow to stop serializing the complete request; log only a safe
discriminator or use the repository’s filtered request-logging helper, ensuring
machine IDs and BMC IP/MAC selectors are excluded.

In `@crates/api-test-helper/src/instance.rs`:
- Around line 288-291: Remove the leading tab character from both log message
literals in the instance state reporting code, including the tracing call using
the “Current instance state” message and the corresponding occurrence near the
similarly reported state. Keep the structured logging fields and message text
otherwise unchanged.
- Around line 34-38: Update the tracing::info! message in the instance creation
flow to remove the duplicated “with” and use concise, natural phrasing while
preserving the existing host_machine_id and network_segment_id fields.

In `@crates/dns/src/main.rs`:
- Around line 66-69: Move the OpenTelemetry startup log in the initialization
flow to after tracing_subscriber::registry().try_init() completes successfully.
Preserve the existing endpoint field and message, ensuring the event is emitted
through the configured tracing pipeline.

In `@crates/host-support/src/registration.rs`:
- Line 313: Update the tracing::info! call that logs the newly written machine
certificate in the registration flow to format client_cert with Display syntax
(%client_cert) instead of Debug syntax (?client_cert), preserving the existing
message and behavior.

In `@crates/machine-controller/src/handler.rs`:
- Around line 11234-11237: Add the `machine_id` field to the `tracing::warn!`
call for the AC powercycle failure, sourcing it from the in-scope `mh_snapshot`
value while preserving the existing error field and message.
- Around line 9503-9508: Add the in-scope machine_id field to the
tracing::debug! call for "Moving firmware chain step to CheckingFirmware",
matching the field naming and formatting used by sibling logs in
host_waiting_fw. Preserve the existing firmware, firmware_number, and address
fields.

In `@crates/preingestion-manager/src/lib.rs`:
- Around line 3307-3314: Add address = %endpoint_clone.address to both the
multipart-not-supported tracing::warn! call and the failed-to-open-firmware-file
tracing::error! call within initiate_update, preserving their existing error
fields and messages.

In `@crates/rpc/src/forge_tls_client.rs`:
- Around line 691-694: Update the retry log message in retry_build_nmx_c to
identify the NMX-C API instead of the Forge API, matching the existing
post-retry log wording while leaving the error and URL fields unchanged.

In `@crates/site-explorer/src/lib.rs`:
- Around line 3223-3225: The Viking ingestion warnings are misleading: update
the warning at crates/site-explorer/src/lib.rs lines 3223-3225 to state that the
manager report is missing, since this branch checks report.managers.first();
update the warning at lines 3247-3250 to say the CPLD version does not match,
unless the code is changed to compare ordering before claiming it is lower.

In `@crates/spdm-controller/src/handler.rs`:
- Around line 243-246: Update the tracing::error! call in the unexpected
task-state branch of the measurement handling flow to describe the measurement
collection task entering an unexpected state, rather than failing to trigger
measurement. Preserve the existing error and task_state fields.

In `@crates/ssh-console/tests/util/mod.rs`:
- Line 195: Update the tracing::debug call for the “Configured baseline test
mock hosts” message to avoid logging mock_hosts directly, since MockHost debug
output includes bmc_password. Log only a safe aggregate such as the number of
configured hosts or another redacted summary.

---

Outside diff comments:
In `@crates/agent/src/health.rs`:
- Around line 370-390: Update the file-check logic around the non-DHCP
`stat.len() < MIN_SIZE` branch so it cannot execute the unconditional
`passed(...)` call after recording `failed(...)`. Return immediately after the
failure, or otherwise make `passed(...)` conditional, while preserving the DHCP
size handling and valid-file pass behavior.

---

Nitpick comments:
In `@crates/api-core/src/listener.rs`:
- Around line 288-291: Update the tracing fields to use native shorthand while
preserving their existing names and formatters: in
crates/api-core/src/listener.rs lines 288-291, change trust_config =
?trust_config to ?trust_config; in crates/api-core/src/listener.rs lines
433-437, change error = %error to %error while retaining error_debug = ?error;
in crates/rack-controller/src/handler.rs lines 113-116, change controller_state
= %controller_state to %controller_state; and in crates/dpa/src/lib.rs lines
73-77, change topic = %topic to %topic.

In `@crates/api-db/src/carbide_version.rs`:
- Line 64: Update the structured tracing field in the relevant logging statement
to use the native shorthand `superseded_count` instead of the explicit
`superseded_count = superseded_count` form.

In `@crates/api-db/src/vpc_dpu_loopback.rs`:
- Line 61: Use native tracing shorthand for the same-name structured fields:
replace admin_segments = ?admin_segments with ?admin_segments in
crates/api-db/src/vpc_dpu_loopback.rs:61, firmware_type = ?firmware_type with
?firmware_type in crates/api-model/src/firmware.rs:146, and config = ?config
with ?config in crates/api-model/src/instance/status/network.rs:224-225.
Preserve the existing field values and formatting.

In `@crates/bmc-mock/src/main.rs`:
- Around line 154-157: Update the tracing::error! invocation for the virsh
reboot failure to use tracing’s shorthand field syntax for the existing
exit_code value, replacing the explicit exit_code = exit_code form while
preserving the message and logging behavior.

In `@crates/dns/src/lib.rs`:
- Line 625: Update the error logging statement in the surrounding error-handling
flow to use the underlying server error variable e for the structured error
field, while retaining error_msg for the returned report. Keep the existing
static log message unchanged.

In `@crates/health/src/discovery/cleanup.rs`:
- Around line 27-38: Replace the raw &'static str stop_reason parameter in the
cleanup function with a CollectorStopReason enum covering all existing fixed
reason values. Implement Display (and FromStr if required by the surrounding
API), update all affected call sites to use the enum variants, and log
stop_reason with % formatting in the tracing::info! call.

In `@crates/machine-a-tron/src/machine_state_machine.rs`:
- Around line 984-997: The unsupported-request branch in set_system_power should
log the SystemPowerControl value as a structured request field instead of
pre-formatting it into the detail field. Preserve the existing warning message
and BadRequest error text, but pass the matched request directly to tracing so
individual variants remain filterable.

In `@crates/mqttea/src/client/core.rs`:
- Around line 717-725: Update the next_delay method to emit an appropriate
carbide_instrument::Event for each backoff delay instead of using warn!. Follow
the existing event patterns in this file, include the delay duration in the
event fields, and preserve the current backoff calculation and returned delay.
🪄 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: 4152e4f2-4b02-4fe0-b2df-16d5c698c9dd

📥 Commits

Reviewing files that changed from the base of the PR and between c0952bb and 1a82cf6.

📒 Files selected for processing (271)
  • STYLE_GUIDE.md
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/admin-cli/src/rpc.rs
  • crates/agent/src/agent_platform.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/containerd/container.rs
  • crates/agent/src/containerd/image.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/dpu/link.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/ethernet_virtualization.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/hbn.rs
  • crates/agent/src/health.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/host_machine_id.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/agent/src/instrumentation.rs
  • crates/agent/src/lib.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/agent/src/main_loop.rs
  • crates/agent/src/managed_files.rs
  • crates/agent/src/mtu.rs
  • crates/agent/src/netlink.rs
  • crates/agent/src/network_monitor.rs
  • crates/agent/src/nvue.rs
  • crates/agent/src/ovs.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/agent/src/tests/full.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-core/src/instance/mod.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/listener.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/scout_stream.rs
  • crates/api-core/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/tests/dns.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/carbide_version.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-db/src/instance.rs
  • crates/api-db/src/lib.rs
  • crates/api-db/src/machine.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/api-model/src/firmware.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-model/src/machine/mod.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/api-test-helper/src/domain.rs
  • crates/api-test-helper/src/instance.rs
  • crates/api-test-helper/src/machine.rs
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/interface.rs
  • crates/api-web/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-web/src/search.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-mock/src/main.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/bmc-mock/src/tls.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/dhcp-server/src/cache.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/dhcp-server/src/main.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/dhcp-server/src/util.rs
  • crates/dns-record/src/lib.rs
  • crates/dns/src/lib.rs
  • crates/dns/src/main.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/dpa-manager/src/lib.rs
  • crates/dpa/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/firmware/src/config.rs
  • crates/firmware/src/downloader.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/fmds/src/main.rs
  • crates/fmds/src/nic_init.rs
  • crates/fmds/src/phone_home.rs
  • crates/health/src/api_client.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/health/src/discovery/context.rs
  • crates/health/src/discovery/spawn.rs
  • crates/health/src/metrics.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/host-support/src/registration.rs
  • crates/http-connector/src/connector.rs
  • crates/http-connector/src/resolver.rs
  • crates/ib-fabric/src/lib.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ipmi/src/tool.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/libnmxc/src/lib.rs
  • crates/libnmxm/src/lib.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/machine-a-tron/src/main.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/machine-controller/src/dpf.rs
  • crates/machine-controller/src/handler.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/metrics-utils/src/lib.rs
  • crates/mqttea-example/src/main.rs
  • crates/mqttea/src/client/core.rs
  • crates/mqttea/src/client/messages.rs
  • crates/mqttea/src/registry/core.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/power-shelf-controller/src/configuring.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/power-shelf-controller/src/fetching_data.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/rack-controller/src/created.rs
  • crates/rack-controller/src/discovering.rs
  • crates/rack-controller/src/error_state.rs
  • crates/rack-controller/src/handler.rs
  • crates/rack-controller/src/lib.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/rack-controller/src/ready.rs
  • crates/rack-controller/src/validating.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/rpc/src/errors.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/scout/src/attestation.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/main.rs
  • crates/scout/src/mlx_device.rs
  • crates/scout/src/register.rs
  • crates/scout/src/stream.rs
  • crates/scout/src/tpm.rs
  • crates/secrets/src/forge_vault.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/site-explorer/src/redfish.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/spdm-controller/src/handler.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/ssh-console/src/config.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/ssh-console/src/frontend.rs
  • crates/ssh-console/src/metrics.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/configuring.rs
  • crates/switch-controller/src/created.rs
  • crates/switch-controller/src/deleting.rs
  • crates/switch-controller/src/error_state.rs
  • crates/switch-controller/src/initializing.rs
  • crates/switch-controller/src/ready.rs
  • crates/switch-controller/src/validating.rs
💤 Files with no reviewable changes (1)
  • crates/health/src/discovery/context.rs

Comment thread crates/agent/src/health.rs Outdated
Comment thread crates/api-core/src/handlers/instance.rs
Comment thread crates/api-core/src/handlers/site_explorer.rs
Comment thread crates/api-core/tests/integration/machine_bmc_metadata.rs Outdated
Comment thread crates/api-test-helper/src/instance.rs
Comment thread crates/preingestion-manager/src/lib.rs Outdated
Comment thread crates/rpc/src/forge_tls_client.rs
Comment thread crates/site-explorer/src/lib.rs
Comment thread crates/spdm-controller/src/handler.rs Outdated
Comment thread crates/ssh-console/tests/util/mod.rs Outdated
@github-actions

Copy link
Copy Markdown

🔍 Container Scan Summary

Service Total Critical High Medium Low Other
boot-artifacts-aarch64 3 0 0 3 0 0
boot-artifacts-x86_64 3 0 0 3 0 0
forge-admin-cli-x86_64 259 13 30 78 7 131
machine-validation-runner 807 40 234 288 36 209
machine_validation 807 40 234 288 36 209
machine_validation-aarch64 807 40 234 288 36 209
nvmetal-carbide 807 40 234 288 36 209
TOTAL 3493 173 966 1236 151 967

Per-CVE detail lives in the per-service grype-* artifacts (JSON + SARIF). Severity counts only — no CVE IDs published here.

@chet

chet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Final feedback pass is in b70b2ba:

  • Addressed all late inline findings, the outside-diff health-check fallthrough, and the applicable structured-logging consistency suggestions.
  • Kept the MQTT backoff as an ordinary structured warning; introducing a new metric name, type, and telemetry semantics belongs in a separate instrumentation design change.
  • Revalidated with nightly formatting, full Clippy, Carbide lints, a 24-library unit-test matrix, the 66-item intentional residual audit, and a no-findings local CodeRabbit review of the final 24-file delta.

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@chet, thank you for the thorough revalidation pass. Acknowledged:

  • Late inline findings, the outside-diff health-check fallthrough, and applicable structured-logging consistency suggestions addressed in commit b70b2ba01.
  • Agreed that introducing a new metric name/type/telemetry semantics for the MQTT backoff is a separate instrumentation design concern and out of scope here — keeping it as a structured warning is the right call for this refactor.
  • Noted the clean revalidation: nightly formatting, full Clippy, Carbide lints, the 24-library unit-test matrix, the 66-item intentional residual audit, and a no-findings local CodeRabbit review of the final 24-file delta.

Kicking off the full review now to verify the final delta.

(=^・ω・^=)


✏️ Learnings added
Learnt from: chet
URL: https://github.com/NVIDIA/infra-controller/pull/3479

Timestamp: 2026-07-14T11:26:47.232Z
Learning: Learnt from: chet
Repo: NVIDIA/infra-controller
PR: `#3479`
In this structured-logging refactor PR, the MQTT client backoff/retry warning logging (e.g., in crates/mqttea or similar MQTT client backoff paths) was intentionally kept as an ordinary structured `tracing::warn!` log rather than being converted into a dedicated metric. Introducing a new metric name, type, and telemetry semantics for MQTT backoff is considered a separate instrumentation design change and out of scope for structured-logging refactors.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/api-core/src/dpa/handler.rs`:
- Around line 60-66: Update the MAC parsing error branch in the DPA handler to
bind the parse failure instead of discarding it as _e, then include that bound
error as a structured tracing field in the tracing::error! call alongside
mac_address.
- Around line 151-153: Update the partition validation around partition.len() to
distinguish zero matches from multiple matches: retain the “partition not found”
error only for an empty result, and log a separate data-integrity error
including the number of duplicate matches when more than one row is returned.
Preserve the existing return behavior for both invalid cases.
🪄 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: 5d6a0909-2cd7-41ae-af1e-b83fa055a512

📥 Commits

Reviewing files that changed from the base of the PR and between 1a82cf6 and b70b2ba.

📒 Files selected for processing (271)
  • STYLE_GUIDE.md
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/admin-cli/src/rpc.rs
  • crates/agent/src/agent_platform.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/containerd/container.rs
  • crates/agent/src/containerd/image.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/dpu/link.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/ethernet_virtualization.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/hbn.rs
  • crates/agent/src/health.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/host_machine_id.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/agent/src/instrumentation.rs
  • crates/agent/src/lib.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/agent/src/main_loop.rs
  • crates/agent/src/managed_files.rs
  • crates/agent/src/mtu.rs
  • crates/agent/src/netlink.rs
  • crates/agent/src/network_monitor.rs
  • crates/agent/src/nvue.rs
  • crates/agent/src/ovs.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/agent/src/tests/full.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-core/src/instance/mod.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/listener.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/scout_stream.rs
  • crates/api-core/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/tests/dns.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/carbide_version.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-db/src/instance.rs
  • crates/api-db/src/lib.rs
  • crates/api-db/src/machine.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/api-model/src/firmware.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-model/src/machine/mod.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/api-test-helper/src/domain.rs
  • crates/api-test-helper/src/instance.rs
  • crates/api-test-helper/src/machine.rs
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/interface.rs
  • crates/api-web/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-web/src/search.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-mock/src/main.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/bmc-mock/src/tls.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/dhcp-server/src/cache.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/dhcp-server/src/main.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/dhcp-server/src/util.rs
  • crates/dns-record/src/lib.rs
  • crates/dns/src/lib.rs
  • crates/dns/src/main.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/dpa-manager/src/lib.rs
  • crates/dpa/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/firmware/src/config.rs
  • crates/firmware/src/downloader.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/fmds/src/main.rs
  • crates/fmds/src/nic_init.rs
  • crates/fmds/src/phone_home.rs
  • crates/health/src/api_client.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/health/src/discovery/context.rs
  • crates/health/src/discovery/spawn.rs
  • crates/health/src/metrics.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/host-support/src/registration.rs
  • crates/http-connector/src/connector.rs
  • crates/http-connector/src/resolver.rs
  • crates/ib-fabric/src/lib.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ipmi/src/tool.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/libnmxc/src/lib.rs
  • crates/libnmxm/src/lib.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/machine-a-tron/src/main.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/machine-controller/src/dpf.rs
  • crates/machine-controller/src/handler.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/metrics-utils/src/lib.rs
  • crates/mqttea-example/src/main.rs
  • crates/mqttea/src/client/core.rs
  • crates/mqttea/src/client/messages.rs
  • crates/mqttea/src/registry/core.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/power-shelf-controller/src/configuring.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/power-shelf-controller/src/fetching_data.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/rack-controller/src/created.rs
  • crates/rack-controller/src/discovering.rs
  • crates/rack-controller/src/error_state.rs
  • crates/rack-controller/src/handler.rs
  • crates/rack-controller/src/lib.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/rack-controller/src/ready.rs
  • crates/rack-controller/src/validating.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/rpc/src/errors.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/scout/src/attestation.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/main.rs
  • crates/scout/src/mlx_device.rs
  • crates/scout/src/register.rs
  • crates/scout/src/stream.rs
  • crates/scout/src/tpm.rs
  • crates/secrets/src/forge_vault.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/site-explorer/src/redfish.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/spdm-controller/src/handler.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/ssh-console/src/config.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/ssh-console/src/frontend.rs
  • crates/ssh-console/src/metrics.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/configuring.rs
  • crates/switch-controller/src/created.rs
  • crates/switch-controller/src/deleting.rs
  • crates/switch-controller/src/error_state.rs
  • crates/switch-controller/src/initializing.rs
  • crates/switch-controller/src/ready.rs
  • crates/switch-controller/src/validating.rs
💤 Files with no reviewable changes (1)
  • crates/health/src/discovery/context.rs
🚧 Files skipped from review as they are similar to previous changes (241)
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/agent/src/netlink.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/switch-controller/src/validating.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-web/src/interface.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/agent/src/host_machine_id.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-web/src/search.rs
  • crates/switch-controller/src/deleting.rs
  • crates/api-model/src/firmware.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/libnmxc/src/lib.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/rack-controller/src/discovering.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/lib.rs
  • crates/bmc-mock/src/tls.rs
  • crates/agent/src/agent_platform.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/mqttea/src/client/messages.rs
  • crates/http-connector/src/resolver.rs
  • crates/fmds/src/phone_home.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/run.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/dpa/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/agent/src/mtu.rs
  • crates/rack-controller/src/error_state.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/agent/src/ovs.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/rpc/src/errors.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-db/src/instance.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/health/src/metrics.rs
  • crates/api-core/src/listener.rs
  • crates/api-test-helper/src/machine.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/switch-controller/src/created.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/rack-controller/src/created.rs
  • crates/agent/src/health/bgp.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/scout/src/register.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/fmds/src/nic_init.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/api-db/src/carbide_version.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/rack-controller/src/lib.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/mqttea/src/registry/core.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/dhcp-server/src/util.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/libnmxm/src/lib.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/agent/src/dpu/link.rs
  • crates/dhcp-server/src/cache.rs
  • crates/agent/src/lib.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/rack-controller/src/handler.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/firmware/src/downloader.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/ssh-console/src/metrics.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/metrics-utils/src/lib.rs
  • crates/api-db/src/machine_topology.rs
  • crates/agent/src/managed_files.rs
  • crates/spdm-controller/src/handler.rs
  • STYLE_GUIDE.md
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/agent/src/nvue.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/api-web/src/machine.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/firmware/src/config.rs
  • crates/api-model/src/machine/mod.rs
  • crates/switch-controller/src/configuring.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/host-support/src/registration.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/dns/src/lib.rs
  • crates/api-db/src/lib.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/health/src/discovery/spawn.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/scout/src/tpm.rs
  • crates/scout/src/attestation.rs
  • crates/ssh-console/src/config.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/scout_stream.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/agent/src/containerd/image.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-core/src/tests/dns.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/dns/src/main.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/initializing.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/agent/src/containerd/container.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/agent/src/dpu/interface.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/bmc-mock/src/main.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/mqttea-example/src/main.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/agent/src/tests/full.rs
  • crates/machine-controller/src/dpf.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/rack-controller/src/validating.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/agent/src/network_monitor.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/dhcp-server/src/main.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/machine.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/agent/src/instrumentation.rs
  • crates/scout/src/stream.rs
  • crates/dns-record/src/lib.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/api-core/src/tests/sku.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/site-explorer/src/redfish.rs
  • crates/machine-a-tron/src/main.rs
  • crates/api-db/src/machine_interface.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/api-core/src/instance/mod.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/api-test-helper/src/instance.rs
  • crates/agent/src/hbn.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/agent/src/dpu/route.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/http-connector/src/connector.rs
  • crates/agent/src/main_loop.rs
  • crates/dpf/src/sdk.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/ib-fabric/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/rack-controller/src/ready.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/mqttea/src/client/core.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/secrets/src/forge_vault.rs
  • crates/agent/src/health.rs
  • crates/scout/src/main.rs
  • crates/api-core/src/setup.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/scout/src/mlx_device.rs
  • crates/machine-controller/src/handler.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/preingestion-manager/src/lib.rs

Comment thread crates/api-core/src/dpa/handler.rs Outdated
Comment thread crates/api-core/src/dpa/handler.rs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 10

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
crates/host-support/src/registration.rs (1)

122-148: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Log message text doesn't match the enclosing function.

Line 134's message reads "register_machine request", but this call is inside discover_machine_once, not register_machine. Given the PR's goal of stable, searchable messages, this mismatch will mislead log-based filtering/debugging for this function.

🩹 Proposed fix
         let request = tonic::Request::new(info);
-        tracing::debug!(?request, "register_machine request");
+        tracing::debug!(?request, "discover_machine request");
🤖 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/host-support/src/registration.rs` around lines 122 - 148, Update the
tracing::debug message in discover_machine_once to use discover_machine
terminology instead of register_machine, while preserving the existing request
field and logging behavior.
crates/nvlink-manager/src/lib.rs (1)

514-571: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Include partition_nmx_c_id in the "NMX-C partition not found" logs.

All four None branches here (two in get_gpus_to_keep_after_removal, two in get_gpus_to_keep_in_unknown_partition_after_removal) log machine_id and device_instance but drop partition_nmx_c_id, even though it's in scope and is the actual key that failed the lookup. The sibling failure path in check_nv_link_partitions (the RemoveFromUnknownPartition else-branch) already includes partition_id for the exact same failure message — these four sites should match for consistent, useful diagnostics.

🔧 Proposed fix (one of the four sites shown; apply to all four)
                         None => {
                             tracing::error!(
                                 machine_id = %machine_id,
                                 device_instance,
+                                partition_id = partition_nmx_c_id.partition_id,
                                 "NMX-C partition not found for machine GPU",
                             );
                             return None;
                         }
As per path instructions, "Review Rust code against STYLE_GUIDE.md: ... structured tracing fields."

Also applies to: 579-633

🤖 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/nvlink-manager/src/lib.rs` around lines 514 - 571, Update all four
“NMX-C partition not found” tracing error calls in
get_gpus_to_keep_after_removal and
get_gpus_to_keep_in_unknown_partition_after_removal to include
partition_nmx_c_id as a structured tracing field, while preserving the existing
machine_id, device_instance, and error message.

Source: Path instructions

crates/preingestion-manager/src/lib.rs (1)

3174-3256: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Carry address through the remaining early-exit logs in initiate_update.

Two sibling gaps in this exact function (multipart-not-supported / failed-to-open-firmware-file) were already fixed to include address = %endpoint_clone.address. Four more sites in the same function still omit it — resolving artifact / RSHIM failures across concurrently-processed endpoints will be hard to attribute without it:

  • artifact-resolution failure ("Failed to resolve firmware artifact")
  • download-deferred debug log ("Firmware artifact is being downloaded; update deferred")
  • missing-local-artifact error ("Firmware artifact is not present")
  • RSHIM-enable failure ("Failed to enable RSHIM on BMC")
🔧 Proposed fix
             Ok(artifact) => artifact,
             Err(error) => {
-                tracing::error!(%error, "Failed to resolve firmware artifact");
+                tracing::error!(
+                    address = %endpoint_clone.address,
+                    %error,
+                    "Failed to resolve firmware artifact"
+                );
                 return Ok(false);
             }
@@
                     if !self.downloader.available(&artifact.local_path, url, sha256) {
                         tracing::debug!(
+                            address = %endpoint_clone.address,
                             path = %artifact.local_path.display(),
                             %url,
                             "Firmware artifact is being downloaded; update deferred"
                         );
@@
                     if !artifact.local_path.exists() {
                         tracing::error!(
+                            address = %endpoint_clone.address,
                             path = %artifact.local_path.display(),
                             "Firmware artifact is not present"
                         );
@@
             redfish_client
                 .enable_rshim_bmc()
                 .await
-                .inspect_err(|e| tracing::error!(error = %e, "Failed to enable RSHIM on BMC"))
+                .inspect_err(|e| tracing::error!(address = %endpoint_clone.address, error = %e, "Failed to enable RSHIM on BMC"))
                 .ok();
🤖 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/preingestion-manager/src/lib.rs` around lines 3174 - 3256, Update the
four logging sites in initiate_update to include address =
%endpoint_clone.address: the “Failed to resolve firmware artifact” error,
“Firmware artifact is being downloaded; update deferred” debug message,
“Firmware artifact is not present” error, and “Failed to enable RSHIM on BMC”
error. Preserve their existing messages and behavior.
♻️ Duplicate comments (2)
crates/api-core/src/dpa/handler.rs (2)

151-153: 🗄️ Data Integrity & Integration | 🟡 Minor

Distinguish missing and duplicate SPX partitions.

partition.len() != 1 covers both zero and multiple matches, but the message says “not found”. Split the cases or include the count so duplicate database rows are not misclassified.

🤖 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/dpa/handler.rs` around lines 151 - 153, Update the
partition validation in the handler around the partition lookup to distinguish
zero matches from multiple matches: retain the “not found” error only when
partition.len() is zero, and add a separate error for duplicate matches that
includes the count, returning in both invalid cases.

61-66: 🎯 Functional Correctness | 🟡 Minor

Preserve the MAC parse error.

The changed event still logs only the token. Err(_e) discards the actual parsing failure, so malformed MQTT topics lose the reason. Bind the error and emit it as error = %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/dpa/handler.rs` around lines 61 - 66, Update the DPA MAC
parsing error branch around the MQTT topic handler to bind the parse error
instead of discarding it. Include the bound error in the tracing::error! call
using the structured field error = %error, while retaining the existing
mac_address field and return behavior.
🧹 Nitpick comments (6)
crates/agent/src/dpu/interface.rs (1)

70-70: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use %interface for the interface-name field.

interface is a string value, so ?interface emits Debug formatting instead of the semantic string representation. Keep ?networks, but change this field to %interface.

As per coding guidelines, use %field for Display values and ?field for Debug values.

Proposed fix
- tracing::info!(?networks, ?interface, "Adding addresses to Interface");
+ tracing::info!(?networks, %interface, "Adding addresses to Interface");
🤖 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/dpu/interface.rs` at line 70, Update the tracing call in the
interface address-addition flow to use Display formatting for the string
interface name: change the interface field in the log statement to %interface
while retaining ?networks.

Source: Coding guidelines

crates/agent/src/extension_services/dpu_extension_service_observability.rs (1)

163-173: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Merge stdout/stderr into a single error! event instead of two. Both sites split one command-failure occurrence into two separate tracing::error! calls (one for stdout, one for stderr), doubling error-level log/alert volume per failure and splitting correlated data across two log lines.

  • crates/agent/src/extension_services/dpu_extension_service_observability.rs#L163-L173: combine the two tracing::error! calls into one, emitting both stdout and stderr fields together.
  • crates/agent/src/traffic_intercept_bridging.rs#L158-L168: same fix — combine into a single tracing::error! call with both stdout and stderr fields.
♻️ Proposed fix (apply to both sites)
-        tracing::error!(
-            command = cmd_str.as_str(),
-            stdout = %String::from_utf8_lossy(&out.stdout),
-            "OTel validation command stdout"
-        );
-        tracing::error!(
-            command = cmd_str.as_str(),
-            stderr = %String::from_utf8_lossy(&out.stderr),
-            "OTel validation command stderr"
-        );
+        tracing::error!(
+            command = cmd_str.as_str(),
+            stdout = %String::from_utf8_lossy(&out.stdout),
+            stderr = %String::from_utf8_lossy(&out.stderr),
+            "OTel validation command failed"
+        );
🤖 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/extension_services/dpu_extension_service_observability.rs`
around lines 163 - 173, Merge the two command-failure tracing::error! calls into
one event that includes both stdout and stderr fields. Apply this in
crates/agent/src/extension_services/dpu_extension_service_observability.rs at
lines 163-173 and crates/agent/src/traffic_intercept_bridging.rs at lines
158-168, preserving the command field and existing failure message.
crates/rack-controller/src/created.rs (1)

96-100: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use tracing field shorthand for same-named counts.

Replace the redundant assignments with compute_count, switch_count, and power_shelf_count. This keeps the structured event concise and follows the repository’s tracing conventions.

As per coding guidelines: “Use native tracing field shorthand for tracing::Value types.”

🤖 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/rack-controller/src/created.rs` around lines 96 - 100, In the tracing
event in created.rs, update the fields for compute_count, switch_count, and
power_shelf_count to use native same-name shorthand instead of explicit
self-assignments. Leave the rack_id field and event message unchanged.

Source: Coding guidelines

crates/api-core/src/instance/mod.rs (1)

1427-1439: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add table-driven coverage for duplicate SPX attachments.

The new guard rejects duplicate (device, device_instance) pairs. Add regression cases for both rejection and successful allocation of distinct attachments.

As per coding guidelines, Rust functions mapping inputs to outputs or errors should use table-driven tests.

🤖 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/instance/mod.rs` around lines 1427 - 1439, Add
table-driven tests for the duplicate-attachment validation in the instance
allocation flow containing cases for duplicate (device, device_instance) pairs
returning the expected InvalidArgument error and distinct attachments allocating
successfully. Reuse the existing instance allocation test helpers and assert
each case’s result, including the duplicate rejection and successful
distinct-attachment behavior.

Source: Coding guidelines

crates/ib-fabric/src/lib.rs (1)

1082-1096: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Drop the manual write! loop; log the pkey lists as structured ? fields.

These three branches still hand-build a msg: String via a write! loop and attach it as a single details field, while down_ports = ?result.down_port_guids a few lines below achieves the same goal with a plain debug field on the underlying Vec. Passing ?result.missing_guid_pkeys (etc.) directly removes the loop, the write!().unwrap() calls, and produces a properly structured (queryable) field instead of a flattened string — consistent with this PR's own stated goal.

♻️ Proposed simplification (missing_guid_pkeys shown; same pattern applies to the other two)
     if !result.missing_guid_pkeys.is_empty() {
         metrics.num_machines_with_missing_pkeys += 1;
-        let mut msg = "Machine is missing pkeys on UFM: ".to_string();
-        for (idx, (_fabric, guid, pkey)) in result.missing_guid_pkeys.iter().enumerate() {
-            if idx != 0 {
-                msg.push(',');
-            }
-            write!(&mut msg, "(guid: {guid}, pkey: {pkey})").unwrap();
-        }
         tracing::warn!(
             machine_id = %machine_id,
-            details = %msg,
+            missing_guid_pkeys = ?result.missing_guid_pkeys,
             "Machine is missing pkeys on UFM",
         );
     }
As per path instructions, "Review Rust code against STYLE_GUIDE.md: ... structured tracing fields ... Prefer findings about behavior, concurrency, resource lifetimes, and missing tests over style-only comments." This one also removes an `unwrap()` call, so it's not purely stylistic.

Also applies to: 1097-1111, 1112-1127

🤖 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/ib-fabric/src/lib.rs` around lines 1082 - 1096, Replace the manual
message-building loops in the three missing-pkey logging branches with
structured debug fields on the underlying result vectors. Update the tracing
calls around missing_guid_pkeys and the corresponding branches at 1097-1111 and
1112-1127 to pass each list directly as a ? field, removing the String
construction, write! calls, and details field while preserving the existing
warning context and metrics updates.

Source: Path instructions

crates/machine-controller/src/handler.rs (1)

7867-7871: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Per-item INFO logging in a hot reconciliation path is likely too chatty for production.

"Found device for dpu", "Found device_instance for dpu", and "checking dpu" fire once per DPU, per instance, on every invocation of check_instance_network_synced_and_dpu_healthy — which itself runs on every WaitingForNetworkConfig/WaitingForConfigSynced reconciliation tick. At INFO level, fleets with many multi-DPU tenant instances will generate a steady stream of low-value log lines that mostly document internal bookkeeping rather than an operator-relevant event.

Recommend demoting these three to debug (or trace), consistent with how other purely-diagnostic per-iteration lines in this file (e.g., the BMC log scan at line 2226, or the "Found device for dpu"-style checks elsewhere) are kept at debug.

♻️ Suggested level change
-                    tracing::info!(
+                    tracing::debug!(
                         %device,
                         machine_id = %dpu_machine_id,
                         "Found device for dpu"
                     );
...
-                        tracing::info!(
+                        tracing::debug!(
                             device_instance,
                             machine_id = %dpu_machine_id,
                             "Found device_instance for dpu"
                         );
...
-            tracing::info!(machine_id = %dpu_id, "checking dpu");
+            tracing::debug!(machine_id = %dpu_id, "checking dpu");

Also applies to: 7877-7881, 7907-7907

🤖 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 7867 - 7871, Demote
the per-item diagnostic logs in check_instance_network_synced_and_dpu_healthy
from INFO to DEBUG, specifically “Found device for dpu,” “Found device_instance
for dpu,” and “checking dpu.” Keep their messages and fields unchanged while
ensuring all three no longer emit at production INFO level.
🤖 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/astra_weave.rs`:
- Around line 700-703: Update the Deleted mismatched virtual network attachment
log in the surrounding control flow to log match_attachment safely without
calling as_ref().unwrap(); reuse the existing Option-aware tracing field style
used by the sibling error branch, while preserving the current deletion
behavior.

In `@crates/agent/src/health/bgp.rs`:
- Line 76: Update the tracing warning event around the BGP daemon configuration
check to use a stable, human-readable message instead of the identifier-style
string. Preserve the existing error = %err field and provide wording that
clearly indicates reading the BGP daemon configuration failed.

In `@crates/agent/src/machine_inventory_updater.rs`:
- Line 137: Update the tracing in the machine inventory update flow to stop
serializing the complete inventory_report. Log only bounded metadata,
specifically the machine identifier and software/component count, while
preserving the existing trace event context.

In `@crates/agent/src/mtu.rs`:
- Around line 59-61: Preserve child-process output as rendered diagnostic
message content instead of logging it only as structured fields. In
crates/agent/src/mtu.rs lines 59-61 and 79-81, include the MTU query and update
stderr in the rendered diagnostics; in crates/agent/src/ovs.rs lines 47-55,
include both OVS stdout and stderr in rendered diagnostics while retaining
command as structured metadata.

In `@crates/api-core/src/dpa/handler.rs`:
- Around line 196-201: Update the error event in the machine lookup failure
branch to include the relevant DPA-interface context, using the existing dpa_if
or machine identifier as the adjacent not-found branch does, while preserving
the current error field and return behavior.

In `@crates/api-core/src/handlers/instance_type.rs`:
- Around line 597-603: Remove the dangling “ids; versions” fragment from the
tracing message in the length-mismatch error block. Keep the stable
human-readable message and the existing structured fields `ids` and
`machine_versions` unchanged.

In `@crates/api-db/src/work_lock_manager.rs`:
- Around line 303-308: Update the tracing::error! call handling the work-lock
release try_send failure to use a neutral human-readable message that does not
imply queue saturation or database overload. Preserve the structured work_key,
worker_id, and error fields while changing only the descriptive message.

In `@crates/dpu-remediation/src/remediation.rs`:
- Around line 239-242: Update the error logging in the remediation response
handling around next_remediation to remove the full response debug field. Log
only bounded presence flags and safe identifiers, such as whether the ID and
script are present, while preserving the existing skip-and-retry behavior.

In `@crates/ssh-console/src/ssh_cert_parsing.rs`:
- Around line 83-85: Remove the raw ?key_id field from both warning logs in
crates/ssh-console/src/ssh_cert_parsing.rs at lines 83-85 and 111-113. Retain
the role_field and user_field fields respectively, or replace key_id with a
non-reversible fingerprint in both diagnostics.

In `@crates/switch-controller/src/initializing.rs`:
- Around line 70-74: Update the tracing::info! message in the no-expected-switch
branch to describe the transition to SwitchControllerState::Error rather than
saying the controller is waiting. Preserve the existing switch_id and
bmc_mac_address fields and all state-transition behavior.

---

Outside diff comments:
In `@crates/host-support/src/registration.rs`:
- Around line 122-148: Update the tracing::debug message in
discover_machine_once to use discover_machine terminology instead of
register_machine, while preserving the existing request field and logging
behavior.

In `@crates/nvlink-manager/src/lib.rs`:
- Around line 514-571: Update all four “NMX-C partition not found” tracing error
calls in get_gpus_to_keep_after_removal and
get_gpus_to_keep_in_unknown_partition_after_removal to include
partition_nmx_c_id as a structured tracing field, while preserving the existing
machine_id, device_instance, and error message.

In `@crates/preingestion-manager/src/lib.rs`:
- Around line 3174-3256: Update the four logging sites in initiate_update to
include address = %endpoint_clone.address: the “Failed to resolve firmware
artifact” error, “Firmware artifact is being downloaded; update deferred” debug
message, “Firmware artifact is not present” error, and “Failed to enable RSHIM
on BMC” error. Preserve their existing messages and behavior.

---

Duplicate comments:
In `@crates/api-core/src/dpa/handler.rs`:
- Around line 151-153: Update the partition validation in the handler around the
partition lookup to distinguish zero matches from multiple matches: retain the
“not found” error only when partition.len() is zero, and add a separate error
for duplicate matches that includes the count, returning in both invalid cases.
- Around line 61-66: Update the DPA MAC parsing error branch around the MQTT
topic handler to bind the parse error instead of discarding it. Include the
bound error in the tracing::error! call using the structured field error =
%error, while retaining the existing mac_address field and return behavior.

---

Nitpick comments:
In `@crates/agent/src/dpu/interface.rs`:
- Line 70: Update the tracing call in the interface address-addition flow to use
Display formatting for the string interface name: change the interface field in
the log statement to %interface while retaining ?networks.

In `@crates/agent/src/extension_services/dpu_extension_service_observability.rs`:
- Around line 163-173: Merge the two command-failure tracing::error! calls into
one event that includes both stdout and stderr fields. Apply this in
crates/agent/src/extension_services/dpu_extension_service_observability.rs at
lines 163-173 and crates/agent/src/traffic_intercept_bridging.rs at lines
158-168, preserving the command field and existing failure message.

In `@crates/api-core/src/instance/mod.rs`:
- Around line 1427-1439: Add table-driven tests for the duplicate-attachment
validation in the instance allocation flow containing cases for duplicate
(device, device_instance) pairs returning the expected InvalidArgument error and
distinct attachments allocating successfully. Reuse the existing instance
allocation test helpers and assert each case’s result, including the duplicate
rejection and successful distinct-attachment behavior.

In `@crates/ib-fabric/src/lib.rs`:
- Around line 1082-1096: Replace the manual message-building loops in the three
missing-pkey logging branches with structured debug fields on the underlying
result vectors. Update the tracing calls around missing_guid_pkeys and the
corresponding branches at 1097-1111 and 1112-1127 to pass each list directly as
a ? field, removing the String construction, write! calls, and details field
while preserving the existing warning context and metrics updates.

In `@crates/machine-controller/src/handler.rs`:
- Around line 7867-7871: Demote the per-item diagnostic logs in
check_instance_network_synced_and_dpu_healthy from INFO to DEBUG, specifically
“Found device for dpu,” “Found device_instance for dpu,” and “checking dpu.”
Keep their messages and fields unchanged while ensuring all three no longer emit
at production INFO level.

In `@crates/rack-controller/src/created.rs`:
- Around line 96-100: In the tracing event in created.rs, update the fields for
compute_count, switch_count, and power_shelf_count to use native same-name
shorthand instead of explicit self-assignments. Leave the rack_id field and
event message unchanged.
🪄 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: 8243e9a1-9e73-48b7-9856-6f299da9715c

📥 Commits

Reviewing files that changed from the base of the PR and between c0952bb and b70b2ba.

📒 Files selected for processing (271)
  • STYLE_GUIDE.md
  • crates/admin-cli/src/machine/show/cmd.rs
  • crates/admin-cli/src/rpc.rs
  • crates/agent/src/agent_platform.rs
  • crates/agent/src/astra_weave.rs
  • crates/agent/src/containerd/container.rs
  • crates/agent/src/containerd/image.rs
  • crates/agent/src/dhcp_server_grpc_client.rs
  • crates/agent/src/dpu/interface.rs
  • crates/agent/src/dpu/link.rs
  • crates/agent/src/dpu/route.rs
  • crates/agent/src/ethernet_virtualization.rs
  • crates/agent/src/extension_services/dpu_extension_service_observability.rs
  • crates/agent/src/extension_services/k8s_pod_handler.rs
  • crates/agent/src/hbn.rs
  • crates/agent/src/health.rs
  • crates/agent/src/health/bgp.rs
  • crates/agent/src/host_machine_id.rs
  • crates/agent/src/instance_metadata_endpoint.rs
  • crates/agent/src/instrumentation.rs
  • crates/agent/src/lib.rs
  • crates/agent/src/machine_inventory_updater.rs
  • crates/agent/src/main_loop.rs
  • crates/agent/src/managed_files.rs
  • crates/agent/src/mtu.rs
  • crates/agent/src/netlink.rs
  • crates/agent/src/network_monitor.rs
  • crates/agent/src/nvue.rs
  • crates/agent/src/ovs.rs
  • crates/agent/src/periodic_config_fetcher.rs
  • crates/agent/src/tests/common/mod.rs
  • crates/agent/src/tests/full.rs
  • crates/agent/src/tests/test_network_monitor.rs
  • crates/agent/src/traffic_intercept_bridging.rs
  • crates/agent/src/upgrade.rs
  • crates/api-core/src/attestation/measured_boot.rs
  • crates/api-core/src/attestation/tpm_ca_cert.rs
  • crates/api-core/src/db_init.rs
  • crates/api-core/src/dhcp/discover.rs
  • crates/api-core/src/dpa/handler.rs
  • crates/api-core/src/dynamic_settings.rs
  • crates/api-core/src/handlers/api.rs
  • crates/api-core/src/handlers/astra.rs
  • crates/api-core/src/handlers/attestation.rs
  • crates/api-core/src/handlers/bmc_endpoint_explorer.rs
  • crates/api-core/src/handlers/component_manager.rs
  • crates/api-core/src/handlers/dns.rs
  • crates/api-core/src/handlers/dpu_remediation.rs
  • crates/api-core/src/handlers/expected_machine.rs
  • crates/api-core/src/handlers/extension_service.rs
  • crates/api-core/src/handlers/finder.rs
  • crates/api-core/src/handlers/firmware.rs
  • crates/api-core/src/handlers/instance.rs
  • crates/api-core/src/handlers/instance_type.rs
  • crates/api-core/src/handlers/machine.rs
  • crates/api-core/src/handlers/machine_discovery.rs
  • crates/api-core/src/handlers/machine_scout.rs
  • crates/api-core/src/handlers/machine_validation.rs
  • crates/api-core/src/handlers/rack.rs
  • crates/api-core/src/handlers/redfish.rs
  • crates/api-core/src/handlers/scout_stream.rs
  • crates/api-core/src/handlers/site_explorer.rs
  • crates/api-core/src/handlers/svpc.rs
  • crates/api-core/src/handlers/uefi.rs
  • crates/api-core/src/instance/mod.rs
  • crates/api-core/src/ipxe.rs
  • crates/api-core/src/listener.rs
  • crates/api-core/src/logging/setup.rs
  • crates/api-core/src/machine_update_manager/dpu_nic_firmware.rs
  • crates/api-core/src/machine_update_manager/host_firmware.rs
  • crates/api-core/src/machine_update_manager/mod.rs
  • crates/api-core/src/machine_validation/mod.rs
  • crates/api-core/src/measured_boot/metrics_collector/mod.rs
  • crates/api-core/src/mqtt_state_change_hook/hook.rs
  • crates/api-core/src/run.rs
  • crates/api-core/src/scout_stream.rs
  • crates/api-core/src/setup.rs
  • crates/api-core/src/tests/common/api_fixtures/dpu.rs
  • crates/api-core/src/tests/common/api_fixtures/mod.rs
  • crates/api-core/src/tests/common/api_fixtures/site_explorer.rs
  • crates/api-core/src/tests/common/api_fixtures/test_machine/mod.rs
  • crates/api-core/src/tests/dns.rs
  • crates/api-core/src/tests/dpu_reprovisioning.rs
  • crates/api-core/src/tests/instance.rs
  • crates/api-core/src/tests/machine_network.rs
  • crates/api-core/src/tests/sku.rs
  • crates/api-core/tests/integration/machine_bmc_metadata.rs
  • crates/api-db/src/bmc_metadata.rs
  • crates/api-db/src/carbide_version.rs
  • crates/api-db/src/dns/resource_record.rs
  • crates/api-db/src/expected_power_shelf.rs
  • crates/api-db/src/expected_switch.rs
  • crates/api-db/src/instance.rs
  • crates/api-db/src/lib.rs
  • crates/api-db/src/machine.rs
  • crates/api-db/src/machine_interface.rs
  • crates/api-db/src/machine_topology.rs
  • crates/api-db/src/measured_boot/bundle.rs
  • crates/api-db/src/vpc_dpu_loopback.rs
  • crates/api-db/src/work_lock_manager.rs
  • crates/api-integration-tests/tests/lib.rs
  • crates/api-model/src/dpa_interface/mod.rs
  • crates/api-model/src/firmware.rs
  • crates/api-model/src/instance/status/network.rs
  • crates/api-model/src/instance/status/nvlink.rs
  • crates/api-model/src/instance/status/spx.rs
  • crates/api-model/src/machine/mod.rs
  • crates/api-model/src/machine/nvlink.rs
  • crates/api-model/src/machine/spx.rs
  • crates/api-model/src/site_explorer/mod.rs
  • crates/api-test-helper/src/domain.rs
  • crates/api-test-helper/src/instance.rs
  • crates/api-test-helper/src/machine.rs
  • crates/api-test-helper/src/machine_a_tron.rs
  • crates/api-test-helper/src/subnet.rs
  • crates/api-test-helper/src/tenant.rs
  • crates/api-test-helper/src/vpc.rs
  • crates/api-test-helper/src/vpc_prefix.rs
  • crates/api-web/src/auth.rs
  • crates/api-web/src/interface.rs
  • crates/api-web/src/lib.rs
  • crates/api-web/src/machine.rs
  • crates/api-web/src/managed_host.rs
  • crates/api-web/src/search.rs
  • crates/bmc-explorer/src/chassis.rs
  • crates/bmc-explorer/src/computer_system.rs
  • crates/bmc-explorer/src/manager.rs
  • crates/bmc-mock/src/combined_server.rs
  • crates/bmc-mock/src/combined_service.rs
  • crates/bmc-mock/src/main.rs
  • crates/bmc-mock/src/redfish/expander_router.rs
  • crates/bmc-mock/src/tar_router.rs
  • crates/bmc-mock/src/tls.rs
  • crates/bmc-proxy/src/bmc_proxy.rs
  • crates/bmc-proxy/src/setup.rs
  • crates/dhcp-server/src/cache.rs
  • crates/dhcp-server/src/grpc_server.rs
  • crates/dhcp-server/src/main.rs
  • crates/dhcp-server/src/modes/controller.rs
  • crates/dhcp-server/src/packet_handler.rs
  • crates/dhcp-server/src/util.rs
  • crates/dns-record/src/lib.rs
  • crates/dns/src/lib.rs
  • crates/dns/src/main.rs
  • crates/dpa-manager/src/card_handler/astra.rs
  • crates/dpa-manager/src/card_handler/svpc.rs
  • crates/dpa-manager/src/lib.rs
  • crates/dpa/src/lib.rs
  • crates/dpf/src/sdk.rs
  • crates/dpu-otel-agent/src/lib.rs
  • crates/dpu-remediation/src/remediation.rs
  • crates/dsx-exchange-consumer/src/api_client.rs
  • crates/firmware/src/config.rs
  • crates/firmware/src/downloader.rs
  • crates/fmds/src/http_request_metrics.rs
  • crates/fmds/src/main.rs
  • crates/fmds/src/nic_init.rs
  • crates/fmds/src/phone_home.rs
  • crates/health/src/api_client.rs
  • crates/health/src/collectors/logs/periodic.rs
  • crates/health/src/discovery/cleanup.rs
  • crates/health/src/discovery/context.rs
  • crates/health/src/discovery/spawn.rs
  • crates/health/src/metrics.rs
  • crates/host-support/src/hardware_enumeration.rs
  • crates/host-support/src/hardware_enumeration/dpu.rs
  • crates/host-support/src/hardware_enumeration/gpu.rs
  • crates/host-support/src/hardware_enumeration/tpm.rs
  • crates/host-support/src/registration.rs
  • crates/http-connector/src/connector.rs
  • crates/http-connector/src/resolver.rs
  • crates/ib-fabric/src/lib.rs
  • crates/ib-partition-controller/src/handler.rs
  • crates/ipmi/src/tool.rs
  • crates/kms-provider/src/providers/transit.rs
  • crates/libmlx/src/device/discovery.rs
  • crates/libnmxc/src/lib.rs
  • crates/libnmxm/src/lib.rs
  • crates/machine-a-tron/src/api_client.rs
  • crates/machine-a-tron/src/api_throttler.rs
  • crates/machine-a-tron/src/bmc_mock_wrapper.rs
  • crates/machine-a-tron/src/dhcp_wrapper.rs
  • crates/machine-a-tron/src/host_machine.rs
  • crates/machine-a-tron/src/machine_a_tron.rs
  • crates/machine-a-tron/src/machine_state_machine.rs
  • crates/machine-a-tron/src/machine_utils.rs
  • crates/machine-a-tron/src/main.rs
  • crates/machine-a-tron/src/mock_ssh_server.rs
  • crates/machine-a-tron/src/subnet.rs
  • crates/machine-a-tron/src/tui.rs
  • crates/machine-a-tron/src/vpc.rs
  • crates/machine-controller/src/dpf.rs
  • crates/machine-controller/src/handler.rs
  • crates/machine-controller/src/handler/attestation.rs
  • crates/machine-controller/src/handler/bios_config.rs
  • crates/machine-controller/src/handler/dpf.rs
  • crates/machine-controller/src/handler/machine_validation.rs
  • crates/machine-controller/src/handler/power.rs
  • crates/machine-controller/src/handler/sku.rs
  • crates/machine-validation/src/machine_validation.rs
  • crates/metrics-endpoint/src/lib.rs
  • crates/metrics-utils/src/lib.rs
  • crates/mqttea-example/src/main.rs
  • crates/mqttea/src/client/core.rs
  • crates/mqttea/src/client/messages.rs
  • crates/mqttea/src/registry/core.rs
  • crates/nvlink-manager/src/lib.rs
  • crates/nvlink-manager/src/switch_cert_monitor.rs
  • crates/power-shelf-controller/src/configuring.rs
  • crates/power-shelf-controller/src/deleting.rs
  • crates/power-shelf-controller/src/fetching_data.rs
  • crates/power-shelf-controller/src/initializing.rs
  • crates/preingestion-manager/src/bfb_rshim_copier.rs
  • crates/preingestion-manager/src/lib.rs
  • crates/preingestion-manager/tests/integration/host_bmc_firmware.rs
  • crates/rack-controller/src/created.rs
  • crates/rack-controller/src/discovering.rs
  • crates/rack-controller/src/error_state.rs
  • crates/rack-controller/src/handler.rs
  • crates/rack-controller/src/lib.rs
  • crates/rack-controller/src/maintenance.rs
  • crates/rack-controller/src/ready.rs
  • crates/rack-controller/src/validating.rs
  • crates/rpc-utils/src/managed_host_display.rs
  • crates/rpc/src/errors.rs
  • crates/rpc/src/forge_tls_client.rs
  • crates/rpc/src/model/dpu_remediation.rs
  • crates/scout/src/attestation.rs
  • crates/scout/src/deprovision/scrabbing.rs
  • crates/scout/src/firmware_upgrade.rs
  • crates/scout/src/main.rs
  • crates/scout/src/mlx_device.rs
  • crates/scout/src/register.rs
  • crates/scout/src/stream.rs
  • crates/scout/src/tpm.rs
  • crates/secrets/src/forge_vault.rs
  • crates/secrets/src/local_credentials/file.rs
  • crates/site-explorer/src/bmc_endpoint_explorer.rs
  • crates/site-explorer/src/explored_endpoint_index.rs
  • crates/site-explorer/src/lib.rs
  • crates/site-explorer/src/machine_creator.rs
  • crates/site-explorer/src/redfish.rs
  • crates/site-explorer/src/switch_creator.rs
  • crates/site-explorer/src/test_support/mock_endpoint_explorer.rs
  • crates/site-explorer/tests/integration/power_shelf.rs
  • crates/site-explorer/tests/integration/site_explorer.rs
  • crates/site-explorer/tests/integration/switch.rs
  • crates/spdm-controller/src/handler.rs
  • crates/ssh-console-mock-api-server/src/lib.rs
  • crates/ssh-console/src/bmc/client.rs
  • crates/ssh-console/src/bmc/connection.rs
  • crates/ssh-console/src/bmc/connection_impl/ipmi.rs
  • crates/ssh-console/src/bmc/connection_impl/ssh.rs
  • crates/ssh-console/src/bmc/message_proxy.rs
  • crates/ssh-console/src/config.rs
  • crates/ssh-console/src/console_logger.rs
  • crates/ssh-console/src/frontend.rs
  • crates/ssh-console/src/metrics.rs
  • crates/ssh-console/src/ssh_cert_parsing.rs
  • crates/ssh-console/src/ssh_server.rs
  • crates/ssh-console/tests/util/ipmi_sim.rs
  • crates/ssh-console/tests/util/mod.rs
  • crates/state-controller/src/controller/processor.rs
  • crates/switch-controller/src/certificate.rs
  • crates/switch-controller/src/configuring.rs
  • crates/switch-controller/src/created.rs
  • crates/switch-controller/src/deleting.rs
  • crates/switch-controller/src/error_state.rs
  • crates/switch-controller/src/initializing.rs
  • crates/switch-controller/src/ready.rs
  • crates/switch-controller/src/validating.rs
💤 Files with no reviewable changes (1)
  • crates/health/src/discovery/context.rs

Comment thread crates/agent/src/astra_weave.rs
Comment thread crates/agent/src/health/bgp.rs Outdated
Comment thread crates/agent/src/machine_inventory_updater.rs Outdated
Comment thread crates/agent/src/mtu.rs Outdated
Comment thread crates/api-core/src/dpa/handler.rs
Comment thread crates/api-core/src/handlers/instance_type.rs
Comment thread crates/api-db/src/work_lock_manager.rs
Comment thread crates/dpu-remediation/src/remediation.rs
Comment thread crates/ssh-console/src/ssh_cert_parsing.rs
Comment thread crates/switch-controller/src/initializing.rs
NICo's tracing events now keep operational values in named fields and use stable messages, making logfmt output easier to search and aggregate. The sweep keeps presentation-oriented CLI and passthrough output intact where the rendered text is itself the payload.

Primary callouts:

- Convert roughly 1,400 direct tracing events across more than 50 crates to stable messages with semantic fields.
- Keep IDs, endpoints, counts, states, and errors typed and searchable while preserving trace levels and intentional Display, Debug, and custom formatting.
- Strengthen STYLE_GUIDE.md so new tracing events follow the same structured-logging convention.
- Leave CLI output, child-process streams, aligned or multiline displays, and logging fixtures rendered where the text itself is the payload.

This supports NVIDIA#3476

Signed-off-by: Chet Nichols III <chetn@nvidia.com>
@chet

chet commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Final review consolidation is in 86829a2:

  • Addressed all eight inline findings plus the applicable outside-diff and nitpick suggestions, including child-process rendering, sensitive payload reduction, missing correlation fields, and structured pkey lists.
  • Kept the MQTT backoff as an ordinary structured warning because a new metric name/type is a separate instrumentation design decision.
  • Did not add tests for the pre-existing duplicate-SPX guard or change pre-existing machine-controller log levels; this refactor intentionally preserves behavior and trace levels.
  • Revalidated nightly formatting, full Clippy, Carbide lints, a nine-library regression set, the 70-item intentional residual audit, and a no-findings local CodeRabbit review of the complete 17-file delta.

@coderabbitai full_review, thanks!

@coderabbitai

coderabbitai Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

@chet, thank you for the consolidation pass. Acknowledged:

  • All eight inline findings plus applicable outside-diff and nitpick suggestions (child-process rendering, sensitive payload reduction, missing correlation fields, structured pkey lists) addressed in commit 86829a2bb.
  • MQTT backoff intentionally kept as an ordinary structured warning, consistent with the earlier agreement that dedicated metrics/telemetry semantics are a separate design decision.
  • No tests added for the pre-existing duplicate-SPX guard, and no changes to pre-existing machine-controller log levels — both correctly out of scope for a refactor meant to preserve behavior and trace levels.
  • Clean revalidation: nightly formatting, full Clippy, Carbide lints, the nine-library regression set, the 70-item intentional residual audit, and a no-findings local CodeRabbit review of the complete 17-file delta.

Kicking off the full review now to verify the final delta.

(=^・ω・^=)


✏️ Learnings added
Learnt from: chet
URL: https://github.com/NVIDIA/infra-controller/pull/3479

Timestamp: 2026-07-14T12:19:41.324Z
Learning: Learnt from: chet
Repo: NVIDIA/infra-controller
PR: `#3479`
In this structured-logging refactor PR, a pre-existing duplicate-SPX guard was intentionally left without new tests, and pre-existing machine-controller log levels (trace levels) were intentionally left unchanged. The refactor's scope is to convert log messages to structured fields while preserving existing behavior and trace levels, so these should not be flagged as gaps introduced by this PR.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

✅ Action performed

Full review finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant