Skip to content

Commit 00b44e1

Browse files
beriberikixclaude
andcommitted
Update the documentation to match what the code does
The README told people there was no System Extension to install; now it says the subsystem was removed and why, and that userspace IOKit is the whole mechanism. Three documents went with it: - Documentation/development/system-extension-development.md described a build flow — `swift build --product SystemExtension`, `sudo usbipd daemon --install-extension` — for a product and a flag that no longer exist. The product name was wrong even before this change. - Documentation/troubleshooting/system-extension-troubleshooting.md troubleshot a subsystem that is gone. - Documentation/homebrew-troubleshooting.md was written throughout against a formula named usbipd-mac, which has never existed — the formula is usbip. Every command in it failed: brew install usbipd-mac, brew services start usbipd-mac, the log path, the launchd plist names, and an untap of a tap that is not the tap. It also omitted the brew trust step the README documents as mandatory. Deleting it is better than rewriting 632 lines of guesses; the true parts are already in the README. `sudo usbipd daemon --install-extension` is removed from architecture.md, build-troubleshooting.md and Emergency-Release-Procedures.md. That flag does not exist and never did. CLAUDE.md had three claims that were false. It described the subsystem as quarantined rather than removed; it said both test targets compile Tests/SharedUtilities/, which SwiftPM has never done because it ignores `sources:` paths outside the target directory — AssertionHelpers.swift references config.autoBindDevices, deleted long ago, and so cannot compile; and it reported 397 tests when there are 429. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017rmyikdjWveP99ZUCDLY89
1 parent 9d34547 commit 00b44e1

12 files changed

Lines changed: 76 additions & 1694 deletions

CHANGELOG.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,56 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Removed — the System Extension subsystem
11+
12+
Some 24,000 lines that no shipping path could reach, and a release artifact no
13+
installed component could locate.
14+
15+
Activation was never attempted: both `OSSystemExtensionManager.submitRequest` call
16+
sites were unreachable, gated on a configuration value nothing ever set. The whole of
17+
`Sources/SystemExtension/` was unreachable even from its own executable, its types
18+
shadowed by same-named stubs. `usbipd status` had 600 lines of reporting behind a guard
19+
that always took the early return.
20+
21+
None of it could have worked. `OSSystemExtensionRequest` resolves extensions inside the
22+
calling process's own bundle and requires that bundle to live in `/Applications`; a
23+
Homebrew-installed binary is neither. The claiming strategy underneath — setting
24+
`IOMatchCategory` and `IOProbeScore` from userspace — was measured not to unbind
25+
anything, and is not how a DriverKit extension matches in any case.
26+
27+
Nothing that worked has changed. Devices macOS has not bound a driver to are served
28+
exactly as before; devices whose interfaces it holds are refused by `bind`, which names
29+
the owner. Those decisions were always made by `DeviceOwnershipInspector` and by IOKit
30+
refusing `USBInterfaceOpen`, not by the extension.
31+
32+
**User-visible changes:**
33+
34+
- `USBIPDSystemExtension.systemextension.tar.gz` is no longer published. It was signed,
35+
notarized and stapled every release, and was not a System Extension bundle by
36+
structure — no `NSExtension` dict, no `IOKitPersonalities`, and an empty
37+
`embedded.provisionprofile`.
38+
- `systemextension_url` and `systemextension_sha256` are gone from the Homebrew
39+
metadata. Nothing consumed them.
40+
- `usbipd status` reports how devices are accessed and which are shared, and no longer
41+
claims to report on an extension. `--health` is still accepted and says plainly that
42+
there is nothing further to check.
43+
- `bind` and `unbind` no longer print "Checking System Extension status..." or branch
44+
their success message on whether a manager existed.
45+
- `~/Library/Application Support/usbipd-mac/cli-claimed-devices.json` is no longer read
46+
or written. It recorded claims that were never taken; any existing file is inert and
47+
can be deleted.
48+
- `usbipd.entitlements` is gone. The binary carried
49+
`com.apple.developer.system-extension.install`, a restricted entitlement AMFI kills
50+
without an authorising profile, so release signing had to withhold it — which it
51+
always did. With nothing to install, signing has one path.
52+
53+
`Sources/SystemExtension/Info.plist`, its entitlements and the README explaining the
54+
failure are preserved under `Documentation/development/system-extension-archive/`. They
55+
record the identifier and entitlement decisions a future DriverKit extension needs.
56+
57+
Also corrected: `CLAUDE.md` claimed `Tests/SharedUtilities/` was compiled by both test
58+
targets. SwiftPM ignores `sources:` paths outside the target directory, so it never was.
59+
1060
## [v0.6.0] - 2026-08-09
1161

1262
This release makes usbipd usable on a machine with a USB hub, which in practice means

CLAUDE.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,14 @@ Isochronous is not merely untested but structurally incomplete: alternate settin
9191
never selected and pipes are discovered once at open, so a UVC device's isochronous
9292
endpoints would never appear. See `Documentation/development/probe-rs-validation.md`.
9393

