Skip to content

Commit d6dc3e0

Browse files
committed
design principles: #3 -- identity varies with capability, deterministically
Proven in usbif's runtime function selection: hosts cache associations against identity, so a capability set that can vary at runtime must carry an identity that varies with it, the same way every time. Ratified by Brad 2026-08-31.
1 parent 097a934 commit d6dc3e0

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

docs/design-principles.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,25 @@ design document, not assumed. Every platform claim carries its proof
4848
tier — bench-proven, CI-proven, or community-verified — as defined in
4949
[`platform-support-tiers.md`](platform-support-tiers.md).
5050

51+
## 3. Identity varies with capability, deterministically
52+
53+
When software can change what a device *is* at runtime — the USB
54+
interface set a host enumerates, the BLE profile set a peer discovers —
55+
the device's advertised identity must change with it. Hosts cache
56+
associations (drivers, pairings, settings) against identity: two
57+
different capability sets sharing one identity poison that cache, and
58+
the failure lands on someone else's machine, later, unattributably.
59+
60+
And the variation must be **deterministic** — the same capability set
61+
always yields the same identity — so a host's cached association stays
62+
correct across reboots and re-enumerations. Fifteen configurations,
63+
fifteen identities, the same fifteen every time.
64+
65+
Proven in usbif's runtime function selection (2026-08-31), where
66+
TinyUSB's own source warns of exactly this; the obligation is inherited
67+
by every PyDevices surface that lets Python vary a device's capability
68+
set.
69+
5170
---
5271

5372
*New principles are added here when they've been proven in a shipped

0 commit comments

Comments
 (0)