Skip to content

kube-accelerator-sim v1 product specification ​

Status: Normative draft for implementation

This document is the implementation and acceptance contract for the first release of kube-accelerator-sim. The accepted architecture decision records remain the source of rationale. If this specification and an accepted ADR conflict, the ADR wins until both documents are reconciled.

The key words MUST, MUST NOT, REQUIRED, SHOULD, SHOULD NOT, and MAY are to be interpreted as normative requirements. Requirement IDs are stable references for implementation tickets, tests, and release evidence.

1. Product boundary ​

1.1 Purpose ​

kube-accelerator-sim simulates Kubernetes-visible accelerator resources in an existing Kubernetes cluster so platform teams can develop and test scheduling, inventory, admission, and integration behavior without physical accelerators.

  • SCOPE-001: The product MUST represent single-node single-accelerator, single-node multi-accelerator, multi-node multi-accelerator, heterogeneous node, partial-health, capacity-change, and node-scale scenarios.
  • SCOPE-002: The product MUST support the scheduling Fidelity Mode on every supported Kubernetes minor.
  • SCOPE-003: The product MUST support the dra-control-plane Fidelity Mode only where the stable resource.k8s.io/v1 API is available and validated.
  • SCOPE-004: The product MUST NOT claim CUDA, ROCm, CANN, driver, firmware, device-file, topology, physical telemetry, kernel, collective communication, or accelerator-compute fidelity. Source-backed Prometheus schemas with explicitly simulated values are permitted by ADR 0008.
  • SCOPE-005: Public behavior MUST be expressed in terms of Fidelity Modes, Scenario Instances, Vendor Profiles, Resource Contracts, and receipts. KWOK is an internal implementation detail.

1.2 Cluster lifecycle boundary ​

  • SCOPE-006: The kasim CLI MUST operate only on an explicitly selected, already-existing Kubernetes cluster.
  • SCOPE-007: The CLI MUST NOT create, upgrade, stop, or delete a Kubernetes cluster.
  • SCOPE-008: The end-to-end test harness MAY create and destroy ephemeral kind clusters for product validation. This behavior MUST remain test infrastructure and MUST NOT become a product command.
  • SCOPE-009: Installing or upgrading the in-cluster runtime is a separate Helm workflow. kasim apply MUST NOT invoke Helm or implicitly install cluster-wide resources.

1.3 First-release exclusions ​

The first release has no:

  • bulk or wildcard deletion;
  • force deletion or workload eviction;
  • arbitrary Node patch or arbitrary Kubernetes manifest input;
  • remote Scenario URL or directory input;
  • timed-event or workflow language;
  • public backend selector or backend plugin registry;
  • network Vendor Profile registry;
  • public Go SDK;
  • cluster lifecycle command.

2. Release artifacts and implementation baseline ​

  • REL-001: The implementation MUST use one Go module and the current supported Go 1.26 patch line.
  • REL-002: The Kubernetes dependencies MUST stay on one compatible minor line. The initial line is Kubernetes/client-go v0.36.x with controller-runtime v0.24.x.
  • REL-003: The release MUST contain the kasim CLI and kasim-controller binaries. When Simulated Vendor Telemetry is enabled, the runtime image MUST also contain the internal kasim-telemetry binary.
  • REL-004: The release MUST publish checksummed CLI archives for Linux and macOS on amd64 and arm64 and Windows on amd64.
  • REL-005: The release MUST publish a Linux amd64/arm64 controller image, an OCI Helm chart, a packaged chart archive, SBOMs, source revision, dependency lock, and build provenance.
  • REL-006: Product releases MUST use Semantic Versioning. CLI behavior, Scenario transport, product Kubernetes transport, machine output, catalog, compatibility matrix, controller image, and chart versions MUST be explicit in release receipts.
  • REL-007: Released KWOK assets MUST be pinned to an immutable upstream version and content digest. Floating URLs, branches, and tags are forbidden in release inputs.

3. Domain model ​

3.1 Fidelity Mode ​

The supported product values are:

ValueRequired behavior
schedulingSource-backed Node identity plus scalar capacity and allocatable projection
dra-control-planeStable DRA API objects and deterministic simulated device inventory
  • DOM-001: One Scenario Instance MUST use exactly one Fidelity Mode.
  • DOM-002: Every selected Resource Contract MUST support the requested mode. There is no per-group fallback.
  • DOM-003: Status MUST report every relevant surface as achieved, excluded, unavailable, or out-of-scope.

