Skip to content

fix(diagnostic-policy): allow -s, -d, and -t flags for lspci bridge inspection - #92

Merged
RohanAdwankar merged 1 commit into
NVIDIA:mainfrom
Akshatshukla-25:fix/diagnostic-policy-lspci-flags
Nov 3, 2026
Merged

RohanAdwankar merged 1 commit into
NVIDIA:mainfrom
Akshatshukla-25:fix/diagnostic-policy-lspci-flags

Conversation

@Akshatshukla-25

Copy link
Copy Markdown
Contributor

Description

resolves #69

The diagnostic command policy previously restricted lspci with regex /^(-[Dknmvx]+|-[a-zA-Z]{2,})$/. This rejected parameters with option values like -s <slot> and -d <device>, as well as tree-view -t.

This blocked standard PCIe ancestor bridge inspections recommended by the gpu-networking skill (lspci -s <bridge> -vvv), preventing agents from reading slot-specific device capabilities in View mode.

Changes

  • Implemented a dedicated lspci validator in diagnostic-policy.ts permitting -s <slot>, -d <device>, -t, and standard output flags (-D, -k, -n, -m, -v, -x, -b).
  • Handles both whitespace-separated (-s <slot>) and attached (-s<slot>) parameter formats.
  • Rejects missing parameter values, flags passed as argument values, and invalid characters.
  • Added comprehensive unit tests in diagnostic-policy.test.mjs verifying accepted and rejected edge cases.

Checklist

…nspection

- Allow -s <slot>, -d <device>, and -t flags in diagnostic lspci policy for GPU networking investigations
- Add unit tests verifying valid and rejected lspci arguments

Signed-off-by: dev-akshatshukla <akshat21shukla@gmail.com>
@RohanAdwankar
RohanAdwankar merged commit 9cb820c into NVIDIA:main Nov 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants