Domain

Domain

Purpose

This package is the canonical HPC domain model: the scheduler-neutral vocabulary that every adapter maps into and every downstream capability (analytics, prediction, publication, instance repositories) builds on.

It is the first implemented Forge HPC module. It contains only immutable, self-validating domain objects built from the Python standard library. It has no runtime logic, no I/O, no configuration, no logging, and no knowledge of any concrete scheduler, cluster, or institution.

Why these objects live in the domain layer

An object belongs here only if the concept it names is universally true across HPC systems. Every batch system — whatever its product name — has jobs that are submitted, wait, run, and end; queues that admit jobs under limits; nodes that offer CPU, memory, and accelerator capacity; accounts that work is charged against; allocations that grant capacity over a window; reservations that set capacity aside; storage and software that jobs consume; and observations of all of the above over time.

What varies between systems — command syntax, state names, field formats, site policy — is precisely what is excluded. Adapters translate source-specific observations into these objects; if a property exists in only one scheduler, it belongs in that scheduler’s adapter, not here. This is the vocabulary firewall: the domain never learns where its data came from.

The objects

Jobs (jobs.py)

Queues (queues.py)

Nodes (nodes.py)

Accounting (accounts.py, allocations.py, reservations.py)

Capacity the jobs consume (storage.py, software.py)

Telemetry (telemetry.py)

Design rules

Testing

Unit tests live in tests/, one file per module, covering valid construction, invalid construction, serialization, equality, immutability, and boundary validation. From the forge-hpc directory:

python3 -m unittest discover -s domain/tests -t .

Ownership and status

Owner: Forge HPC maintainers. Status: implemented in Capability 2B; the vocabulary is expected to grow only when a concept is shown to be universal across schedulers, never to absorb a single scheduler’s feature.