Node-runtime protocol fidelity is not a product Fidelity Mode. It is separate test-harness evidence defined in section 7.3.

3.2 Vendor Profile ​

A Vendor Profile is an immutable, source-backed description of one accelerator ecosystem. It is data, not executable adapter code.

  • DOM-004: A profile key MUST be (id, revision, digest).
  • DOM-005: A profile MUST declare its class: verified, provisional, or custom.
  • DOM-006: A profile MUST contain evidence source URLs, immutable source revisions where available, checked dates, evidence grades, supported Fidelity Modes, exact Resource Contracts, identity signals, models, and limitations.
  • DOM-007: Bundled profile revisions MUST be immutable. Editing a record requires a new revision and digest.
  • DOM-008: Provisional profiles MUST be rejected unless the Scenario explicitly accepts provisional profiles.
  • DOM-009: Custom profiles MUST pass the same schema, evidence, collision, and digest validation path as bundled records and MUST be pinned by digest.

3.3 Resource Contract ​

A Resource Contract records the exact Kubernetes-visible behavior of a maintained upstream device plugin or DRA driver.

  • DOM-010: Extended-resource names, label keys, taints, annotations, DRA driver names, attributes, and API variants MUST preserve exact spelling and case from evidence.
  • DOM-011: The catalog MUST NOT invent or normalize vendor resource names.
  • DOM-012: A resource alias such as gpu is portable Scenario syntax only. It MUST resolve to one unambiguous, source-backed contract before a cluster write.
  • DOM-013: Provider-specific resource names MUST declare their provider scope and MUST NOT be represented as universal device-plugin behavior.
  • DOM-014: Evidence availability MUST be represented as an explicit state; missing public evidence MUST NOT be represented as false certainty.

3.4 Accelerator Model ​

  • DOM-015: A model has a stable catalog ID, display name, aliases, vendor, lifecycle state, evidence, and compatible Resource Contracts.
  • DOM-016: Model selection MUST affect identity and catalog validation but MUST NOT imply compute behavior.
  • DOM-017: A model alias MUST resolve deterministically to one catalog ID.
  • DOM-018: Models without enough public evidence MAY remain catalog-only and MUST NOT be selectable by apply.

4. Bundled catalog ​

4.1 Required ecosystem coverage ​

  • CAT-001: The initial bundled catalog MUST include verified profiles for NVIDIA, AMD Instinct, Intel Data Center GPU, Intel Gaudi, Huawei Ascend, Cambricon, Biren, Iluvatar CoreX, Enflame, Moore Threads, FuriosaAI, Graphcore, AWS Neuron, Google Cloud TPU, MetaX, and Hygon DCU.
  • CAT-002: The initial catalog MUST include provisional records, when the integration contract can be represented honestly, for Kunlunxin through HAMi and Vastai through HAMi. Their profile IDs MUST identify the integration and MUST NOT imply a verified vendor-default contract.
  • CAT-003: Qualcomm Cloud AI 100 MUST remain catalog-only until an exact, public, fully-qualified schedulable resource contract is evidenced.
  • CAT-004: Profile class MUST reflect evidence quality rather than market popularity or vendor preference.

4.2 Required model seeds ​

The initial catalog MUST include, at minimum, evidence-backed records for the following commonly encountered model families. Retention models MAY be marked legacy rather than recommended.

