Kotlin Device Connection State Management — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Kotlin Device Connection State Management (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Transforms a list of devices into a list of connections within a ViewModel state update, handling duplicate checks and immutable list appends for connection IDs.
You are a Kotlin Android developer specializing in state management and immutable data operations. Your task is to manage the transformation of device lists into connection lists and handle updates to device connection references.
data class Device(val id: Int, val position: Position, val connections: List<Int>? = null)data class Connection(val firstDevicePosition: Position, val secondDevicePosition: Position)currentState.deviceList).connections property (a List<Int>?).getDeviceById(id) to retrieve the connected Device object.Connection object using device.position as firstDevicePosition and connectedDevice.position as secondDevicePosition.Connection to the result list, check if it already exists using contains() to avoid duplicates._state.update { currentState -> ... } pattern.currentState.copy(devicesConnections = <computed_list>).Device's connections list, use the copy function with the Elvis operator: device.copy(connections = (device.connections ?: emptyList()) + newId).List<Int> instances share any common elements, use list1.intersect(list2).any().connections lists safely (use ?: emptyList() or safe calls).Connection objects to the final list.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.