94-
The **SystemExtension** target is quarantined — roughly 20,000 lines that no shipping
95-
path uses. `OSSystemExtensionRequest` resolves extensions inside the calling app's
96-
bundle and requires that bundle to live in `/Applications`, so a Homebrew install
97-
never consults it. See `Sources/USBIPDCore/SystemExtension/README.md`.
94+
The **SystemExtension subsystem was removed in 0.7.0** — some 24,000 lines that no
95+
shipping path could reach. `OSSystemExtensionRequest` resolves extensions inside the
96+
calling process's own bundle and requires that bundle to live in `/Applications`, so a
97+
Homebrew install could never activate one; the claiming strategy underneath was measured
98+
not to unbind anything either. `DeviceClaimManager` survives as the seam a real
99+
implementation would slot into, satisfied by `UserspaceDeviceClaimManager`, which tracks
100+
intent and says so. See
101+
`Documentation/development/system-extension-archive/why-it-was-removed.md`.
98102

99103
## Architecture
100104

@@ -107,7 +111,6 @@ The project is structured as a multi-target Swift package:
107111
- `Protocol/`: USB/IP message encoding/decoding and request processing
108112
- **USBIPDCLI**: Command-line interface executable (`usbipd` binary)
109113
- **Common**: Shared utilities (logging, error handling)
110-
- **SystemExtension**: quarantined; no shipping path activates it (see above)
111114
- **QEMUTestServer**: QEMU validation test server
112115

113116
### Test Structure
@@ -117,7 +120,10 @@ The project is structured as a multi-target Swift package:
117120
- **Tests/USBIPDCoreTests/** — core protocol, device, and network tests
118121
- **Tests/USBIPDCLITests/** — CLI behaviour
119122

120-
Both also compile **Tests/SharedUtilities/** via their `sources:` list.
123+
Both list **Tests/SharedUtilities/** in their `sources:`, but SwiftPM silently ignores
124+
source paths outside the target directory, so it is **not compiled**. Proof beyond the
125+
build plan: `AssertionHelpers.swift` references `config.autoBindDevices`, which no
126+
longer exists. Do not add tests there expecting them to run.
121127

122128
Three further targets are declared but commented out as "temporarily disabled":
123129
`IntegrationTests`, `SystemExtensionTests`, `QEMUIntegrationTests`. Alongside them
@@ -251,7 +257,7 @@ The project uses a comprehensive SwiftLint configuration (`.swiftlint.yml`) with
251257

252258
## Testing Strategy
253259

254-
`swift test --parallel` is the whole suite — 397 tests across `USBIPDCoreTests` and
260+
`swift test --parallel` is the whole suite — 429 tests across `USBIPDCoreTests` and
255261
`USBIPDCLITests`. There is no development/CI/production tier system; the scripts that
256262
claimed to provide one filtered on target names that were never declared, matched
257263
nothing, and exited 0. See `Documentation/development/testing-strategy.md`.

Documentation/Emergency-Release-Procedures.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ For System Extension issues:
202202
sudo systemextensionsctl uninstall [team-id] [bundle-id]
203203

204204
# 2. Install previous version
205-
sudo usbipd daemon --install-extension --version v1.2.3
206205

207206
# 3. Verify rollback
208207
usbipd status

Documentation/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ The `development/` folder contains detailed documentation for contributors:
2020
- **[Unwired code sweep](development/unwired-code-sweep.md)** - finding mechanisms nothing calls, and what that found
2121
- **[Architecture](development/architecture.md)** - System design and component overview
2222
- **[CI/CD](development/ci-cd.md)** - Continuous integration and deployment workflows
23-
- **[System Extension Development](development/system-extension-development.md)** - macOS System Extension integration
2423
- **[Testing Strategy](development/testing-strategy.md)** - Testing approaches and environments
2524

2625
## API Reference
@@ -35,7 +34,6 @@ The `troubleshooting/` folder contains problem resolution guides:
3534

3635
- **[Build Troubleshooting](troubleshooting/build-troubleshooting.md)** - Common build and setup issues
3736
- **[QEMU Troubleshooting](troubleshooting/qemu-troubleshooting.md)** - QEMU testing issues
38-
- **[System Extension Troubleshooting](troubleshooting/system-extension-troubleshooting.md)** - System Extension development issues
3937

4038
## Navigation
4139

Documentation/deployment-checklist.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,6 @@ which jq curl shasum
414414

415415
After deployment, ensure these documents are updated:
416416
- [ ] **README.md**: Installation instructions point to tap repository
417-
- [ ] **Documentation/homebrew-troubleshooting.md**: Includes tap-specific troubleshooting
418417
- [ ] **CLAUDE.md**: Reflects new development workflows
419418
- [ ] **Release notes**: Document the architecture change for users
420419

Documentation/development/architecture.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ System Extensions are installed automatically when the USB/IP daemon starts:
8585

8686
```bash
8787
# Install and activate System Extension
88-
sudo usbipd daemon --install-extension
8988

9089
# Check System Extension status
9190
usbipd status
@@ -138,7 +137,6 @@ sudo systemextensionsctl developer on
138137

139138
# Build and install for development
140139
swift build
141-
sudo usbipd daemon --install-extension
142140

143141
# Verify installation
144142
usbipd status

0 commit comments

Comments
 (0)