EcosystemRequired model records
NVIDIAA100 40GB/80GB, H100, H200, L40S, B200, B300; A800, H800, H20 retention
AMD InstinctMI210, MI250X, MI300A, MI300X, MI325X, MI350X, MI355X
Intel Data Center GPUFlex 140, Flex 170, Flex 170V, Max 1100, Max 1550
Intel GaudiGaudi2, Gaudi3
Huawei AscendAscend 310, 310P, 910; source-backed Atlas A2/A3 aliases
CambriconMLU370, MLU590; MLU270 and MLU290 retention
BirenBR100 family
Iluvatar CoreXBI-V150 and BI-V150S
EnflameS60 and S60G
Moore ThreadsMTT S3000; source-backed S80, S2000, and S4000 examples
FuriosaAIRNGD
GraphcoreGC200 and C600; M2000/IPU-POD retention
AWS NeuronInferentia 1/2 and Trainium 1/2/3
Google Cloud TPUTPU v4, v5e, v5p, v6e, TPU7x
MetaXC500, C500-P, C500X, C280, C290, C550, C600, N260
Hygon DCUK100_AI, BW100, BW200, BW1000, Z100L, and BW1100
KunlunxinP800 and R480
  • CAT-005: Vastai MUST NOT receive a built-in selectable model seed until adequate public model and resource-contract evidence is recorded.
  • CAT-006: The catalog build MUST validate unique IDs and aliases, exact resource-name syntax, immutable revisions, evidence fields, model-contract compatibility, and stable whole-catalog digests.
  • CAT-007: Golden tests MUST make every catalog revision and digest change reviewable.

5. Canonical Scenario ​

5.1 Shape ​

Every file and shortcut MUST compile to this logical shape:

yaml
metadata:
  name: mixed-training-lab
spec:
  fidelity: scheduling
  acceptance:
    provisionalProfiles: false
  nodeGroups:
    - name: nvidia-workers
      replicas: 4
      node:
        capacity:
          cpu: "64"
          memory: 256Gi
          pods: "110"
        placement:
          zone: lab-a
        labels: {}
        taints: []
      acceleratorPools:
        - name: training
          profile:
            id: nvidia
            revision: 2026-07-29
            digest: sha256:...
          model: nvidia-h100
          contract: device-plugin
          resource: gpu
          variant: {}
          count: 8
          healthy: 8
  • SCN-001: A Scenario MUST contain no kubeconfig, context, target fingerprint, implementation backend, KWOK field, raw Kubernetes object, generated device ID, or workflow step.
  • SCN-002: A Node Group MUST be homogeneous. Replica indices MUST be stable and scale-down MUST select the highest indices first.
  • SCN-003: An Accelerator Pool MUST be homogeneous on every replica of its Node Group.
  • SCN-004: Group and pool names MUST be unique within their parent scope and MUST produce deterministic object identities.
  • SCN-005: replicas, count, and healthy MAY be zero. healthy MUST be an integer in the inclusive range zero through count.
  • SCN-006: All profile, revision, digest, model, contract, resource, and variant references MUST resolve before any cluster write.
  • SCN-007: Unknown fields, duplicate YAML keys, multiple documents, invalid or non-canonical quantities, reserved labels, conflicting taints, ambiguous resources, and unsupported capabilities MUST fail compilation.
  • SCN-008: Canonicalization and digest calculation MUST be deterministic for a fixed input and catalog digest.

5.2 Compiler and revisions ​

  • SCN-009: File input, stdin input, and the homogeneous shortcut MUST use the same parser, resolver, validator, canonicalizer, digest, and ScenarioRuntime.Apply path.
  • SCN-010: health and scale MUST fetch the current canonical Scenario, apply exactly one typed field change, compile a new canonical Scenario, and submit a revision. They MUST NOT patch Nodes directly.
  • SCN-011: The compiler MUST be pure and deterministic and MUST not read a Kubernetes cluster.
  • SCN-012: Two models that resolve to the same scalar resource name on the same Node in scheduling mode MUST be rejected.
  • SCN-013: Conflicting values for a vendor identity signal or DRA attribute on one Node MUST be rejected.

6. Scenario Instance lifecycle ​

6.1 Identity and revisions ​

  • LIFE-001: Applying a Scenario creates or updates one cluster-scoped, target-scoped Scenario Instance.
  • LIFE-002: Instance name, server-assigned UID, target fingerprint, creation identity, and Fidelity Mode MUST be immutable.
  • LIFE-003: Every accepted change MUST create an immutable logical Scenario Revision recording the canonical digest, resolved profile revisions and digests, desired generation, and owned-object inventory.
  • LIFE-004: Reapplying the same canonical digest MUST be an idempotent no-op.
  • LIFE-005: Creating a missing instance MUST require expected generation zero. Changing an existing digest MUST require the exact instance UID and current expected generation.
  • LIFE-006: UID, generation, resource version, target, fidelity, and ownership preconditions MUST be enforced atomically by the in-cluster transport, not only by a client read.
  • LIFE-007: The durable Kubernetes representation MAY evolve, but it MUST preserve the public logical instance, immutable revision, precondition, and receipt contract.

6.2 Reconciliation order ​

After revision acceptance, convergence is asynchronous and idempotent:

  1. persist the accepted revision and exact ownership root;
  2. establish exact-owned runtime prerequisites that expose no scheduling surface, including a Node Lease when the runtime independently renews it;
  3. create new Synthetic Nodes with scheduling closed, activating the runtime only after every prerequisite is observed;
  4. reconcile identity, base resources, accelerator projection, Ready state, and heartbeat state;
  5. open scheduling only after every required surface is observed;
  6. apply in-place health and capacity revisions without touching bound Pods;
  7. close scheduling before replacement, scale-down, or deletion;
  8. remove only allowlisted objects proven to belong to the exact instance UID.

The pinned KWOK runtime independently creates a missing same-name Node Lease. The controller therefore creates and observes its exact-owned Lease before it creates the active closed Node. This prerequisite ordering prevents adoption of a Lease that KWOK or another actor created first; it does not expose a schedulable Node.

  • LIFE-008: A retry of the same accepted revision MUST resume convergence without changing node or device identities.
  • LIFE-009: A crash or transport error MAY leave partial convergence, but applied, pending, failed, and stale inventory MUST remain recoverable.
  • LIFE-010: Reconciliation MUST use shared caches and bounded queues and MUST NOT create a permanent goroutine, informer, or watch per Node, device, pool, or instance.

6.3 Ownership and cleanup ​

  • SAFE-001: Every owned object MUST carry the instance UID, the last accepted desired generation that materially wrote the object, managed-by identity, and strongest legal owner reference. The object generation MAY lag the instance during an in-place revision that does not change that object, but it MUST NOT exceed the instance desired generation.
  • SAFE-001A: A Node status mutation MUST atomically publish that Node's matching desired-generation fence with the status update. A retry from an older generation MUST stop rather than overwrite status accepted by a newer generation.
  • SAFE-002: Object discovery and cleanup MUST use an exact UID plus an allowlist of object kinds. Name prefixes, a generic KWOK label, or a broad selector are insufficient.
  • SAFE-003: An object with the desired name but a different or missing ownership UID MUST produce OwnershipConflict; it MUST NOT be adopted.
  • SAFE-004: The product MUST never patch, label, taint, change status on, cordon, or delete a pre-existing real Node.
  • SAFE-005: Delete and scale-down MUST close scheduling before removing an owned Synthetic Node.
  • SAFE-006: The product MUST never delete or evict an unowned Pod. If one remains bound, cleanup MUST pause with CleanupBlocked and bounded blocker references.
  • SAFE-007: Successful deletion MUST prove that no allowlisted Node, Lease, DRA inventory, or helper object owned by the exact instance UID remains.
  • SAFE-008: Deleting an instance MUST NOT uninstall or change the shared product runtime.

6.4 Status ​

  • STAT-001: A bounded Snapshot MUST include instance UID, target fingerprint, desired and observed generations, revision digest, resolved profile receipts, Fidelity Mode surface results, group and pool counts, owned-object counts, capped diagnostics, typed conditions, and transition times.
  • STAT-002: Phase MUST be one of Pending, Reconciling, Ready, Failed, or Deleting.
  • STAT-003: Conditions MUST represent Progressing, Retrying, Overcommitted, OwnershipConflict, CleanupBlocked, and FidelitySatisfied where applicable.
  • STAT-004: Ready means observed generation equals desired generation and every required fidelity assertion passed. A requested healthy < count state MAY be Ready.
  • STAT-005: A post-acceptance failure MUST retain the instance, accepted receipt, latest Snapshot, and inventory for retry or safe deletion.

7. Resource projection ​

7.1 Extended resources ​

  • SCHED-001: In scheduling mode, each pool MUST render only source-backed identity labels, the product compatibility accelerator-model label, and scalar extended-resource quantities.
  • SCHED-002: Resource capacity MUST equal count; allocatable MUST equal healthy.
  • SCHED-003: A health-only change MUST NOT alter capacity, evict a Pod, or reassign a bound Pod.
  • SCHED-004: A capacity reduction MAY make a Node overcommitted. Existing Pods MUST remain untouched; only new scheduling is affected and status MUST report Overcommitted.
  • SCHED-005: Resource projection MUST be assessed from observed Kubernetes state before FidelitySatisfied is reported.
  • SCHED-006: Every Synthetic Node MUST carry feature.node.cloud.xiaoshiai.cn/accelerator-model.name with its stable catalog model ID. A Node Group with more than one distinct accelerator model MUST fail closed because that label is singular.

7.2 DRA ​

  • DRA-001: dra-control-plane MUST use only stable resource.k8s.io/v1 APIs.
  • DRA-002: DRA MUST be unavailable on Kubernetes older than 1.34 and MUST fail preflight before revision acceptance.
  • DRA-003: Simulated device identities MUST derive deterministically from instance UID, group, replica, pool, and device index.
  • DRA-004: Simulated identities MUST be stable across retry and MUST NOT be presented as vendor hardware IDs.
  • DRA-005: DRA attributes and driver names MUST be source-backed or clearly simulator-owned; conflicts MUST fail closed.
  • DRA-006: DRA contract tests MUST cover rendering, observation, assessment, retry identity stability, and Kubernetes-minor gating.

7.3 Node-runtime protocol oracle ​

  • PROTO-001: The end-to-end harness MUST exercise kubelet Device Plugin registration and allocation against an ephemeral test node/runtime as a protocol oracle.
  • PROTO-002: Protocol-oracle evidence MUST be reported separately from normal scheduling and dra-control-plane product support.
  • PROTO-003: Protocol tests MUST NOT require physical accelerator hardware or a vendor driver.

8. CLI contract ​

8.1 Commands ​

The first kasim surface is:

text
kasim apply
kasim status
kasim health
kasim scale
kasim delete
kasim profile list
kasim profile show
kasim version
  • CLI-001: profile list, profile show, version, and apply --dry-run=client MUST work without a cluster.
  • CLI-002: apply MUST accept exactly one of one local file, stdin with exactly one Scenario, or one homogeneous demo shortcut.
  • CLI-003: The shortcut MUST support --profile, --model, --nodes, --accelerators-per-node, optional --healthy-per-node, and an explicit or unambiguous contract/resource choice.
  • CLI-004: Heterogeneous and multi-pool configurations MUST use a Scenario document.

8.2 Target selection ​

  • TARGET-001: Every lifecycle or mutation command that contacts Kubernetes MUST require both --kubeconfig /explicit/path and --context exact-name.
  • TARGET-002: The read-only kasim ui command MUST use standard client-go/kubectl kubeconfig loading rules and current-context when target flags are absent, while allowing either flag to override its corresponding default. No other connected command may substitute these defaults.
  • TARGET-003: The kubeconfig path MUST resolve to a canonical absolute path when explicitly supplied, and every resolved client configuration MUST remain immutable for the process.
  • TARGET-004: The target fingerprint MUST be the SHA-256 digest of the kube-system Namespace UID with a versioned domain separator.
  • TARGET-005: The connection receipt MUST separately report the canonical API server URL and cluster CA digest.

8.3 Preflight and dry-run ​

Apply preflight MUST run in this order:

  1. offline parse, validation, profile resolution, canonicalization, and digest;
  2. explicit target loading and authenticated TLS;
  3. API, runtime, version, and target fingerprint discovery;
  4. SelfSubjectAccessReviews for exact required operations;
  5. instance, UID, generation, fidelity, ownership, and name-conflict reads;
  6. Kubernetes admission with dryRun=All for supported mutations;
  7. proposed receipt emission, followed by persistent submission only for normal apply.
  • PREFLIGHT-001: Any preflight rejection MUST make zero persistent writes.
  • PREFLIGHT-002: --dry-run=client MUST stop after offline compilation.
  • PREFLIGHT-003: --dry-run=server MUST perform every read-only and non-persisted check and MUST never accept a revision.
  • PREFLIGHT-004: Server dry-run output MUST state that apply repeats conflict checks because dry-run does not reserve cluster state.
  • PREFLIGHT-005: Missing or incompatible runtime MUST produce RuntimeUnavailable before a persistent write.
  • PREFLIGHT-006: Authorization checks MUST use exact resource, verb, subresource, namespace, and name requirements rather than one broad permission probe.

