You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(BA-7315): carry the kernel resource spec as domain types
`KernelResourceSpecData` described itself entirely in built-ins, so nothing in the
payload said what a key or a mount actually was.
- Type the fields as what they hold: `list[ResourceSlotEntry]` for slots,
`dict[DeviceName, dict[ResourceSlotName, dict[DeviceId, str]]]` for allocations,
and `list[MountData]` for mounts, which keeps a mount structured instead of
flattening it to its `str()` form. `KernelCreationInfo` follows with `KernelId`,
`ContainerId`, `DeviceId` and `DeviceName`.
- `MountData` mirrors the agent's `Mount` and declares no defaults, so a producer
states every field rather than inheriting one.
- Omit a slot holding no device allocation from `to_resource_slot()` instead of
recording it as zero. This restores what the manager helper it replaced did — a
slot absent and a slot present at zero are not the same occupancy.
- Drop `KernelResourceSpec.to_json_serializable_dict()` / `to_json()`, whose only
caller was a log line, and `AgentRegistry.convert_resource_spec_to_resource_slot()`,
which had no caller at all. Slot aggregation now has one implementation rather
than three.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments