Skip to content

test(xone43c): capture reproducible USB topology evidence - #4

Open
pvurda wants to merge 1 commit into
feat/driver-diagnosticsfrom
tests/xone43c-hardware-evidence
Open

test(xone43c): capture reproducible USB topology evidence#4
pvurda wants to merge 1 commit into
feat/driver-diagnosticsfrom
tests/xone43c-hardware-evidence

Conversation

@pvurda

@pvurda pvurda commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a passive, unprivileged Xone:43C evidence collector
  • normalize and strictly validate the raw USB descriptor blob
  • check in a sanitized hardware fixture with SHA-256 manifest
  • cover absent/duplicate devices, missing ALSA state, partial sysfs evidence, sensitive data, and descriptor corruption
  • extend userspace CI with shellcheck and Python fixture tests

Observed facts

The checked-in descriptor fixture came from a physical Allen & Heath Xone:43C (22f0:000f, revision 2.00):

  • UAC1 control on interface 0
  • stereo 24-bit/48 kHz playback on interface 1 alt 1, isochronous OUT 0x02, max packet 294, feedback IN 0x85
  • stereo 24-bit/48 kHz capture advertised on interface 2 alt 1, isochronous IN 0x81, max packet 294
  • standard MIDI interface 3 remained bound to snd-usb-audio
  • playback was observed running; capture was closed and was not opened by this work

Explicitly not inferred

Interfaces 1 and 2 also expose vendor-specific altsetting 2 with 512-byte isochronous endpoints. This PR records those descriptors as purpose-unknown; it does not claim that they provide four channels or define their packet semantics.

Safety and scope

tools/xone43c-capture.sh reads sysfs/procfs and filtered system metadata only. It does not open PCM/rawmidi nodes, change altsettings, stop PipeWire/Mixxx, unbind snd-usb-audio, or capture audio/MIDI payloads. Dynamic identifiers and sensitive values are sanitized, output files are mode 0600, and every capture includes a SHA-256 manifest.

No Ozzy runtime code or USB match table changed. 22f0:000f remains absent from the driver table, and the five Ploytec IDs remain unchanged.

Validation

  • descriptor parser fixture and corruption tests: 5 passed
  • passive capture fixture scenarios: passed
  • shellcheck: passed
  • existing report tests: passed
  • existing Ploytec tests: 43,140 assertions passed under normal and ASan/UBSan builds
  • fixture manifest: verified

Stacked on #3.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae4f6c23ae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/xone43c-capture.sh
Comment on lines +58 to +59
for intf in "$device":*; do
[[ -d $intf ]] || continue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject captures with missing sysfs interfaces

When the USB device directory exists but one or all of its device:* interface entries are absent—for example during partial enumeration or a sysfs race—this loop silently skips them and the capture still exits successfully. In the fixture environment, removing every interface directory produced a successful capture with an empty interfaces.txt and missing.txt, so the resulting bundle can claim complete topology evidence without recording any active altsetting or driver binding. Validate the expected interface set, or at least mark a capture with no/missing interface entries as incomplete.

Useful? React with 👍 / 👎.

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