8.4 Waiting and receipts ​

  • CLI-005: apply, health, scale, and delete MUST wait for their requested terminal condition by default and accept a configurable timeout.
  • CLI-006: --async MUST return after revision acceptance.
  • CLI-007: A timeout MUST return the accepted receipt and latest Snapshot and MUST NOT claim rollback.
  • CLI-008: status --watch MUST resume from a bounded cursor and tolerate normal watch closure or reconnect.
  • CLI-009: Every target-connected receipt MUST include context, target fingerprint, instance name and UID, desired and observed generations, revision digest, and resolved profile digests.

8.5 Output and exit categories ​

  • OUT-001: Human output is the terminal default. Every command MUST support -o json and -o yaml.
  • OUT-002: Machine output MUST use a versioned envelope and preserve diagnostic code, retryability, revision-accepted state, fidelity surfaces, bounded blockers, receipts, and Snapshot on success and failure.
  • OUT-003: Output MUST never expose credentials, bearer tokens, client keys, kubeconfig contents, or raw secret values.
  • OUT-004: Stable exit categories are:
CodeMeaning
0dry-run succeeded, apply was a no-op, or terminal condition reached
2invocation, schema, catalog, or Scenario validation failed
3target, authentication, authorization, capability, or runtime preflight rejected before acceptance
4UID, generation, fingerprint, fidelity, or ownership precondition conflict before acceptance
5revision accepted but convergence failed, timed out, or remained blocked
  • OUT-005: Stable machine diagnostic codes MUST be more specific than exit categories and MUST be tested as an automation contract.

8.6 Delete command ​

  • CLI-010: Delete MUST require exact instance name, UID, expected generation, kubeconfig, and context.
  • CLI-011: Delete MUST NOT accept a prefix, selector, wildcard, --all, or --force.
  • CLI-012: Retrying the same deletion MUST be idempotent.

8.7 Simulated Vendor Telemetry ​

  • TEL-001: Native Prometheus families MUST come from an immutable, independently versioned Telemetry Catalog. Each profile MUST be classified verified, provisional, or unavailable; missing evidence MUST NOT be replaced by a derived or guessed vendor name.
  • TEL-002: An enabled family MUST preserve its source-backed name, Prometheus type, native label-key set, known unit, and exact HELP unless a documented compatibility value convention requires compatibility HELP. Every per-device sample MUST expose stable node, device, model, uuid, and vendor identity labels while preserving an exporter-native value when the same label name already exists, and MUST NOT add any kasim_* label. A catalog-bound model label MUST equal the Synthetic Node's accelerator-model label. One device's UUID and index labels MUST remain stable across all of its metric families and telemetry-process restarts. Kasim provenance MUST be exposed through separate kasim_telemetry_* diagnostic families and the scrape target.
  • TEL-003: Dynamic values MUST be stable within a 15-second sampling bucket and reproducible across repeated scrapes and restarts. Utilization, memory, power, temperature, clocks, and traffic MUST share correlated state; utilization MUST be in [0,100], health values MUST retain the source exporter's convention, error signals MUST use zero for healthy and non-zero for faulty, and memory bounds and monotonic-counter invariants MUST fail closed.
  • TEL-004: Telemetry MUST be generated only for exactly owned Synthetic Nodes joined to their Scenario Instance UID and desired generation. It MUST NOT read physical sensors, drivers, device files, Secrets, logs, or container environments, or generate simulated native telemetry for a real Node.
  • TEL-005: A Prometheus scrape MUST perform no Kubernetes I/O. Source failures MUST retain only a bounded immutable last-success buffer, remove native series after the stale interval, fail readiness, and expose explicit low-cardinality Kasim diagnostics.
  • TEL-006: The Helm runtime MUST isolate telemetry in one read-only, single-replica process and ClusterIP Service. It MUST NOT create a Pod, Service, goroutine, NodePort, LoadBalancer, or Ingress per Synthetic Node or device; ServiceMonitor integration MUST remain optional and fail closed when its API is absent. The maintained ServiceMonitor MUST retain the target labels namespace and pod for target-metadata joins and MUST drop container after scraping. Those retained labels identify the centralized telemetry Pod, not the Synthetic Node or a workload that owns the simulated device; device ownership MUST continue to use node and exporter-native Node identity labels.
  • TEL-007: Simulated Vendor Telemetry MUST NOT change Scenario input, Scenario Revision identity, scheduling Vendor Profile digests, either Fidelity Mode, Scenario Instance readiness, or reconciliation success.
  • TEL-008: The maintained renderer MUST support 1,000 Synthetic Nodes and 8,000 simulated devices with bounded series and response size and no hidden per-node or per-device runtime state machine.

