← Back to Pull requests

fix(sdr): correct FRU locator decoding and expose device types #64

Closed
unknown closed this pull request without merging on Oct 18, 2026 08:57 UTC
View on GitHub
unknown unknown commented on Oct 11, 2026 09:55 UTC
Author

FRU inventory discovery in ipmicfg exposed an inaccessible FruDevice enum: callers can read FruRecordKey::fru_device but cannot name its type or match its variants. Inspecting the decoder also found three parsing bugs in SDR Type 11h records.

This fixes FRU locator decoding according to IPMI 2.0, Section 43.8, Table 43-7:

  • Read the logical/physical flag from payload byte 2, bit 7, with a set bit meaning logical. Previously the parser checked the device ID/address byte and treated a set bit as physical; for example, logical FRU ID 0x83 was decoded as physical I2C address 0x41.

  • Extract the channel from payload byte 3's upper nibble, so 0xB0 becomes channel 0x0B.

  • Require all 11 fixed payload bytes before indexing them. Payloads of 8–10 bytes previously panicked instead of returning ParseError::NotEnoughData.

  • Re-export the existing FRU locator, key, device enum, and variant payload types so applications can consume the parsed data directly.
  • Five integration tests exercise the public API through Record::parse, including logical IDs and physical addresses on both sides of bit 7, decoded fields, every truncated fixed-field length, and a valid empty device ID string. Four tests failed against the old parser and pass with these changes.

    The PR contains one amended fix commit on upstream e7e5d0f, with no merge commits. The parser comment describes the flag being extracted; the explanation of the previous incorrect behavior is in the commit message.

    Validation:

  • cargo test --locked --workspace --all-features — 45 tests passed.

  • cargo test --locked --offline -p ipmi-rs-core --no-default-features and the time / log feature combinations — passed.

  • cargo clippy --locked --offline --workspace --all-features -- -D warnings — passed.

  • cargo clippy --locked --offline -p ipmi-rs-core --all-targets --all-features -- -D warnings — passed.

  • cargo fmt --all -- --check — passed.
  • An additional workspace-wide Clippy run with --all-targets reports existing warnings in unchanged ipmi-rs examples and ipmi-rs/src/rmcp/checksum.rs.

    Diff: 281 lines (+210 / -71) across 3 files Reviewer: nuclearcat Review duration: 10022m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 281 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #64"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%