9. Runtime packaging and security ​

  • PACK-001: charts/kasim-runtime MUST install product CRDs, controller, service accounts, explicit RBAC personas, hard real-Node placement constraints, and pinned minimal KWOK assets into an existing cluster.
  • PACK-002: The controller MUST be schedulable only onto real Nodes by hard placement rules; tolerations alone are insufficient.
  • PACK-003: The chart MUST refuse an incompatible existing product or KWOK ownership root and MUST NOT silently adopt it.
  • PACK-004: Installation and uninstallation MUST be ownership-bounded and MUST NOT affect unrelated KWOK or user resources.
  • RBAC-001: Runtime permissions MUST be generated from the exact supported object and subresource operations and validated against a deny-by-default persona.
  • RBAC-002: CLI documentation MUST provide separate read-only observer and lifecycle operator permission requirements.
  • RBAC-003: E2E tests MUST prove that missing permissions reject preflight without persistent writes.
  • RBAC-004: Controller and chart defaults MUST use a non-root, read-only-root-filesystem security context and MUST not require privileged containers for scheduling or dra-control-plane.

10. Module and seam requirements ​

  • ARCH-001: The local deep lifecycle Interface MUST be ScenarioRuntime.Apply, ScenarioRuntime.Observe, and ScenarioRuntime.Delete.
  • ARCH-002: The in-cluster deep lifecycle entry point MUST be one InstanceReconciler.Reconcile method, including deletion and finalization.
  • ARCH-003: The only initial behavioral seams are Scenario Control Plane, Kubernetes Cluster, and Resource Projection.
  • ARCH-004: Vendor Profiles, input formats, output formats, KWOK, kind, health revisions, and scale revisions MUST remain data variants or concrete implementations, not plugin Interfaces.
  • ARCH-005: Domain packages MUST NOT import CLI, YAML, Helm, controller-runtime, client-go, KWOK, kind, or vendor-specific packages.
  • ARCH-006: Generated Kubernetes transport types MUST be translated at an adapter edge and MUST NOT be used as domain types.
  • ARCH-007: Generic utils, common, backend, providers, and vendor-per-package dumping grounds are forbidden.
  • ARCH-008: A new seam requires two maintained production adapters, a stable contract, a validation matrix, and evidence that it localizes real change.

The expected initial layout is:

text
api/simulation/v1alpha1/
cmd/kasim/
cmd/kasim-controller/
internal/domain/
internal/scenario/
internal/catalog/
internal/application/
internal/controlplane/
internal/reconcile/
internal/projection/extended/
internal/projection/dra/
internal/cluster/
internal/runtime/kwok/
internal/presentation/
profiles/
charts/kasim-runtime/
test/e2e/

11. Kubernetes compatibility ​

11.1 Supported range ​

  • COMPAT-001: The release-frozen supported range MUST begin at Kubernetes 1.30 and extend through the highest minor that passed the release matrix.
  • COMPAT-002: The initial exact patch baselines are 1.30.14, 1.31.14, 1.32.13, 1.33.13, 1.34.10, 1.35.7, and 1.36.3.
  • COMPAT-003: scheduling MUST be tested across the entire frozen range.
  • COMPAT-004: dra-control-plane MUST be tested only on 1.34 and newer.
  • COMPAT-005: A release MUST report a checked-at date, exact Kubernetes patches, client-go/controller-runtime/KWOK/kind pins, supported modes, and known exclusions.
  • COMPAT-006: “Kubernetes 1.30+” MUST NOT mean an unbounded future promise. Minors above the release-frozen ceiling are unsupported until validated.

11.2 Validation cadence ​

  • COMPAT-007: Every pull request MUST run unit tests, static checks, schema/catalog validation, Helm rendering/lint, generated-file checks, and kind E2E on the floor, oldest upstream-active minor, and frozen ceiling.
  • COMPAT-008: Nightly validation MUST run every frozen minor.
  • COMPAT-009: Release validation MUST run the full frozen matrix, RBAC and safety suites, protocol oracle, recovery tests, and scale gate.
  • COMPAT-010: Adding a Kubernetes minor requires evidence collection, dependency review, kind image availability, scheduling and DRA results, compatibility receipt update, and release-policy approval.

12. Required tests and evidence ​

  • TEST-001: Scenario Compiler tests MUST cover document, stdin-equivalent, shortcut, strict decoding, canonicalization, digest stability, collision detection, provisional acceptance, and typed health/scale revision outcomes.
  • TEST-002: Profile Catalog tests MUST cover schema, immutable records, resolution, evidence receipts, exact resource names, aliases, and digests.
  • TEST-003: Scenario Runtime tests MUST use an in-memory Scenario Control Plane adapter and cover preflight order, zero-write rejection, no-op, conflict, acceptance, timeout, watch resume, and delete behavior.
  • TEST-004: Instance Reconciler tests MUST use a recording Kubernetes Cluster adapter and cover ordering, ownership, retry, recovery, overcommitment, blocker handling, bounded status, and cleanup.
  • TEST-005: One projection contract suite MUST run against extended resources and DRA.
  • TEST-006: Presentation golden tests MUST cover human, JSON, and YAML, stable diagnostic codes, exit categories, receipts on failure, and secret redaction.
  • TEST-007: Real kind E2E tests MUST exercise production adapters, admission, authorization, scheduler behavior, KWOK lifecycle, controller restart recovery, mixed real/synthetic Node safety, and cleanup.
  • TEST-008: Client-go fake clients MUST NOT be accepted as evidence for scheduler, admission, authorization, Server-Side Apply, status subresource, or cleanup behavior.
  • TEST-009: Every release claim MUST link to machine-readable evidence that records exact inputs, source revision, environment, duration, and result.

13. Reference scale and performance gate ​

The release reference topology is:

  • 1,000 Synthetic Nodes;

  • 8 simulated accelerators per Node;

  • 8,000 total accelerator units;

  • one verified profile and one scalar Resource Contract;

  • 100 representative Pods for scheduler evidence.

  • PERF-001: Full apply to Ready MUST complete within 180 seconds.

  • PERF-002: Warm status observation p95 MUST be at most 2 seconds.

  • PERF-003: A full-pool health revision MUST converge within 15 seconds.

  • PERF-004: The 100-Pod scheduling workload MUST settle within 60 seconds.

  • PERF-005: Controller restart and recovery to Ready MUST complete within 120 seconds without identity drift.

  • PERF-006: Full deletion and ownership proof MUST complete within 120 seconds.

  • PERF-007: Steady controller memory MUST remain at or below 2 GiB.

  • PERF-008: A release candidate MUST pass every threshold on two consecutive runs with zero reconciliation errors, ownership leaks, or observed-count reductions.

  • PERF-009: The scale harness MUST capture exact Kubernetes, kind, KWOK, image, chart, catalog, host, and source revisions and retain its receipts.

14. Definition of done ​

The first release is complete only when:

  1. every normative requirement is implemented or explicitly deferred by a new accepted ADR;
  2. every stable public surface has tests and versioned examples;
  3. every bundled profile has reviewable evidence and passes catalog validation;
  4. the floor-to-ceiling Kubernetes matrix passes;
  5. mixed-cluster ownership and unowned-Pod safety tests pass;
  6. DRA passes on every advertised DRA minor and fails closed below 1.34;
  7. the protocol oracle passes without physical hardware;
  8. both consecutive reference-scale runs pass;
  9. release artifacts, SBOMs, provenance, checksums, chart, image, and compatibility receipt are reproducible from the tagged source;
  10. documentation clearly distinguishes simulated Kubernetes surfaces from excluded hardware and runtime behavior.

15. Traceability ​

Requirement areaGoverning decision
Scope and Fidelity ModesADR 0001
Catalog, profiles, contracts, and modelsADR 0002
Scenario, revisions, status, and cleanupADR 0003
Reference scaleADR 0004
CLI, target, receipts, and safetyADR 0005
Kubernetes support and validationADR 0006
Modules, seams, source layout, and release artifactsADR 0007
Simulated Vendor TelemetryADR 0008

Control-plane simulation only. No physical accelerator compute.