Skip to content

Control plane, CRDs, operator and UI ​

← Index · ← Previous · Next →


56. CRD Inventory ​

Recommended first-class CRDs:

CRDResponsibility
AgentServicestable agent service identity
AgentConfigeditable agent behavior
AgentRevisionimmutable resolved agent definition
AgentEnvironmentruntime/environment requirements
ToolProviderwhere tools come from
ToolUniversereusable sets of effective tools
SecurityProfilereusable execution security
AgentRouteoptional routing/exposure

AgentRun and AgentLease are application records, not CRDs (§19–20, AD-016).

Decision (2026-10-04, AD-023): v0 implements two of these, AgentService and AgentConfig (§59a). The inline environment, tools and security of an AgentConfig have the shape of the specs of AgentEnvironment, ToolUniverse / ToolProvider and SecurityProfile, so those CRDs can come later as exclusive *Ref fields. AgentRevision and AgentRoute wait; status.config.digest is the seed of the first.

Potential later CRDs:

text
ResourceClass
CredentialBinding
ArtifactPolicy
VerificationPolicy
RuntimeProviderConfig
RouteProviderConfig

They should only become CRDs if Kubernetes reconciliation is useful.

Decided (2026-10-05, AD-029; was P-010): the dashboard of §60a adds ModelEndpoint (new) and a v0 subset of ToolProvider (one remote MCP server), referenced from AgentConfig by exclusive endpointRef and providerRef fields, so a model or a tool server is set once and named by every agent that uses it.


57. Things That Should Probably Not Be CRDs ​

Not every domain object benefits from Kubernetes reconciliation.

Likely application database objects:

text
Tenant
Project
User
Role
Permission
Conversation
Response
AgentRun
AgentLease
AuditEvent
Artifact metadata
billing records
model usage
workflow history

The platform should avoid using Kubernetes as a general-purpose database.


58. CRD Reference Model ​

Not every arrow is a Kubernetes ownerReference.

AgentRun and AgentLease appear here as application records, not CRDs (AD-016).

Many are normal object references.

Shared resources such as:

text
ToolUniverse
AgentEnvironment
SecurityProfile

must not be deleted simply because one consuming agent is deleted.


59. Operator Design ​

The operator should be deliberately boring.

It should reconcile desired infrastructure.

It should not implement business workflows.

For example:

text
active leases > 0 (from the lease service)
    ↓
ensure runtime active

active leases = 0
    ↓
wait idle timeout
    ↓
ensure runtime stopped

Not:

text
run agent
wait PR
check CI
ask reviewer
retry implementation
merge

The latter belongs in Restate.

Decision (2026-10-04, AD-023): the first operator is deliberately smaller than this design: two CRDs, adam-rs agents, native Kubernetes, no leases and no scale-to-zero. It is specified in §59a; the text above stays the target.


59a. Operator v0: adam-rs agents ​

Status: design only (2026-10-04); slices S1 to S9 are built (2026-10-05, the blockquotes below). Slice S0 is this text.

S1 built (2026-10-05): the workspace, aap-api, crdgen and the examples, in crates/api and bin/operator. The kind job in CI is what proves the CEL rules against a real API server (unverified until it has run).

S2, S3 built (2026-10-05): aap-domain with parity goldens against the adam-rs chart at 0391809 (verified 2026-10-05, helm template; the folder agent's golden is hand-written from its README, verified by reading only, because the chart renders adam-coder only) and aap-ports with its testkit. What this section leaves open, and where the crates deviate from it, is in their READMEs.

S4 built (2026-10-05): aap-runtime-kubernetes: RuntimeProvider on native Kubernetes. It renders a RuntimeSpec into its objects (golden YAML of examples/coder.yaml, combined and split, and examples/chat.yaml), applies them by server-side apply under aap-operator, guards adoption, maps pods to RuntimeStatus, honours deletionPolicy on delete and watches the owned kinds. Proven locally against a fake API server (tests/api.rs); the proof against a real API server is unverified until the runtime-kubernetes job of operator.yml has run: no cluster was available where it was written. Where it differs from this section, and why, is in the crate's README (Applying, Status) and below, at Owned objects.

S5 built (2026-10-05): aap-controller (the reconcilers over the two provider seams, kube-rs), aap-store-secret (the StoreProvisioner for a referenced Secret) and operator run in bin/operator (health 8081, metrics 9090, WATCH_NAMESPACE, no leader election in S5; K7a adds it when replicas > 1). Proven against a fake API server that has list and watch (crates/controller/tests), and by bin/operator/tests/cluster.rs against a bare kube-apiserver v1.35.8 and etcd, run by hand on 2026-10-05, with the test playing the controller manager; the proof with real pods, in kind (the operator-e2e job of operator.yml), is unverified until CI has run it (no cluster, docker daemon or kubelet existed where S5 was written). The controller's README lists every place it differs from this section and why: the reasons of a condition that is Unknown, a spec a provider refuses (ConfigResolved: False), Listed: RegistryDisabled until S7, the timers and back-off, the owner handle passed in by the composition root, and aap-store-secret not checking that a Secret exists, because Secrets and databases below gives the operator no right on Secrets.

S6 built (2026-10-05): aap-store-cnpg: the StoreProvisioner for store.postgres.cnpg. It server-side applies a postgresql.cnpg.io/v1 Cluster <svc>-db through the dynamic API (no CloudNativePG crate), reports the Secret reference <svc>-db-app / uri (never reading it), reads readiness from the Cluster's status, honours deletionPolicy on release, and maps a missing CloudNativePG API to CNPGNotInstalled; feature store-cnpg (default on) of operator run. Proven against a fake API server (crates/store-cnpg/tests/api.rs) and, for the missing-API case and its deletion, against a bare kube-apiserver v1.35.8; the proof against a real CloudNativePG 1.30.1 in kind (the store-cnpg job of operator.yml) is unverified until CI has run it. Where it differs from this section: the Cluster has no owner reference (data, as Owned objects says), a Cluster of that name that is not ours is ConfigInvalid (the store seam has no NameConflict), and a referenced Secret is served by the same provisioner. The crate's README has the facts checked (verified 2026-10-05).

S7 built (2026-10-05): aap-registry: the agent-registry/v1 document builder and an axum router, served by operator run on 8080 (feature registry, default on; the file key registry.token, was REGISTRY_TOKEN_FILE). One static bearer compared in constant time (401 with no body, and no token, no registry: fail closed, and every service is Listed: False, reason RegistryDisabled), a strong ETag with 304, Cache-Control: private, max-age=30, Vary: Authorization, HEAD, and 503 rather than a truncated document past 500 items or 1 MiB, when every service that would be listed is Listed: False, reason RegistryFull (a flag shared with the controller). A listed service is Listed: True, reason Listed. The document is read by the system's own reader, vendored with its test vectors (crates/registry/tests/vendored, at another-agentic-system e5da0a4; re-vendored at 8df44c6 by D8, see D8 built in §60a), with no item skipped, and by a property test over arbitrary entries. Proven against a fake directory and, host side, against a bare kube-apiserver v1.35.8; a pod reading the registry and the card it lists, in kind (the operator-e2e job), is unverified until CI has run it. Where it differs from this section: Registry in v0 below, and the crate's README (Deviations).

S8 built (2026-10-05, unverified until CI has run it): docker/operator/Dockerfile (cargo-chef 0.1.77 on Rust 1.94.1, Debian trixie, onto gcr.io/distroless/cc-debian13:nonroot; both pinned by tag and digest, verified 2026-10-05; user 65532; only the operator binary), the chart deploy/operator, the chart deploy/operator-crds and .github/workflows/operator-image.yml. The chart has been rendered, linted and checked with kubeconform and its own render checks, and not installed on a cluster; the image has been built by nobody: no docker daemon existed where S8 was written, so the Dockerfile is only hadolint-clean and its smoke commands were run on the binary built on the host. Both are unverified until the workflow has run. Where it differs from The operator chart below is in the Amended note there.

S9 built (2026-10-05, unverified until CI has run it): the kind end-to-end of the coder, the job operator-coder-e2e of operator-image.yml and deploy/operator/tests/e2e/. It installs the CRDs chart and the operator chart with the image built in the job (loaded into kind), applies examples/coder.yaml adapted (the real adam-rs coder image sha-9a1fd4e by tag and digest, verified 2026-10-05, anonymous pull; a Postgres the job runs behind store.postgres.secretRef; dummy Secrets), and asserts that the AgentService is Ready, that the coder's card answers through the Service from a pod, that the registry lists it, and that a deletion completes the finalizer and keeps the claim under Retain. It proves the operator runs the real coder up to its startup checks; it proves no model call and no GitHub call, sends no task, and runs the token variant, not the GitHub App (§59a's Testing asked for a throwaway App key: a key is a credential and the App is not what an operator-made pod differs in). The job has not run.

The first operator the platform ships. It is smaller than the design of §59 on purpose: it manages adam-rs agents (AD-022) from two CRDs, AgentService and AgentConfig, on native Kubernetes (AD-023), and it keeps secrets out of the custom resources (AD-024). Since K11a it also runs an image that serves A2A itself (harness.type: a2a, AD-054) with the same objects, pod hardening, store and registry entry, and invents no variable for it.

It exists because of one request from the owner (2026-10-04): "that coder, I wanted to have a k8s operator to manage it automatically using CRDs". The owner's defaults, which this section follows:

  • it lives in this repository, in Rust with kube-rs;
  • the coder first, then folder agents;
  • it runs next to the existing charts until it is proven.

What it does, in one paragraph: a controller reads an AgentService and the AgentConfig it names, validates them, resolves them into one neutral RuntimeSpec with a digest, and has a RuntimeProvider make a workload, a Service, a NetworkPolicy and storage for an adam-rs agent (adam-coder or adam-agent, one image) or, since K11a, for an image that serves A2A itself (one server, the image's own entrypoint, only the variables the config lists). It reports conditions and a state, and it lists the agent in the agent registry (§12b). It reconciles infrastructure and nothing else, as §59 asks: no run, no workflow, no lease.

The adam-rs side is cited at revision 0391809, the source of the coder image the netcup deployment pins (verified 2026-10-04, read at that revision in vymalo/another-adam-rs): deploy/coder/templates/statefulset.yaml, _validate.tpl, networkpolicy.yaml and extra-mcp-configmap.yaml (chart), bin/adam-coder/README.md and bin/adam-agent/README.md (environment tables), docker/coder/Dockerfile (entrypoint).

Workspace layout &ZeroWidthSpace;

One Cargo workspace in this repository. Crates are prefixed aap- (owner question in §93).

PathCrateWhat
crates/apiaap-apiThe CRD types only: kube CustomResource plus schemars, CEL rules, fn crds()
crates/domainaap-domainPure: validate, resolve into a ResolvedAgent with a sha256 digest, and the mapping of adam-coder / adam-agent onto aap_ports::RuntimeSpec. The env contract of the two binaries lives only here
crates/portsaap-portsThe traits RuntimeProvider, StoreProvisioner, AgentDirectory and their neutral types. Feature testkit: the conformance macros and Memory implementations
crates/runtime-kubernetesaap-runtime-kubernetesRuntimeProvider on native Kubernetes (§23)
crates/store-secretStoreProvisioner for a referenced Secret
crates/store-cnpgaap-store-cnpgStoreProvisioner for an operator-owned CloudNativePG Cluster (also serves a referenced Secret, so one type is the store)
crates/registryaap-registryThe agent-registry/v1 document builder and an axum router: bearer, ETag / 304, Cache-Control: private, max-age<=60, Vary
crates/controllerThe reconcilers, generic over <R: RuntimeProvider, S: StoreProvisioner>: status, conditions, events, the finalizer, and an AgentDirectory backed by a reflector
crates/testsupportFixtures and the API-server harness
bin/operatorThe composition root (AD-020). Features runtime-kubernetes, store-cnpg, registry; subcommands run and crdgen; ports 8080 (registry), 8081 (health), 9090 (metrics)
deploy/operatorThe Helm chart
examples/coder.yaml, chat.yaml

Libraries: kube 4.0.0 (features runtime, derive), k8s-openapi 0.28.0, schemars 1 (verified 2026-10-04, kube-rs documentation). CEL rules through x_kube(validation = …) are unverified: S1 proves them against a real API server, and a rule that cannot be expressed moves into the reconciler's validation (below).

AD-020 in practice. No Kubernetes type appears in a trait signature. RuntimeSpec is made of neutral types (EnvValue::{Literal, Secret(SecretRef), PodName}, VolumeSpec, …). Ownership travels as an opaque OwnerHandle the controller got from the object, so a provider can set owner references without the controller knowing what they are. RuntimeProvider::watch() feeds the controller with the ids of runtimes that changed: the controller never watches StatefulSets itself. The trait is in §22.

RuntimeStatus is { phase: Absent | Provisioning | Ready | Suspended | Failed, replicas, issues[] } (the phases of §18), where an issue is { role, reason, message } and the reason is one of:

Issue reasonMeansSeen as
ConfigRejectedthe agent process refused its configurationexit code 78
DependencyUnavailablea dependency of the agent is unreachable (database, an MCP server)exit code 69
MissingSecret{name}a referenced Secret or key does not existCreateContainerConfigError
ImagePullthe image cannot be pulledErrImagePull, ImagePullBackOff
CrashLoopthe container keeps exiting for another reasonCrashLoopBackOff (amended 2026-10-16: or a non-zero exit other than 78 and 69 of a container that has been restarted at least once, because between two restarts the kubelet can keep reporting the last exit, Terminated with reason Error, and not CrashLoopBackOff; a first exit and exit code 0 are no issue; verified 2026-10-16, CI run 38857024797 of operator.yml, job runtime-kubernetes, kindest/node v1.35.8: a pod running sh -c "exit 1" was Terminated, Error, exit code 1, restart count 5 after 240 s)
NameConflictan object with the name the runtime needs exists and is not oursadoption guard

Exit codes 78 and 69 are adam's (adam_service: 0 clean shutdown, 78 configuration, 69 a dependency is unreachable; verified 2026-10-04, bin/adam-agent/README.md, "The process").

The v0 CRDs &ZeroWidthSpace;

Group agents.vymalo.com, version v1alpha1 (§62), namespaced. Two kinds. Where a field exists in §7 or §8 it keeps its name and meaning; the fields §7 and §8 draw that v0 does not implement are in What v0 leaves out, and the fields v0 adds (store, access, registry, deletionPolicy, the inline environment, tools and security) are the ones adam-rs and the operator need today. A secret is never a value in either kind (AD-024): a field that needs one names a Secret and a key.

AgentService: the netcup coder &ZeroWidthSpace;

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentService
metadata: { name: coder, namespace: another-agentic-system }
spec:
  description: Coding task to verified pull request.
  configRef: { name: coder }
  interfaces:
    a2a:
      enabled: true
      bearerTokensSecretRef: { name: coder-secrets, key: A2A_BEARER_TOKENS }
      publicUrl: ""          # empty: http://<name>.<ns>.svc:8080/
    responses: { enabled: false }   # v0: CEL refuses true
    mcp: { enabled: false }         # v0: CEL refuses true
  scaling:
    topology: combined     # combined | split
    workers: 1
    front: { replicas: 1 } # split only; a PodDisruptionBudget when > 1
  suspend: false
  store:
    postgres:
      secretRef: { name: coder-db-uri, key: uri }
      # or an operator-owned CloudNativePG cluster:
      # cnpg: { instances: 1, storage: { size: 5Gi, storageClass: longhorn } }
  access:
    allowFrom:
      - namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: another-agentic-system } }
  registry: { title: Coder, tags: [coding, git] }
  deletionPolicy: Retain   # Retain | Delete

AgentConfig: the netcup coder &ZeroWidthSpace;

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentConfig
metadata: { name: coder, namespace: another-agentic-system }
spec:
  harness:
    type: adam-rs
    adam:
      binary: adam-coder         # adam-coder | adam-agent
      agent: { embedded: {} }
      coder:
        workers: 4
        maxCheckCycles: 3
        checkTimeoutSecs: 900
        workspaceSweepSecs: 300
        workspacePlacement: ""   # "" | shared | affinity | isolated
        allowedRepoHosts: [github.com]
        githubApiUrl: https://api.github.com
        prDraft: true
        gitAuthor: { name: "bored-giant-panda[bot]", email: "337696346+bored-giant-panda[bot]@users.noreply.github.com" }
        createRepoOwners: []
        opencodeModel: coding-model
        github:
          app:
            id: Iv23li4m1ZrQ8wdwjnQH       # the App's client ID: public, not a secret
            owners: [vymalo]               # or installationId: 12345 (exactly one of the two)
            privateKeySecretRef: { name: coder-github-app, key: private-key.pem }
          # token: { secretRef: { name: coder-secrets, key: GITHUB_TOKEN } }   # instead of app, never both
  model:
    model: coding-model
    baseUrl: { secretRef: { name: coder-secrets, key: MODEL_BASE_URL } }   # or { value: https://…/v1 }
    apiKeySecretRef: { name: coder-secrets, key: MODEL_API_KEY }
  tools:
    githubMcp: { sidecar: true, port: 8082, host: "" }
    mcpServers:
      websearch:
        url: http://another-agentic-websearch.another-agentic-system.svc:8080/mcp
        headers:
          Authorization: { prefix: "Bearer ", secretRef: { name: coder-secrets, key: SEARCH_MCP_TOKEN } }
        optional: true
      context7:
        url: https://mcp.context7.com/mcp
        headers:
          Authorization: { prefix: "Bearer ", secretRef: { name: coder-secrets, key: CONTEXT7_API_KEY } }
        optional: true
    allowInsecureHttp: true
  environment:
    image: { ref: ghcr.io/vymalo/another-adam-rs/coder:sha-0391809@sha256:814d8ee329a5e4d8634e8a82532c035999c4be27aac086508b742a635449ea40 }
    resources: { requests: { cpu: 500m, memory: 1Gi }, limits: { memory: 6Gi } }
    volumes:
      - name: work
        scope: agent
        mountPath: /work
        source: { persistent: { size: 20Gi, storageClass: longhorn, perReplica: true } }
    terminationGracePeriodSeconds: 120
  security: { runAsUser: 10001, runAsGroup: 10001, fsGroup: 10001, fsGroupChangePolicy: OnRootMismatch }
  extraEnv: {}

The model alias is a placeholder here: the real alias is the deployment's. The gateway URL is a Secret key in this example because the netcup deployment keeps it out of git (adam-rs config.modelBaseUrlFromSecret); a plain value is the other form.

A bring-your-own A2A image (K11a, AD-054) &ZeroWidthSpace;

harness.type is adam-rs (above, the default) or a2a: an image that serves A2A itself. The operator runs it with the pod hardening, store and registry entry of an adam-rs agent, and invents no variable of its own: the image gets the env entries the config lists, each a plain value or a secretKeyRef, plus A2A_BEARER_TOKENS from the service's interfaces.a2a.bearerTokensSecretRef — the one variable the service names and the platform's A2A contract needs.

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentConfig
metadata: { name: a2a, namespace: another-agentic-system }
spec:
  harness:
    type: a2a
    a2a:
      image: { ref: "aap-stub:ci" }     # the harness's own: environment.image is refused with it
      port: 8080                         # 1 to 65535; the container's, the Service's and the NetworkPolicy's
      cardPath: /.well-known/agent-card.json   # where the registry's href points
      healthPath: /healthz               # the startup and readiness probes' path
      env:
        - name: LOG_LEVEL
          value: info
        - name: API_TOKEN
          secretKeyRef: { name: a2a-secrets, key: API_TOKEN }
  environment:
    resources: { requests: { cpu: 10m, memory: 32Mi }, limits: { memory: 64Mi } }

The AgentService is the same as any agent's, with scaling.topology: combined and its store and interfaces.a2a. examples/a2a.yaml is the whole pair. model, environment.image, environment.cache, environment.volumes, tools, extraEnv and split are refused for a2a, naming the field: the image brings its own, and it is one server.

A folder agent: chat &ZeroWidthSpace;

An agent that is only a folder (the adam-agent-folder case) needs the same two kinds and no volume. The service:

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentService
metadata: { name: chat, namespace: another-agentic-system }
spec:
  description: A chat assistant.
  configRef: { name: chat }
  interfaces:
    a2a:
      enabled: true
      bearerTokensSecretRef: { name: chat-secrets, key: A2A_BEARER_TOKENS }
  scaling: { topology: combined, workers: 1 }
  store:
    postgres:
      secretRef: { name: chat-db-app, key: uri }   # the system chart's CNPG Secret of the `agent` database
  registry: { title: Chat, tags: [chat] }

and its config:

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentConfig
metadata: { name: chat, namespace: another-agentic-system }
spec:
  harness:
    type: adam-rs
    adam:
      binary: adam-agent
      agent:
        folder:
          files:                                  # relative path -> content; mounted at /etc/adam/agent (ADAM_AGENT_DIR)
            instructions.md: |
              ---
              name: chat
              description: A chat assistant.
              card:
                name: Chat
              ---
              Your name is Chat.
              In one sentence: I talk things through with you.
          # or: configMapRef: { name: chat-agent }   (exactly one of files and configMapRef)
  model:
    model: chat-model
    baseUrl: { value: https://gateway.example.invalid/v1 }
    apiKeySecretRef: { name: chat-secrets, key: MODEL_API_KEY }
  tools:
    allowInsecureHttp: true     # the orchestrator's thread tools are plain http on another host, inside the cluster
  environment:
    image: { ref: "ghcr.io/vymalo/another-adam-rs/coder:sha-0391809@sha256:<digest>" }   # tag and digest
    resources: { requests: { cpu: 100m, memory: 256Mi }, limits: { memory: 512Mi } }

There is no volumes, so the operator renders a Deployment. files is the whole folder inline, and ConfigMaps hold 1 MiB, which is the folder's size limit in v0. A path with a / in it (skills/…) is stored under a mangled ConfigMap key and mounted at its path with items. The adam-agent folder format is docs/authoring.md in adam-rs.

Validation &ZeroWidthSpace;

Two layers, so a bad object is refused at the earliest place that can know.

  • CEL on the CRD (shape, no other object needed): interfaces.responses.enabled and interfaces.mcp.enabled must be false in v0; an interfaces.a2a that is enabled names bearerTokensSecretRef (K1: adam-rs's rule; enabled stays false when omitted); exactly one of store.postgres.secretRef and store.postgres.cnpg; exactly one of github.app and github.token; exactly one of app.installationId and app.owners; exactly one of agent.folder.files and agent.folder.configMapRef, and exactly one of folder and embedded; binary: adam-coder needs embedded and the coder block, binary: adam-agent needs folder and no coder block; scaling.front only with topology: split; and (K11a, AD-054) harness.type names its block and no other (adam-rs needs adam and no a2a, a2a needs a2a and no adam), harness.a2a.cardPath and healthPath start with /, each a2a.env entry has exactly one of value and secretKeyRef, and spec.model is required of adam-rs (CEL). An a2a config that names a model is refused by validate.
  • The reconciler (aap-domain::validate, cross-object, reported as ConfigInvalid): the rules of the adam-rs chart's _validate.tpl, mirrored so the same mistakes fail the same way: a placement is one of "", shared, affinity, isolated (a2a-only is refused for the coder); more than one worker needs a placement; shared and affinity need the work volume to be a single ReadWriteMany claim (perReplica: false) and isolated needs it per replica; githubMcp.port is 1 to 65535; an MCP server URL is http or https, with no user name, password or ${…} in it; a header name is an HTTP token and its prefix is plain text; a plain http:// URL to another machine needs tools.allowInsecureHttp (adam refuses such a server at startup otherwise); extraEnv may not name a variable the operator sets; and (K11a, AD-054) an a2a harness's env names are variable names, once each and at most 64, its port and paths are a port and paths, and model, environment.image, environment.cache, environment.volumes, tools, extraEnv and split are refused for it, naming the field.

What each field becomes &ZeroWidthSpace;

The field-to-environment contract. It is the only place in the operator that knows adam's variable names (aap-domain); the parity goldens (below) hold it equal to what the adam-rs chart renders. Variable names and meanings are those of bin/adam-coder/README.md and bin/adam-agent/README.md (verified 2026-10-04, revision 0391809).

FieldBecomesNotes
AgentService.spec.interfaces.a2a.bearerTokensSecretRefA2A_BEARER_TOKENS from secretKeyRefNot set on a worker of split. No token, no server (the agent fails closed)
…a2a.publicUrlPUBLIC_URLEmpty: http://<name>.<ns>.svc:8080/. Not set on a worker of split
…scaling.topologyROLEcombined: unset (the binary runs all). split: control-plane on <svc>-front, worker on the StatefulSet or Deployment <svc>
…scaling.workersreplicas of <svc>The adam workers as pods. Not the WORKERS variable (below)
…scaling.front.replicasreplicas of <svc>-frontsplit only
…suspendreplicas 0, runtime.phase: SuspendedThe only scale-to-zero in v0
…store.postgres.secretRefDATABASE_URL from secretKeyRefNot set on an a2a image: it gets no variable it did not list (the store is provisioned all the same)
…store.postgres.cnpgDATABASE_URL from <svc>-db-app, key uriThe Secret CloudNativePG makes for the cluster <svc>-db. Not set on an a2a image
…access.allowFromNetworkPolicy <svc>, ingress on 8080No egress rule: the agent needs git hosts, the model gateway and registries. An a2a image's ingress is on its own port
AgentConfig…harness.a2a.image (K11a)the container's imageThe harness's own: environment.image is refused with it, and the operator's default image never applies
…a2a.port (K11a)the container's, the Service's and the NetworkPolicy's port1 to 65535; 8080 by default
…a2a.cardPath (K11a)the registry item's href: http://<svc>.<ns>.svc:<port><cardPath>Nothing else reaches the pod. /.well-known/agent-card.json by default
…a2a.healthPath (K11a)the startup and readiness probes' pathNo liveness probe. /healthz by default
…a2a.env (K11a)exactly those variables, each a literal or a secretKeyRef, plus A2A_BEARER_TOKENS from the service's interfaces.a2a.bearerTokensSecretRefNothing else is invented: no LISTEN_ADDR, PUBLIC_URL, DATABASE_URL, model variable or ADAM_*. The token is the platform's A2A contract (a listed agent accepts the orchestrator's), and the service names the Secret and key
…registry, …description, …access.audiencethe registry item (title, tags, service, and since D3 audience)Nothing reaches the pod
…deletionPolicythe finalizer's behaviourFinalizer
AgentConfig…adam.binarythe container commandadam-coder: the image's entrypoint. adam-agent: tini -- adam-agent (the image says so in its Dockerfile)
…adam.agent.folderADAM_AGENT_DIR=/etc/adam/agent, a ConfigMap <svc>-agent-<hash8> mounted read-onlyfiles gives the ConfigMap, configMapRef mounts the named one. embedded sets nothing
…adam.coder.workersWORKERSRuns advanced at once, per process
…coder.maxCheckCycles, checkTimeoutSecs, workspaceSweepSecsMAX_CHECK_CYCLES, CHECK_TIMEOUT_SECS, WORKSPACE_SWEEP_SECS
…coder.workspacePlacementWORKSPACE_PLACEMENT, and WORKER_ID from metadata.name for affinity and isolated"": not set. WORKSPACE_ROOT is the mount path of the volume work
…coder.allowedRepoHosts, githubApiUrl, prDraftALLOWED_REPO_HOSTS (comma-joined), GITHUB_API_URL, PR_DRAFT
…coder.gitAuthorGIT_AUTHOR_NAME, GIT_AUTHOR_EMAIL
…coder.createRepoOwnersCREATE_REPO_OWNERS (comma-joined)Not set when empty: the tool stays off
…coder.opencodeModelnothing since adam-rs ADR 0038 (b5d1c7e): the coder no longer uses OpenCode, so the field is read and renders no variable (and changes no digest). It stays in the CRD until a schema change removes it
…coder.maxAccessTier (K1)MAX_ACCESS_TIER (plan, edits, auto, bypass)Every role of a coder reads it. Not set when absent: the coder's own default is auto
…coder.runPods.sizeClass (D15a)RUN_ENVIRONMENT=kubernetes and seven RUN_POD_* variables, since D15d the git sandbox: GIT_SANDBOX_SOCKET, a git-sandbox native sidecar, two emptyDirs and the account's credentials as a projected volume of the coder container alone (the pod automounts no token any more), the template (a ConfigMap <svc>-run-pod mounted at /etc/adam/run-pod, RUN_POD_TEMPLATE_FILE), the account the workers run as with its token, a ResourceQuota, a NetworkPolicy (deny by default since D15c) and a RoleBinding <svc>-run-pods, a ConfigMap <svc>-run-pods-policy for the chart's admission policy, and since D15c the egress proxy (a Deployment, Service, ServiceAccount, PodDisruptionBudget, NetworkPolicy <svc>-egress and a ConfigMap <svc>-egress-allow) and the template's six proxy variablesAbsent: none of it, and the digest does not move. The class is a key of the operator chart's runPodClasses; the rest is the deployment's (D15a built)
…coder.github.app.id, owners, installationIdGITHUB_APP_ID, GITHUB_APP_OWNERS, GITHUB_APP_INSTALLATION_IDExactly one of the last two
…coder.github.app.privateKeySecretRefa Secret volume at /var/run/secrets/github-app (mode 0440) and GITHUB_APP_PRIVATE_KEY_PATHThe key is a file, never a variable. See the gap in AD-024
…coder.github.token.secretRefGITHUB_TOKEN from secretKeyRefNot with app
…model.modelMODEL
…model.baseUrlMODEL_BASE_URL, a value or a secretKeyRef
…model.apiKeySecretRefMODEL_API_KEY from secretKeyRef
…model.extraBody (K1)MODEL_EXTRA_BODY, the object as canonical JSON (keys sorted, no space)Not a secret: it shows in the pod's environment. model, messages, tools, tool_choice and stream are the runtime's: a config that sets one is ConfigInvalid. An empty object sets nothing
…model.echoReasoning (K1)MODEL_ECHO_REASONING (reasoning_content or reasoning)Not set when absent
…model.contextWindow (K1)MODEL_CONTEXT_WINDOW1 to 2^53 - 1 tokens; otherwise ConfigInvalid
…environment.cache.existingClaim (K1)the volume cache, the user's PersistentVolumeClaim by name, mounted at /cache of the workersThe operator makes no claim and deletes none, whatever deletionPolicy says. The name cache and the path /cache are the operator's then. Not on a split front
…tools.githubMcpa native sidecar github-mcp, GITHUB_MCP_URL=http://127.0.0.1:<port>, and GITHUB_HOST on the sidecar when host is setThe sidecar holds no credential: the coder sends the credentials of each call. Loopback only
…tools.mcpServersa ConfigMap <svc>-mcp (mcp.json, mounted at /etc/adam/extra-mcp), ADAM_EXTRA_MCP_FILE, and one variable per header SecretThe file holds ${VAR} references only. The variable is named by the Secret key (SEARCH_MCP_TOKEN), and the file refers to it
…tools.allowInsecureHttpMCP_ALLOW_INSECURE=trueCovers every MCP server of the agent and the endpoints a sender announces. Never automatic
(fixed for adam-coder)MCP_ALLOW_STDIO=trueParity with the chart, which keeps it for one release for folders written before the GitHub server became a sidecar. Not set for adam-agent
(fixed)LISTEN_ADDR=0.0.0.0:8080
…environment.image, resourcesthe container's image and resourcesThe sidecar has its own small defaults
…environment.volumesvolume mounts, a volumeClaimTemplate, or the shared claimOwned objects
…environment.terminationGracePeriodSecondsthe pod's
…securitythe pod's securityContext (runAsUser, runAsGroup, fsGroup, fsGroupChangePolicy)Everything else of the security context is fixed, below
…extraEnvliteral variablesNames only the adam binaries do not own; never a secret

The only variables that carry a secret are the ones the adam binaries know (MODEL_API_KEY, A2A_BEARER_TOKENS, GITHUB_TOKEN, DATABASE_URL, MODEL_BASE_URL when it is a Secret key) and the ones the extra MCP file names. The operator never invents a secret variable.

Reconciliation &ZeroWidthSpace;

One controller per kind. The AgentConfig controller validates the object and sets its Valid condition. The AgentService controller does the work: it is triggered by its own object, by RuntimeProvider::watch(), and by a change of an AgentConfig (mapped to every service that references it).

The state the controller derives and writes to status.state (§88), with the phase of the runtime beneath it (§18):

The rule, in order: a false ConfigResolved or StoreReady, or a NameConflict issue, is Blocked (the operator did not apply the desired state, and it leaves what runs untouched); spec.suspend with phase Suspended is Suspended; phase Ready is Ready; anything else is Degraded, and the reason says which (Provisioning for a rollout in progress, or the issue's reason). As in §88, the service state is distinct from the runtime's: Suspended is healthy.

Steps of one pass:

  1. Finalizer agents.vymalo.com/runtime, added before anything is created.
  2. Fetch and validate the config. ConfigNotFound or ConfigInvalid, with the cross-object rules above.
  3. Ensure the store. A referenced Secret needs nothing; cnpg makes the Cluster <svc>-db, whose Secret <svc>-db-app (key uri) is the connection string. CNPGNotInstalled when the CloudNativePG API is absent.
  4. Resolve, then RuntimeProvider::ensure. resolve turns the two objects into a ResolvedAgent: the RuntimeSpec and its sha256 digest. The pods are annotated agents.vymalo.com/config-digest, so a changed folder, MCP file, image or variable is a rollout (adam reads its files at startup only).
  5. Patch the status by server-side apply, and emit Events on transitions.

Owned objects &ZeroWidthSpace;

Applied by server-side apply under the field manager aap-operator, each labelled app.kubernetes.io/managed-by: aap-operator (and app.kubernetes.io/instance: <svc>, which the adoption guard checks too).

Amended 2026-10-05 (S4): this said agents.vymalo.com/operator and agents.vymalo.com. The S4 brief names aap-operator for both, which is what aap-runtime-kubernetes writes (names::FIELD_MANAGER, names::MANAGED_BY_VALUE); a Helm release's managed-by is its tool's name, and this one is ours in the same style. One constant each to change if the owner prefers the first. Every apply is forced (this section said nothing about force): the provider is the one writer of the fields it sets and moves replicas itself on suspend, so a conflict with its own earlier patch or a kubectl scale must be resolved by taking the field back, and the adoption guard, which runs before any apply, is what protects objects that are not ours.

ObjectNameWhen
StatefulSet<svc>A perReplica persistent volume exists: its volumeClaimTemplate is named after the volume (work)
Deployment<svc>Otherwise
Deployment, PodDisruptionBudget<svc>-fronttopology: split (the budget when the front has more than one replica)
Service<svc>Always: port 8080, selecting the front in split
ConfigMap<svc>-agent-<hash8>Folder files: immutable, named by the first 8 hex digits of its content hash; superseded ones are deleted after the rollout
ConfigMap<svc>-mcptools.mcpServers: the extra MCP file, ${VAR} references only
NetworkPolicy<svc>access.allowFrom: ingress on 8080, no egress rule
PersistentVolumeClaim<svc>-workPlacement shared or affinity: one ReadWriteMany claim for all workers
Cluster (CloudNativePG)<svc>-dbstore.postgres.cnpg

Compute objects carry an owner reference to the AgentService (through the OwnerHandle). Data objects do not (the claim <svc>-work, the Cluster <svc>-db, and the claims a StatefulSet makes): garbage collection must not take them with the service, so the finalizer deletes them explicitly, and only under deletionPolicy: Delete.

Pod template. The same as the adam-rs chart's statefulset.yaml (verified 2026-10-04, revision 0391809), so the workload that replaces a Helm release behaves like it:

  • no service-account token (automountServiceAccountToken: false); runAsNonRoot, uid and gid from security (10001 for the adam image), seccompProfile: RuntimeDefault; every container drops all capabilities and refuses privilege escalation;
  • /healthz startup, liveness and readiness probes on the http port, with the chart's periods;
  • the github-mcp sidecar as a native sidecar (an init container with restartPolicy: Always), probed by an exec startup probe on loopback, because the kubelet's TCP probe connects to the pod IP and the server listens on loopback only (adam-rs #86);
  • WORKER_ID from the downward API (metadata.name) when the placement pins runs to a worker;
  • the annotation agents.vymalo.com/config-digest, and OrderedReady with RollingUpdate for the StatefulSet.

The goldens in Testing hold the parity, not this list.

K1: the CRDs read everything adam-rs's former operator (removed, its ADR 0046) accepted &ZeroWidthSpace;

Added 2026-11-14, amended after review the same day. Historical since the same day: adam-rs removed its copy from main by its pull request 143 (its ADR 0046), so this operator is now the only one; the vendored CRD file stays at 4bc6742 and is never re-vendored. adam-rs made a copy of this operator on 2026-10-07 (crates/adam-operator-api, crates/adam-operator-domain) and kept its own CRD file, deploy/crds/agents.vymalo.com.yaml. The owner wants one operator, so this one reads what the other accepts, except the listed differences. At adam-rs 4bc6742 (verified 2026-11-14, the revision of the parity goldens and of the vendored CRD, which is the same file as at bec3e32) K1 closes these differences with adam-rs's serde names, bounds and environment variables:

FieldBecomesChecked
model.extraBodyMODEL_EXTRA_BODY, canonical JSON with every $ doubled (the kubelet expands $(VAR) and turns $$ into $)the five members the runtime owns are refused; at most 64 members (schema) and 16 KiB of JSON; null is accepted as by its siblings
model.echoReasoningMODEL_ECHO_REASONINGenum reasoning_content, reasoning
model.contextWindowMODEL_CONTEXT_WINDOW1 to 2^53 - 1 (schema bound and ConfigInvalid)
coder.maxAccessTierMAX_ACCESS_TIERenum plan, edits, auto, bypass, and at most the operator's ceiling (AD-050)
environment.cache.existingClaimthe claim at /cachea claim the operator's cache.allowedClaims lists, and none the operator makes (AD-049); cache and /cache (and everything under it) reserved
interfaces.a2athe CEL rule "an enabled A2A interface needs a token"an invalid example; enabled stays false when omitted

aap-ports gains VolumeSource::ExistingClaim { name }, a new variant of a closed enum (AD-051). With run pods the run pod template mounts the cache and the guard admits its claim as a second one: the parameters of the policy gain claims (the work claim and the cache's, one per line) and the operator chart's one policy reads it, falling back to the parameter claim when a ConfigMap has no claims, which is what the previous operator wrote: upgrade the operator (its pods rewrite every agent's parameters at their first pass) and the chart together; between the chart and the first pass an agent's run pods are admitted for the work claim alone, not refused. The test crd_reads_everything_adam_rs_accepts_except_the_listed_differences (crates/api/tests/superset.rs, adam-rs's file vendored in crates/api/tests/vendored/, its revision held equal to the goldens' by a test) holds every property path of its two kinds present in ours and, for each of them, our schema never stricter: the same type, no higher minimum, minLength, minItems, no lower maximum, maxLength, maxItems, maxProperties, required a subset, the enum values a superset, the same default. The differences, listed in the test with their reasons: tools.mcpServers has maxProperties: 32 here and no bound there (kube-apiserver prices a rule that walks a map by its bound; kept), model.extraBody has maxProperties: 64, and interfaces.a2a.enabled defaults to false here and true there (a manifest that writes a2a with a token alone must not turn a disabled agent on at the next apply). Ours also keeps interfaces optional (adam-rs requires it) and model.baseUrl and apiKeySecretRef optional beside endpointRef (AD-029), so ours accepts more, and the one CEL message of baseUrl is worded for both kinds that use it. In a form (§60a) maxAccessTier is a field (and the API's defaults.maxAccessTier is its ceiling), and so are, since parity gap 16, model.extraBody, model.echoReasoning and model.contextWindow (ModelChoice); the other fields are YAML only.

The goldens coder-cache, coder-tiers and coder-run-pods-cache were rendered from adam-rs's chart at 4bc6742 (verified 2026-11-14; since ANR-1200 at b5d1c7e; the seven earlier cases differ from 581aeed by the revision alone). Two differences from the chart that no golden shows, because the cases do not set them: a ceiling below auto writes MAX_ACCESS_TIER for a config that names no tier (the chart has no ceiling), and a $ in extraBody is doubled (the chart does not). adam-rs's cache.create (a claim the chart makes) is not ported.

Decisions of K1 for the owner to confirm (AD-049, AD-050, AD-051): (1) the cache allow-list is the deployment's and empty by default, so no agent has a cache until a deployment lists a claim; (2) the access tier ceiling is the deployment's and auto by default, so bypass is opt-in by whoever runs the operator; (3) interfaces.a2a.enabled stays false when omitted, unlike adam-rs; (4) the maxProperties: 32 of tools.mcpServers is kept, so a config adam-rs accepts with more than 32 servers is refused here; (5) VolumeSource::ExistingClaim breaks implementers of RuntimeProvider. Unverified until a cluster has run it: the policy's new CEL (has(params.data.claims) ? …, join, the ternary of the message) is compared with the coder chart's text, and run-pods-admission.sh, which asks an API server and gained the cases of the claims, has not run (no kubectl or kube-apiserver where K1 was written).

The reasoning effort: the levels on the endpoint, the pick on the agent (ADR 0063) &ZeroWidthSpace;

Added 2026-11-21; the platform's first part of adam's ADR 0063, "a reasoning effort is one setting, per model". The model's levels live on the object that names the model, and the agent picks one:

  • ModelEndpoint.spec.reasoning is a map from an alias to { efforts: [...] } (at most 32 aliases; each list at most the seven levels, each once). The seven are the gateway's observed vocabulary: none, minimal, low, medium, high, xhigh, max (none is a level of its own: some models reason unless it is sent). An alias with no entry, or an empty list, takes no reasoning setting. The wire (the reasoning_effort member, a reasoning object, a thinking budget) belongs to the model's profile in adam's MODEL_ALIASES_FILE, not to this object.
  • AgentConfig.spec.model.reasoningEffort is one of the levels the endpoint declares for model.model; validate refuses any other, naming the field, and a model with no entry takes none, so a level for it is ConfigInvalid. An inline model (no endpointRef) is left to the deployment's profile: the platform does not read it, and the field is not judged there.
  • The forms: the model endpoint's reasoning map (at most 32 aliases, the seven levels once each) and the agent's model.reasoningEffort (the agent form's ModelChoice), with the membership rule in the form's own errors, named by the field. GET /v1/info lists the vocabulary (reasoningEfforts, lowest first); aapctl export prints both fields from the objects.
  • It reaches no model yet. The coder's seat is its card's levels (from MODEL_ALIASES_FILE, which the operator will render from the endpoint) and the orchestrator's per-message reasoning/v1; the platform's field is the per-agent default the registry item will publish for it. Until that lands, the field is stored, validated and shown, and the operator writes no variable for it.
  • The two new bounds (32 aliases, 7 levels) have their invalid examples (examples/invalid/endpoint-reasoning-too-many.yaml, endpoint-reasoning-efforts-too-many.yaml), so tests/examples.rs counts 50.
  • For the owner to confirm: (1) the additive map beside spec.models (S-4G7Y's ADR assumes it; nothing stored breaks); (2) the seven levels as the platform's enum, none included (ADR 0063's vocabulary); (3) the field not reaching the model until the registry item and the card's levels land; (4) GET /v1/info lists the vocabulary, and each endpoint's own levels are in its object and its form.

Adoption guard &ZeroWidthSpace;

The operator never takes over an object that has the name it needs but not its managed-by label: it reports NameConflict (a RuntimeStatus issue, so state: Blocked) and changes nothing. This is what makes running next to an existing Helm release safe: a Helm object carries app.kubernetes.io/managed-by: Helm, so the operator waits until that release's object is gone (Rollout on netcup).

Finalizer and deletion &ZeroWidthSpace;

Deleting an AgentService runs RuntimeProvider::delete and releases the store, as the sequence above shows, then removes the finalizer. deletionPolicy decides what happens to data:

  • Retain (default): the compute (workloads, Service, NetworkPolicy, ConfigMaps) is removed; the work volumes and an operator-owned database stay, with their labels, so an AgentService of the same name later finds them again (the adoption guard accepts its own label).
  • Delete: the data goes too.

The policy reaches the provider and the provisioner in their neutral spec types, so delete(id) has what it needs without a Kubernetes type in its signature.

Status &ZeroWidthSpace;

yaml
status:
  observedGeneration: 3
  state: Ready                 # Ready | Degraded | Suspended | Blocked
  config: { name: coder, observedGeneration: 7, digest: "sha256:…" }
  runtime: { provider: kubernetes, phase: Ready, replicas: 1 }
  endpoints:
    a2a: http://coder.another-agentic-system.svc:8080/
    agentCard: http://coder.another-agentic-system.svc:8080/.well-known/agent-card.json
  conditions:
    - { type: ConfigResolved, status: "True", reason: Resolved }
    - { type: StoreReady, status: "True", reason: SecretReferenced }
    - { type: RuntimeReady, status: "True", reason: Ready }
    - { type: Listed, status: "True", reason: Listed }
    - { type: Ready, status: "True", reason: Reconciled }
ConditionTrue reasonFalse reasons
ConfigResolvedResolvedConfigNotFound, ConfigInvalid
StoreReadySecretReferenced, ClusterReadyCNPGNotInstalled, ClusterNotReady
RuntimeReadyReadyProvisioning, Suspended, MissingSecret, ConfigRejected, DependencyUnavailable, ImagePull, CrashLoop, NameConflict
ListedListedA2ADisabled, ServiceBlocked, RegistryFull, RegistryDisabled
ReadyReconciledthe reason of the first false condition above, in this order

Ready is true when the first three are; Listed informs and does not gate it, so a full registry never makes an agent unready. The runtime reasons come from pod status: CreateContainerConfigError is MissingSecret, an exit with code 78 is ConfigRejected, 69 is DependencyUnavailable, ImagePullBackOff is ImagePull. Because the operator has no RBAC on Secrets, it cannot check that a referenced Secret exists: the kubelet's answer in the pod's status is how it learns. K6b: a service id that two namespaces share is left out of the registry for both, and Listed still says True for both: a condition reason for it is an owner decision, and the gap is recorded in crates/registry/README.md. status.config.digest is the seed of AgentRevision (§9): the digest a revision would record as its configurationDigest, with nothing yet that publishes or promotes it.

Secrets and databases &ZeroWidthSpace;

  • References only (AD-024). A custom resource names a Secret and a key; the operator copies a reference into the pod spec as a secretKeyRef, and never reads or writes a value. It has no RBAC on Secrets and creates no ExternalSecret. The conformance macros include "no secret value ever materialises": no RuntimeSpec, status, Event, log line or ConfigMap holds one.
  • Two store modes behind the StoreProvisioner seam (AD-020): secretRef (a Secret someone else owns) and operator-owned cnpg (a Cluster <svc>-db per service, owned by it, data kept by Retain). "A Database in someone else's Cluster" is deferred: server-side-apply co-ownership of that Cluster's managed.roles is unverified, and the operator must not fight the Cluster's owner for the field.
  • store sits on AgentService, not on AgentConfig (owner question in §93): a config can be shared by services, and two services must not share a ledger. adam keys a run by the agent's name, and several processes with the same name are replicas of one agent (verified 2026-10-04, bin/adam-agent/README.md, "Several agents, one database").

Registry in v0 &ZeroWidthSpace;

The operator binary serves GET /registry/v1/agents (§12b, the contract) from the cache of its own reflector, through the AgentDirectory trait, until a control plane exists. The document has one item per service that has A2A enabled and is not Blocked: href is status.endpoints.agentCard, service the object's name, title and tags from spec.registry and, since D3, audience from spec.access.audience (a sorted set; none and [] are no attribute: §60a), in name order, with the linkset headers of the contract, an ETag over the document (304 on a match), Cache-Control: private, max-age=30 and Vary: Authorization.

Deviations from the contract and from §12b, all of them v0 only:

The contractv0
Served by the control planeServed by the operator binary (feature registry, port 8080, ClusterIP); no ingress
The platform API's bearer token, 401 or 403, the list filtered per caller (agent.invoke, §52)One static bearer read from a file and compared in constant time; 401 only; no per-caller filtering, every holder sees every listed service. Open question in §93
max-age of 60 seconds or less30
At most 500 items and 1 MiB; a client never truncatesThe operator refuses rather than truncates: past either limit it answers 503 and every service gets Listed=False RegistryFull
HTTPS outside a trusted cluster network, rate limitingIn-cluster plain HTTP behind a NetworkPolicy; no rate limit
The card is served by the control plane, so it never wakes computeThe agent serves its own card (adam does), and nothing scales to zero yet (below), so nothing wakes
Releases on each card (§12a)No release-channels extension in v0

Amended 2026-10-05 (S7), what the built registry does where this section is silent: the token is read once from the reference at the file key registry.token (a mounted Secret; was the file named by REGISTRY_TOKEN_FILE) and no token configured means no registry (the port is not opened, every service is Listed: False, reason RegistryDisabled, and the operator keeps reconciling); a request before the reflector has synced is 503, never an empty list; RegistryFull reaches the services through a flag the registry sets and the controller reads, so it lands at the service's next pass (at most one resync later), and only on services that would otherwise be listed; a service name used in two namespaces is listed for neither (K6b, AD-055; the contract forbids a duplicate service); a card URL that a reader would skip (not absolute http(s), or with credentials) is not listed; anchor is sent when registry.publicUrl is set (was REGISTRY_PUBLIC_URL). Amended 2026-11-26 (ANR-962, AD-064): a token that is configured and unusable (a missing or empty file, an unset or empty variable) is no longer "no registry" but a refusal of the file, exit 78 at start; only an absent registry.token is no registry. The crate's README has the whole table.

The agent token rule. A consumer sends one token to every agent a registry lists; another-agentic-system names it AGENT_REGISTRY_AGENT_TOKEN (its orch-registry-platform crate, verified 2026-10-04, orchestrator/crates/registry-platform/README.md in vymalo/another-agentic-system). For that to work, the token must be one of each listed service's A2A_BEARER_TOKENS. The operator cannot check it (no Secret RBAC), so it is a deployment rule, and the consumer test of the registry crate does not cover it (it reads the document and knows nothing of tokens): nothing in the operator can check it, because it has no right on Secrets.

What v0 leaves out &ZeroWidthSpace;

Each item is additive later, and the third column says how it stays so.

Left outWhyStays additive because
AgentRevision, channels, the release-channels card extensionNothing consumes them yet. adam's ledger is keyed by the agent name, so revisions running side by side would share or fork one ledger. adam serves the card itselfstatus.config.digest is already the content of a revision
minReplicas, maxReplicas, idleTimeout, leases, scale-to-zeroThey need a lease service, an activator and a control-plane card, and the coder's workers keep stepping a run after the A2A call returns, so no HTTP-bound signal means "idle"spec.suspend, the phase Suspended and a reserved capability exist. adam's store has run leases (lease_until) for v1 (open question in §93)
interfaces.responses and interfaces.mcpadam serves A2A onlyThe fields exist, and CEL refuses true
AgentEnvironment, ToolUniverse, ToolProvider, SecurityProfile, AgentRoute, authorization.policyRefThey are reuse mechanisms, and nothing is shared yetThe inline environment, tools and security have the shape of those CRDs' specs, so a later *Ref, exclusive with the inline form, is additive
An admission webhookIt needs cert-managerCEL on the CRD plus validation in the reconciler cover v0
Per-caller registry filteringThere is no platform API yetThe registry is behind AgentDirectory; the filter joins when the control plane serves it
Credential broker, SPIFFE§39 and §40 are not builtAD-024 records the gap; the broker is designed in §39a (AD-042), still not built

Amended 2026-10-15 (D1, resolved by D2): of these, a v0 ToolProvider (one remote MCP server) is now built, with ModelEndpoint, which was never on the list: both are named from an AgentConfig by an exclusive *Ref field, as the row says, and §60a, What the custom resources gain, has them. The rest stay out.

Testing &ZeroWidthSpace;

  • aap-domain: table tests, and parity goldens: what the adam-rs chart renders for the same inputs, vendored into this repository with the adam-rs commit they came from.
  • Render goldens of the owned objects, checked with kubeconform in strict mode.
  • Reconciler unit tests with tower_test::mock and the Memory implementations of the ports.
  • The conformance macros of aap-ports (testkit), run by every provider and provisioner, including "no secret value ever materialises".
  • An envtest-like harness: a real kube-apiserver and etcd, for the CRDs, the CEL rules and server-side apply.
  • The registry contract tests, and a consumer test that reads the document with another-agentic-system's orch-registry-platform parser.
  • A kind end-to-end in CI: a stub agent; adam-agent with a WireMock model; and the coder with a throwaway GitHub App key.

Amended 2026-10-05 (S9): the stub agent is bin/operator/tests/stub (S5, in operator.yml); the coder's end-to-end runs the real image with a dummy GitHub token and a model address nothing answers, because the pod only needs to start (a dummy key would be refused when parsed, a real one is a credential); adam-agent with a WireMock model is not built (the stub stands for it).

The operator chart &ZeroWidthSpace;

deploy/operator, next to the existing charts until the operator is proven.

  • kubeVersion: ">=1.29", for the native sidecar of the pod template (unverified that sidecar containers are on by default from 1.29, and that netcup's cluster is that new, see Risks). Amended 2026-11-27 (AD-067): kubeVersion: ">=1.37.0-0" on both charts, the CRDs chart too; the line above is the record until then, when the owner made Kubernetes 1.37 the floor and Helm 4 the only Helm: below 1.37 the platform is unsupported, not merely untested, and Helm refuses the install. The -0 lets a vendor suffix through. The owner states that the deployment cluster runs 1.37 or later (the repository cannot check it).
  • The image ghcr.io/vymalo/another-agentic-platform/operator, tag sha-0000000 until CI bumps it (bump-tag.sh); built with cargo-chef onto a distroless base, non-root 65532.
  • Values: crds.install, watchNamespaces (K6a, AD-055: a list; one Role and one RoleBinding per namespace, never a ClusterRole; the first is the primary — the API's defaults.namespace, the run pods' cluster-scoped names and the operator's WATCH_NAMESPACE — and the operator watches every one, through WATCH_NAMESPACES (K6b)) or watchNamespace (one namespace, the shorthand; not both), the registry's settings and the Secret (or ExternalSecret) of its bearer token.
  • One replica by default, Recreate; replicas > 1 elects a leader (K7a, AD-057). With one, there is no election and a second reconciler would only race the first; the cost is a short gap in reconciling during an upgrade. With more, the replicas campaign for a Lease in the primary namespace, only its holder's passes write, the others keep their caches and serve the registry, and a PodDisruptionBudget of maxUnavailable: 1 keeps one through a drain.
  • A namespaced Role in each namespace the operator watches (K6a, AD-055), with a RoleBinding to the operator's service account in each: the two kinds and their status and finalizers, the owned kinds, pods for status, events, and the CloudNativePG Cluster when store-cnpg is built in. No right on Secrets. Amended 2026-11-14 (K2): the Role also holds patch on modelendpoints/status and toolproviders/status, in a rule of its own with that verb alone (render-check.sh holds it rule by rule): the two shared kinds are otherwise read and watched, never written (§60a).
  • Render checks, goldens, vendored schemas, as in the other charts of the family.
  • CI: rust.yml (fmt, clippy, test, deny, MSRV, a check that the generated CRDs match the committed ones) and operator.yml (helm, kubeconform, hadolint, build, then the kind end-to-end, then push the image that passed, then the bump job).

Amended 2026-10-05 (S8), what the built chart does where this section is silent or differs:

  • The CRDs are not in this chart (§93, decided the same day: a separate Argo CD app), so there is no crds.install. They are the chart deploy/operator-crds, which holds a copy of deploy/crds read with .Files (a Helm chart reads only its own directory) and which render-check.sh and cargo test -p aap-operator hold equal to it.
  • The workflows: operator.yml is the Rust and cluster half and was not changed in what it runs; the image, the chart checks, the push and the bump are their own workflow, operator-image.yml (the shape of adam-rs's coder.yml). No cargo deny or MSRV job is in either: neither is part of S8.
  • Values: watchNamespace (empty: the release's namespace; the Role and RoleBinding are made in the watched namespace; no value gives the operator a ClusterRole), storeCnpg (the right on CloudNativePG Clusters, on by default because the image is built with the feature), registry.tokenSecret or externalSecrets (the system chart's style: ssegning-aws, prod/another-agentic/env, one property, default agent_registry_token), networkPolicy (below) and tuning for the three timers and the concurrency. There is no replicaCount (the key is replicas) and no values.schema.json: neither sibling chart has one, and _validate.tpl refuses what would deploy something other than what is said. Amended 2026-11-18 (K6a, AD-055): watchNamespaces (a list; watchNamespace is the one-namespace shorthand, and not both) renders one Role and one RoleBinding per namespace, the run pods' Role and the operator's bind on it in each, and the admission policy's binding over all of them; the first namespace is the primary (WATCH_NAMESPACE, the API's defaults.namespace, the run pods' cluster-scoped names), the run pods' settings ConfigMap is in the release's namespace, where the operator's pod mounts it (before K6a it was rendered in the watched namespace, so a watchNamespace other than the release's left the pod mounting a ConfigMap that did not exist: that shape never started), and the operator binary watches every one (K6b). Amended 2026-11-19 (K7a, AD-057): replicas (1 by default; more than one elects a leader through a Lease in the primary namespace, with leaderElection.{leaseSecs,renewSecs,retrySecs} 15/10/2 and tuning.reconcileTimeoutSecs 4 s below lease - renew), a PodDisruptionBudget of one, and the leases rule. Amended 2026-11-19 (K14a, AD-052): agent.runtimeClassName (the RuntimeClass of every agent's own pod, empty by default; named, it is AGENT_RUNTIME_CLASS of the operator's Deployment and every workload's pod template, in the digest, so naming it rolls the agents once) and runPods.runtimeClassName (the RuntimeClass of run pods, empty by default; named, it goes into the settings file, the template the workers read and the parameters of the admission policy, which then requires it). Both are empty by default and then not a trace in any render: the seven goldens are byte for byte what they were. The RuntimeClass object is the administrator's and the chart never makes one (AD-052 decision 4). Amended 2026-11-26 (ANR-962, AD-064): the settings of operator run are one configuration file, and no setting is an environment variable any more. The chart renders it into a ConfigMap (templates/config.yaml, <fullname>) from the values above and from the ones that were the pod's env — watchNamespaces (as watch.namespaces, quoted, the first being the primary), tuning (as reconcile), registry (as registry.token: { file: /var/run/secrets/aap/registry/token } and registry.publicUrl), defaultAgentImage (as defaults.agentImage), agent.runtimeClassName (as defaults.agentRuntimeClass), cacheAllowedClaims, maxAccessTier, runPods/runPodClasses (as runPods; the separate settings ConfigMap and RUN_PODS_FILE are gone), toolProbe (as toolProbe.enabled/timeoutSecs), retention.afterDeleteDays, replicas/leaderElection (as leaderElection), logLevel (as log.filter) and otel (as telemetry.otlp, the headers file's header named by otel.headersSecret.header, default authorization) — mounts it at /etc/aap-operator/config.yaml, runs args: [run, --config, /etc/aap-operator/config.yaml] and rolls with one checksum/config; the pod keeps POD_NAME (and POD_NAMESPACE when traces are on) from the downward API and nothing else. An unknown key is refused at every level and version must be 1, so a misspelt value stops the operator at start instead of running on a default; operator run --check exits 0 or 78 (EX_CONFIG) and render-check.sh runs it on the configuration of every golden render (AAP_OPERATOR_BIN, built by the chart job), so a chart that renders a file the binary refuses fails there and not in a pod. A secret is a reference ({ file } or { env }) and no message quotes one. The seven goldens moved by the file, the mount and the args alone.
  • The registry: without a token the chart renders no registry.token in the operator's file, no port 8080 and no registry Service, as the binary serves none. With one, the token is a file (mode 0440, fsGroup 65532) the file names by reference, never an environment variable; it is read once, so a rotation is a pod restart.
  • The NetworkPolicy (not in this section): ingress is closed except the registry to the peers of networkPolicy.registry.allowFrom (required while there is a token: an empty list is refused) and /metrics to those of networkPolicy.metrics.allowFrom; egress is the API server's ports (443 and 6443, optionally only given addresses) and nothing else. Kubelet probes come from the node, which a NetworkPolicy never blocks. Amended 2026-11-18 (K3a, AD-053): with toolProbe.to set, egress also reaches exactly those peers on toolProbe.ports (the MCP servers a ToolProvider names) and the cluster's DNS on toolProbe.dns; empty, the policy is what it was, byte for byte. The API server's own rule is separate: with apiServer.cidrs empty it already allows any address on 443 and 6443, so an https probe on 443 is bounded by toolProbe.to only once apiServer.cidrs names the API server's addresses.
  • The pod: runAsNonRoot 65532, seccompProfile: RuntimeDefault, no privilege escalation, every capability dropped, a read-only root filesystem (the binary writes no file: unverified until it runs in kind), Recreate at one replica and a rolling update at more (K7a).
  • The image is built on Debian 13, not on the rust image of adam-rs, and pushed as sha-<7> and latest; the tag the chart pins is sha-<7> and is written by bump-tag.sh only. A new GHCR package is private until made public (owner step, in the chart's README).
  • Metrics and ServiceMonitors (K4, 2026-11-14). The chart can make a Prometheus Operator ServiceMonitor (monitoring.coreos.com/v1) for the operator's /metrics (metrics.serviceMonitor.{enabled, interval, labels}) and for the Platform API's (api.metrics.{port, allowFrom, serviceMonitor.{enabled, interval, labels}}): off by default, and then the four goldens are byte for byte what they were. The API's metrics are in §48. The chart exposes the API's metrics port only to the peers of api.metrics.allowFrom (one more ingress rule of its NetworkPolicy, a Service <fullname>-api-metrics of its own, metricsListen in the file, written only while the port is exposed) and refuses a ServiceMonitor whose allowFrom is empty while the NetworkPolicy is on, because the policy would drop the scrape. Proven by render-check.sh (each new check broken on purpose) and kubeconform against a vendored schema; unverified against a real Prometheus.

Releases (AD-070) &ZeroWidthSpace;

Added 2026-11-27 (ANR-1155, AD-070). Development follows main: every green build pushes sha-<7> and bumps the chart in git, as above. A release is a fixed version that production deploys: vX.Y.Z, cut by release-please from the Conventional Commits since the last one, the flow of vaam-apps/vpay.

WhatWhereTags
The operator imageghcr.io/vymalo/another-agentic-platform/operatorX.Y.Z, X.Y (the highest patch); never latest
The Platform API imageghcr.io/vymalo/another-agentic-platform/apiX.Y.Z, X.Y
The operator chartoci://ghcr.io/vymalo/another-agentic-platform/charts/aap-operatorX.Y.Z, with image.tag and api.image.tag X.Y.Z and both digests pinned
The CRDs chartoci://ghcr.io/vymalo/another-agentic-platform/charts/aap-operator-crdsX.Y.Z
  • The version. One for the workspace and both charts (version and appVersion), on the lines marked # x-release-please-version; tools/check-release-version.sh holds them equal (in operator-image.yml's scripts job, and in release.yml against the tag). The manifest starts at 0.1.0, never tagged: the first release is 0.2.0 after a feat, else 0.1.1.
  • The images are the tested ones. The release commit changes Cargo.toml, so operator-image.yml builds it, runs its end-to-ends and pushes sha-<7> like any commit (the binaries then report X.Y.Z). release.yml copies those digests; it builds nothing. Its proofs are a cosign keyless signature, an SPDX SBOM (syft) and a SLSA provenance attestation per digest; the provenance is the release run's, since BuildKit's own attestations exist only for a build.
  • git keeps sha-<7>. deploy/operator/release-pin.sh sets the release's tag and digests in a copy that is packaged, and refuses the file git tracks; bump-tag.sh stays the only writer of the tags in git, and main's bump commit is unchanged. So the chart in git at a release tag still names the sha-<7> of the commit before it, and the published chart names X.Y.Z.
  • The goldens hold still. The chart's labels carry its version (helm.sh/chart, app.kubernetes.io/version), so render-check.sh renders the goldens from a copy at 0.1.0, as it renders the tags at sha-0000000; the markers are comments and change no render (verified 2026-11-27: the renders of both charts at 755872d and with the markers are byte for byte the same, and the goldens pass with every version moved to 0.2.0).
  • For the owner: a GitHub App installed on this repository with contents: write and pull-requests: write, and the secrets RELEASE_PLEASE_APP_CLIENT_ID (its Client ID) and RELEASE_PLEASE_APP_PRIVATE_KEY; until then release-please.yml fails at its first step and nothing is released. The two chart packages are private until made public, as the images were. aapctl has no release: P-041.
  • Unverified until the first tag runs it: the App token and the tag's event, the release pull request's Cargo.lock step, the wait on operator-image.yml (gh run list --commit), the copy on GHCR (--prefer-index=false was verified 2026-11-27 with buildx v0.38.1 against a local registry only), cosign, the SBOM and the attestations pushed to GHCR (push-to-registry) for both images and both charts, helm push to GHCR, and a cluster installing the published chart. A release pull request also needs a body the AI Governance check accepts, which release-please does not write. What CI runs before a tag: the dry run of release.yml on a pull request (the version, the pins, lint, render and package with placeholder digests), release-pin-test.sh and render-check.sh.

Rollout on netcup &ZeroWidthSpace;

Next to the existing charts, one step at a time. The coder stays on its Helm chart until M3.

StepWhat
M0In home-os, an app for the CRDs (project infrastructure, source deploy/operator-crds of this repository, ServerSideApply=true) and an app for the operator (project another-agentic, source deploy/operator, namespace another-agentic-system, with the values of examples/netcup.values.yaml as helm.valuesObject; image.tag is bumped on main by CI and is not set there). Before it: the AWS property agent_registry_token in prod/another-agentic/env (random, at least 32 bytes), and the package ghcr.io/vymalo/another-agentic-platform/operator made public once the first image is pushed (the chart's README, The image)
M1The system chart's registry wiring. The coder stays a static agent: only static agents carry the agent-checks gate in the system, and a registry agent does not
M2A shadow, coder-next, an AgentService of its own with its own CloudNativePG cluster, beside the Helm coder
M3The cutover. Snapshot the work-coder-0 volume. Mark the objects that hold data Prune=false and keep them. The home-os source moves to adam-rs deploy/coder-agent. The operator reports NameConflict until Argo prunes the Helm objects, then creates the StatefulSet coder and reattaches the claim work-coder-0. The Service name and the database are unchanged. No fixed downtime window: made when no run is active (decided in §93, 2026-10-05)
M4The rollback recipe, written with the cutover. Under Retain, deleting the AgentService keeps the volume and the database
M5chat: chat.runtime: agentservice in the system chart
M6Retire deploy/coder and the chat Deployment path

Unverified: that Argo CD leaves the claims of a StatefulSet's volumeClaimTemplates alone when it prunes (M3 depends on it), and that netcup's Kubernetes is 1.37 or newer (the owner's statement of 2026-11-27, AD-067; it was "1.29 or newer" before the floor moved).

Amended 2026-10-05 (the owner's decisions of that day, AD-031, AD-033; §60a):

  • The coder is renamed coder-vymalo at M3, with the same database and the same GitHub App installation, and an alias coder for one release so old threads continue. The StatefulSet, the Service and the registry item are therefore named coder-vymalo, not coder: M3's "the StatefulSet coder" and "the Service name … unchanged" read as coder-vymalo for the first two, and the database is the one that stays. A StatefulSet's claim is named after it, so work-coder-0 is not reattached under the new name by itself; whether the work volume is carried over or a fresh one is accepted is an open question (§93). How the alias is implemented is open there too. coder-me, for the GitHub owner stephane-segning, is a second coder with its own GitHub App, database and A2A token.
  • coder and chat leave GitOps after their cutovers (M3, M5): the Argo applications are removed without cascade and the dashboard adopts the objects (§60a, GitOps and the dashboard). Their configuration then lives only in the cluster, and a backup or export of it is an open question (§93).

Slices &ZeroWidthSpace;

SliceRepositoryWhat
S0platformthis documentation change
S1platformthe workspace, aap-api, crdgen, the examples
S2platformaap-domain with the parity goldens
S3platformthe ports and the testkit
S4platformruntime-kubernetes, with the envtest harness
S5platformthe controller and the operator binary, with secretRef stores
S6platformstore-cnpg
S7platformthe registry
S8platformthe Dockerfile, the chart and operator.yml with the kind end-to-end
S9platformthe kind end-to-end of the coder
S10home-osthe CRD and operator apps
S11adam-rsdeploy/coder-agent
S12systemthe registry values and chat.runtime: agentservice
S13home-osthe shadow coder-next
S14home-osthe coder cutover
S15system and home-osthe chat cutover
S16allretire the old paths

Risks &ZeroWidthSpace;

RiskHandling
adam's env contract is copied into aap-domainParity goldens against adam-rs renders; adam-rs could publish a configuration schema
The cutover collides with the Helm objects, and Argo might prune a volumeNameConflict instead of adoption; Prune=false; a snapshot; the shadow first
The registry deviates from its contract (one bearer, no filtering)Listed above; the consumer fails closed
§38 says the GitHub App key never enters an agent runtime, and the coder holds it in its podAD-024 records the gap; closed by the credential broker (§39)
A secret leaking into an environment, an Event or a logThe conformance test "no secret value ever materialises"
v1alpha1 with no conversion webhookBreaking changes are made before the first deployment is proven; a conversion path comes with v1beta1 (§62)
One replica of the operatorA short reconcile gap on upgrade; agents keep running
A folder over 1 MiB does not fit a ConfigMapA clear ConfigInvalid; an artifact source later
netcup's Kubernetes version and Argo's pruning behaviour are unverifiedChecked in M0 and on the shadow, before M3
kube-rs churnPinned versions; the controller sits behind the ports
A bot pushing tag bumps to this repository's main against its governance checkAllowed by the owner (§93, decided 2026-10-05); the bump commits follow the other repositories'

Facts checked &ZeroWidthSpace;

  • Verified 2026-10-04, adam-rs at 0391809: the variable names, defaults and rules of the table above (bin/adam-coder/README.md, bin/adam-agent/README.md), the chart's pod template, _validate.tpl, network policy and extra MCP file, and the image's two binaries and entrypoint (docker/coder/Dockerfile).
  • Verified 2026-10-04, kube-rs documentation: kube 4.0.0, k8s-openapi 0.28.0, schemars 1.
  • Unverified: CEL rules through x_kube(validation = …); server-side-apply co-ownership of a CloudNativePG Cluster's managed.roles; Argo CD pruning of volumeClaimTemplates claims; netcup's Kubernetes version.

59b. The run pool: pods where work runs &ZeroWidthSpace;

Status: design only, decided by the owner (2026-10-06). Nothing here is built. The owner's decisions are AD-034 to AD-039, AD-043 (containers in a run, below, added 2026-10-06), AD-045 (a replicated volume of a pod's own, added 2026-10-06 after the cluster probes, amended the same day: it is the default) and AD-046 to AD-048 (files and git over exec, a namespace for pods with a daemon, a user namespace for every run pod: decided 2026-10-06); where this section recommends something the owner did not decide, it is a proposal (P-013 to P-015 and P-018, §92) and says so. It extends adam-rs ADR 0019 (verified 2026-10-06, read on adam-rs origin/main), which it does not replace: both modes coexist (Migration).

The examples below keep the object name coder-vymalo, written before the owner renamed the coder Adam on 2026-10-06 (the agent ids become adam-vymalo and adam-me; AD-033, amended). The technical names move at the operator cutover.

Why &ZeroWidthSpace;

Today the coder process makes one pod per run, itself (adam-env-kubernetes, RUN_ENVIRONMENT=kubernetes; ADR 0019). The pod has a 2Gi limit, no owner reference, and a PriorityClass-scoped ResourceQuota is the only cap. To do that the coder's ServiceAccount holds pods create and delete, and a ValidatingAdmissionPolicy is what stops a compromised coder from making a privileged pod. The pod sees the whole work volume, so it is no isolation between runs (ADR 0019, Consequences). The Environment and EnvSession traits it implements are crates/adam-workspace/src/environment.rs in adam-rs (verified 2026-10-06): ensure, release, held_runs, and prepare, kill, secret_ref on the session.

The owner's decisions turn this around: the operator makes and owns the pods, and the coder asks for a slot.

Decisions in one table &ZeroWidthSpace;

#The owner (2026-10-06)BecomesRecord
1The operator, not the coder, creates and owns the pods where work runsPods owned by a RunEnvironment, run under a dedicated ServiceAccount with no token and no RBAC. The coder loses pods/create, keeps pods/execAD-034
2Everything is configurable on that objectThe RunEnvironment spec, belowAD-035
3, 4Pods are reused across runs of one environment; the coder asks for a slot with a RunLeasePooling, bin-packing, reaping, the lease lifecycleAD-036
5Reuse across repos only "if the agent can be modular enough and the files strictly separated; so that one agent cannot read repos it's not supposed to read… So even across the same owner, no"Never across owners; within an owner only with strict per-lease file isolationAD-037, P-013
6A shared RWX volume plus a git clone on leasePod-private directories on one RWX claim; the coder clones into themAD-038
7, 8Seams (AD-020); both modes coexist, per-run stays the defaultPooledEnvironment in adam-rs, the pool logic behind a trait in the platformAD-039
9"Some of those environments need docker; e.g. for building… How do we do?" (later the same day)containers: { mode: None | Build | Engine } on the RunEnvironment: a BuildKit or a Podman sidecar in a user-namespaced podAD-043, AD-047, P-018
10"Also I think we can go with normal RWO volumes too, replicated" (after the cluster probes)storage.mode: PodVolume | SharedClaim: a run pod may have a replicated ReadWriteOnce volume of its own, in addition to the shared claim (made the default by decision 13). Files and git then cross pods/execAD-045, AD-046
11"P-019 is fine" (2026-10-06)Under a pod volume, files and git cross pods/exec as bundles; credentials stay in the coderAD-046
12"go with its own namespace" (2026-10-06)Run pods with a container daemon live in the namespace <coder namespace>-run, at Pod Security privileged, guarded by an admission policy; the operator works in two namespacesAD-047
13"PodVolume should become default" (2026-10-06)storage.mode defaults to PodVolume; SharedClaim stays availableAD-045 (amended)
14Asked whether every run pod should get its own user namespace by default, not only pods with a daemon: "Yes, default on" (2026-10-06)isolation.userNamespace defaults to true; SharedClaim therefore requires falseAD-048

Amends AD-016 for one object: RunLease is a CRD, not an application record. It is one object per run, renewed every renewSeconds (default 60), not per request, which is why etcd carries it; AgentLease (§20) stays a record.

The two kinds &ZeroWidthSpace;

Group agents.vymalo.com, v1alpha1, namespaced, in the same namespace as the coder (a SharedClaim's claim must be in the pods' namespace). Run pods with a container daemon are the exception: they live in a namespace of their own (AD-047, Containers in a run), while the RunEnvironment and every RunLease stay in the coder's. RunEnvironment is not AgentEnvironment (§27, deferred): that describes how an agent's own runtime is built, this is the compute where its work runs. It is not called Environment either, which is adam's trait.

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: RunEnvironment
metadata: { name: coder-vymalo, namespace: another-agentic-system }
spec:
  image:                                  # optional: the operator's default workspace image (a value of its chart, which GitOps sets: AD-029, amended 2026-10-15)
    ref: ghcr.io/vymalo/another-agentic-images/workspace:1.98.1-ee2273e@sha256:9b2670fc45f50b7b7b8f959fe5caa06e630cba86c0229b2a7d33bee7f26d752a
  sizeClass: standard                     # a name of the operator chart's runPodClasses (AD-031)
  pool:
    maxPods: 4                            # hard cap; at most the chart's runPodMaxOrdinal
    minWarm: 1                            # free pods kept ready (bound or not)
    maxLeasesPerPod: 1                    # >1 needs isolation.mode UidPerLease
    idleTTLSeconds: 900                   # a free pod above minWarm is deleted after this
  lease:
    ttlSeconds: 180                       # without renewal, a lease expires
    renewSeconds: 60                      # how often the holder renews (a hint to the holder)
    maxDurationSeconds: 28800             # hard cap, renewed or not
    maxRepos: 8
  isolation:
    mode: PodPerLease                     # PodPerLease (default) | UidPerLease (strict, P-013)
    userNamespace: true                   # default (AD-048); false only with SharedClaim. hostUsers: false; required by UidPerLease
  containers:
    mode: None                            # None (default) | Build | Engine (AD-043); not None requires isolation.userNamespace: true (the default) and storage.mode: PodVolume (the default)
  storage:
    mode: PodVolume                       # PodVolume (default, AD-045 amended) | SharedClaim (AD-038; needs isolation.userNamespace: false)
    mountPath: /work
    podVolume:                            # PodVolume: one ReadWriteOnce claim per run pod, an ephemeral volume of the pod
      storageClassName: longhorn          # replication is the class's (Longhorn replicas)
      size: 20Gi
    # claimName: coder-vymalo-work        # SharedClaim: an existing ReadWriteMany claim the coder mounts too (placement shared)
  scheduling:
    nodeSelector: { kubernetes.io/arch: amd64 }
    tolerations: []
  serviceAccountName: ""                  # empty: the operator makes <env>-run (no token, no Role)
  securityContext: { runAsUser: 10001, runAsGroup: 10001, fsGroup: 10001, seccompProfile: RuntimeDefault }
  network: { denyCIDRs: [], allowCIDRs: [] }   # egress: DNS and the internet minus private ranges, plus these
  requesters:                             # who may lease; enforced by an admission policy the chart renders
    - serviceAccount: coder-vymalo
  deletionPolicy: Retain                  # as AgentService (§59a)
status:
  observedGeneration: 2
  pods: { total: 3, free: 1, leased: 2, starting: 0 }
  leases: { pending: 0, bound: 2 }
  conditions:
    - { type: Ready, status: "True", reason: Reconciled }
    - { type: Saturated, status: "False", reason: CapacityAvailable }
yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: RunLease
metadata:
  name: run-3f9a1c0b27de                 # run-<12 hex of the sha256 of the run id>, as ADR 0019 names pods
  namespace: another-agentic-system
spec:
  environmentRef: { name: coder-vymalo }
  runId: 01J9ZK3QWXJ0V7R2N8S4T5A6BC
  owner: { kind: User, id: 5c1b0e5e-0f3a-4e57-9d1e-2f7a5b7c9a11 }   # User | Org: the identity the work is for (§53), never a GitHub login
  repos:
    - { host: github.com, owner: vymalo, name: another-adam-rs, access: Write }
  holder: { name: coder-vymalo-0, uid: 7c3f1e0a-9d2b-4a61-8e7d-6a1b2c3d4e5f }   # the coder pod now holding it; a worker taking the run over patches it
  renewedAt: "2026-10-06T09:41:12Z"       # written by the holder
status:
  phase: Bound                            # Pending | Bound | Releasing | Expired | Failed | Denied
  podName: coder-vymalo-run-2
  podNamespace: another-agentic-system    # the pod's namespace: the coder's own, or <namespace>-run for a pod with a daemon (AD-047); the holder execs there
  directory: /work/pods/coder-vymalo-run-2-k3x9q/run-3f9a1c0b27de
  uid: null                               # UidPerLease only
  expiresAt: "2026-10-06T09:44:12Z"       # the operator's clock, from when it saw the last renewal
  conditions:
    - { type: Assigned, status: "True", reason: PodAssigned }
    - { type: HolderAlive, status: "True", reason: Renewed }

Who writes what. The holder writes spec (it holds runleases and nothing else: no status), so it cannot forge the pod or the directory it is given. The operator writes status (podNamespace with podName is where the holder execs), and judges liveness by when it last saw renewedAt change, not by comparing the holder's clock to its own.

CEL rules (CRD) and reconciler rules &ZeroWidthSpace;

WhereRule
CELpool.minWarm <= pool.maxPods; pool.maxPods >= 1
CELpool.maxLeasesPerPod == 1 || isolation.mode == 'UidPerLease'; maxLeasesPerPod <= 8
CELisolation.mode == 'UidPerLease' requires isolation.userNamespace == true; PodPerLease requires securityContext.runAsUser > 0
CELisolation.userNamespace == true requires storage.mode == 'PodVolume', and so storage.mode == 'SharedClaim' requires isolation.userNamespace == false (AD-048: the field defaults to true, so an environment that chooses SharedClaim says false and the refusal names the cause) (AD-045: a Longhorn RWX claim cannot be idmapped, verified 2026-10-06 on netcup, Cluster facts below); containers.mode == 'None' || storage.mode == 'PodVolume' (implied by the two rules around it, stated so that the refusal names the cause)
CELcontainers.mode == 'None' || isolation.userNamespace == true (AD-043); containers.mode == 'None' || pool.maxLeasesPerPod == 1 (one daemon is never shared by two leases: it can mount any directory the pod mounts)
CELlease.ttlSeconds in 30..3600; lease.renewSeconds * 2 <= lease.ttlSeconds; lease.maxDurationSeconds >= lease.ttlSeconds; pool.idleTTLSeconds in 60..86400
CELstorage.mode, storage.claimName and storage.mountPath immutable (self == oldSelf); mountPath absolute; storage.mode defaults to PodVolume and isolation.userNamespace to true
CELstorage.podVolume is required if and only if storage.mode == 'PodVolume', and storage.claimName if and only if SharedClaim; podVolume.size is a quantity above zero. A change to podVolume applies to pods made afterwards: an existing volume is not resized
CELrequesters has at least one item (fail closed: nobody may lease an environment that names nobody)
CELsecurityContext.seccompProfile is RuntimeDefault or Localhost; nothing here can add a capability, set privileged, or turn off readOnlyRootFilesystem
CEL, RunLeasespec.environmentRef, spec.runId and spec.owner immutable; spec.repos has at most 16 items and may only grow (oldSelf.all(r, self.exists(x, x == r))); spec.holder.uid may change (adoption by another worker)
Reconciler (ConfigInvalid)sizeClass names a class of runPodClasses; image.ref passes the deployment's registry allow-list (AD-029); for SharedClaim, the claim exists and is ReadWriteMany; for PodVolume, the StorageClass exists; maxPods is at most the chart's runPodMaxOrdinal; a named ServiceAccount exists; for containers.mode != None, the run namespace exists and its admission policy is bound (AD-047)
Reconciler (Denied)the lease's requester is not in requesters; repos exceeds lease.maxRepos; the environment is not Ready

Unverified: that CEL expresses the transition rule on spec.repos and request.userInfo in an admission policy for requesters. Both are proved against a real API server in the kind job (as the S1 note of §59a).

What the operator makes &ZeroWidthSpace;

ObjectNameNotes
Pod<env>-run-<n>, n below maxPods, in the coder's namespace, or in <coder namespace>-run when containers.mode != None (AD-047)A bare pod with a controller ownerReference to the RunEnvironment (controller: true, blockOwnerDeletion: true): deleting the environment collects the pods and fails their leases. Ordinal names are on purpose (P-014); a name still terminating is requeued, not an error
ServiceAccount<env>-runOwned by the environment; automountServiceAccountToken: false; no Role or RoleBinding is ever made for it
NetworkPolicy<env>-runNo ingress; egress from network (the shape of ADR 0019's, OD-K6)
PriorityClass<env>-runValue 0, preemptionPolicy: Never, so the namespace's priority-scoped quota (ADR 0019) still caps the pool
PersistentVolumeClaim<pod name>-work-<suffix>, only for storage.mode: PodVolume (AD-045)Not made by the operator: the pod declares a generic ephemeral volume named work-<suffix> from podVolume (StorageClass, size, ReadWriteOnce), and Kubernetes' ephemeral volume controller makes the claim <pod name>-<volume name>, owned by the pod and deleted with it (stable since v1.23, verified 2026-10-06, the ephemeral-volumes page of kubernetes.io). The random suffix keeps a re-made ordinal from meeting its predecessor's claim while that one is still being deleted (the controller uses only a claim made for this pod). Mounted at <mountPath>/pods/<pod name>-<suffix>, the path of SharedClaim's pod directory

The pod, fixed, not configurable: automountServiceAccountToken: false on the pod too; enableServiceLinks: false; no host network, PID or IPC; not privileged; allowPrivilegeEscalation: false; every capability dropped (UidPerLease adds SETUID, SETGID, CHOWN, FOWNER and nothing more); readOnlyRootFilesystem: true; the only writable paths are the pod's private directory (below) and emptyDir tmpfs mounts for /tmp and $HOME. The init container of ADR 0019 (copies adam-exec and opencode into an emptyDir at /opt/adam/bin) is kept. Annotations: agents.vymalo.com/env-digest (a changed image or class replaces free pods only; a leased pod finishes first), agents.vymalo.com/owner (the binding, below), agents.vymalo.com/dir.

Amended 2026-10-06 (AD-048): with isolation.userNamespace: true, the default, every run pod is made with hostUsers: false, so root inside it is an unprivileged user on the node, in an id range of 65536 of the pod's own (the kubelet's; verified 2026-10-06 on netcup, the probe mapped root to host uid 130154496). That needs storage.mode: PodVolume, the default; SharedClaim cannot (Cluster facts). The floor above is unchanged and still applies to the run container: non-root uid 10001, no capabilities, read-only root.

Amended 2026-10-06 (AD-043, AD-047): with containers.mode other than None, the pod is made in the namespace of its own with hostUsers: false (as every run pod is by default) and gains one sidecar whose security context the operator renders itself; the floor above stays for the run container. See Containers in a run.

Amended 2026-10-06 (AD-045): with storage.mode: PodVolume the pod's private writable path is its own volume (the claim above), not a directory of the shared claim, and the coder does not mount it. See Pod volume: files and git over exec.

The operator's own RBAC grows (§59a The operator chart, "pods for status"): pods create, delete, patch; serviceaccounts, networkpolicies create and patch; persistentvolumeclaims get, list, watch only, to report a claim that does not bind (AD-045: the ephemeral volume controller makes and deletes them); runenvironments and runleases with status and finalizers. The operator works in two namespaces (AD-047): the coder's, and <coder namespace>-run for pods with a daemon, each with a Role of its own, and it watches both. Still namespaced, still no right on Secrets, still no pods/exec.

The coder's RBAC shrinks: runleases (create, get, list, watch, patch, delete) and pods/exec (create, get); in the run namespace of AD-047 it holds only pods/exec (the leases stay in the coder's namespace, and status.podNamespace says where the pod is). No pods create or delete, so the admission policy of ADR 0019 stops being the thing that holds a compromised coder back. pods/exec is limited by resourceNames to the ordinal pod names the chart renders from runPodMaxOrdinal (P-014); unverified that RBAC honours resourceNames on a subresource (the RBAC page of kubernetes.io, read 2026-10-06, does not say, and the answer comes from the kind job). If it does not, the coder can exec into any pod of its namespace, as ADR 0019 already lets it, and that is stated as a risk, not hidden.

The lease &ZeroWidthSpace;

Prose for what they cannot say:

  • Binding to an owner is the pod's, once. A pod serves no lease until it is Free; its first lease sets agents.vymalo.com/owner, and from then on it is offered only to leases of that owner. It is never re-bound; it is reaped. Leases are served in order of creation. When the pool is full and only pods bound to other owners are Free, the operator deletes the longest-idle one to make room.
  • Packing. A lease goes to a pod bound to its owner that has room (most loaded first, so the others go idle and are reaped), then to an unbound Free pod, then to a new pod. With maxLeasesPerPod: 1 this is "reuse after release".
  • Expired and Failed leases stay visible for ten minutes with their reason (the holder reads it), then the operator deletes them. A lease whose holder pod disappeared is Expired only after ttlSeconds unless a worker adopts it first (the run is durable and may move to another worker: it patches spec.holder).
  • Cleaned is the holder's claim, and a bad claim costs only that owner. Anything but a clean release deletes the pod, so a crashed coder never leaves residue for the next lease. Only a wrong "cleaned" can, and it can only reach the same owner's next lease (the binding above).
  • The clone line is both modes'. Under the default PodVolume the clone, the work and the push cross pods/exec as bundles (AD-046), the pod is made with its own volume and takes it with it when it goes (Pod volume: files and git over exec); only SharedClaim clones into a mount the coder shares with the pod.
  • Parking. Under PodVolume, the default, parking is a bundle in the coder's storage (AD-046). Under SharedClaim, a run that waits hours for a person releases its lease; the coder first moves the directory to /work/parked/<run-hash>, a path no run pod mounts, and moves it back into the next lease's directory. This works for a full clone and not for a worktree of a shared mirror, whose .git file holds an absolute path (unverified, git worktree repair aside), so the pool uses full clones. v0 of the pool does not share a mirror (below).

Isolation (AD-037, P-013) &ZeroWidthSpace;

The owner's rule, kept whole: no pod is ever shared across owners. Inside an owner, files of different leases are shared in one pod only if the separation is strict.

What the platform can and cannot do. A pod's mounts are fixed when it is created, so a kubelet mount cannot follow a lease. Strict separation of a reused pod therefore comes from one of two places: the pod's private mount (one lease at a time), or a mechanism inside the pod (a user id or a mount namespace per lease).

A. One lease per pod, pod-private mount (PodPerLease)B. A user id per lease, 0700 directories (UidPerLease)C. A mount namespace per lease, alone
HowThe pod mounts only subPath: pods/<name>-<suffix> of the RWX claim, at /work/pods/<name>-<suffix>; the suffix is random per pod creation, so a re-made ordinal never sees an old directory. The coder mounts the whole claim. Under PodVolume the private mount is the pod's own volume, at the same path, and the coder mounts nothingOne pod, up to maxLeasesPerPod leases, each under its own uid in …/<lease-id> mode 0700, own TMPDIR and HOMEunshare -m per lease and bind-mount its directory
Reads another lease's filesStopped by the kubelet mount: the other directories are not in the podStopped by file modes, unless root or CAP_DAC_OVERRIDEStopped by the path, but not by /proc/<pid>/root or /cwd of a same-uid process (unverified, from proc(5) and ptrace access rules)
Sees or signals another lease's processesStopped (pod PID namespace)Signals and ptrace stopped (other uid); /proc still lists their command lines, and hidepid needs a mount the pod cannot makeNot stopped
NetworkStopped (pod network namespace)Not stopped: one network namespace, so 127.0.0.1 services and abstract unix sockets are sharedNot stopped
Memory, CPU, OOMPer-pod limits per leaseOne lease's build can OOM-kill another'sSame
NeedsNothing special. Under PodVolume it now runs in a user namespace by default (hostUsers: false, AD-048); under SharedClaim it cannot, and runs in the host'sA root-capable helper (SETUID, SETGID) in the pod, so hostUsers: false: stable since Kubernetes v1.36 and needs Linux 6.3 or later, containerd 2.0 or later, and idmap mounts on every volume (verified 2026-10-06, the user-namespaces page of kubernetes.io). It therefore requires storage.mode: PodVolume (AD-045), which is the default: a pod with hostUsers: false cannot mount Longhorn's RWX claim (failed to set MOUNT_ATTR_IDMAP … invalid argument, verified 2026-10-06 on netcup, the owner's probe, consistent with mount_setattr(2), which lists no NFS among the idmap-capable filesystems, https://man7.org/linux/man-pages/man2/mount_setattr.2.html); a Longhorn RWO ext4 volume mounts idmapped. The one PodVolume of a pod is shared by its leases, each in its own 0700 uid directoryCAP_SYS_ADMIN or a user namespace; the default seccomp profile blocks mount and unshare (unverified)
Does not stopResidue between sequential leases (so wipe or delete, above); a kernel escape (the node's kernel is shared by every container); the coder, which sees every directory by designA compromise of the helper (it can become any uid); a kernel escapeMost of it alone
CostA pod per concurrent leasePacks many leases per pod: the cheapestCheap, and weakest alone

Recommendation (P-013): make A the default and the only mode until B is proven. A needs no privilege in the pod, its guarantee is the kubelet's and the kernel's rather than ours, and reuse is sequential reuse after a wipe for the same owner. Ship B as isolation.mode: UidPerLease for density only after the isolation suite passes in the cluster (the testkit's isolation test: a lease tries to read another's files, /proc/<pid>/environ, ptrace it, signal it and reach its 127.0.0.1 port, and each must fail). Treat C as an addition to B (per-lease mount namespace plus uid), never alone. In every mode: never across owners. If the owner wants a fresh pod for every lease (no sequential reuse at all), minWarm spares plus delete-on-release give it; a field for that (recycle: Wipe | Delete) is not in v0 (open question, §93).

Storage and clones (AD-038, SharedClaim) &ZeroWidthSpace;

This subsection is storage.mode: SharedClaim, which is no longer the default (AD-045, amended); the default is Pod volume, below.

text
/work                          the whole RWX claim: the coder mounts it all
├── pods/<name>-<suffix>/      what ONE run pod mounts (and only this), at the same path
│   └── <lease-id>/<repo>/…    a full clone per repo, by the coder, on lease
└── parked/<run-hash>/…        parked runs; no run pod mounts it
  • Paths mean the same in the coder and the pod (adam-rs ADR 0010's rule, kept): the pod's mount path is the claim's path, so the coder's file tools and its git stay where the credentials are, and no credential is in a run pod. The coder clones with a broker grant for that repo and lease (§39a): short-lived, scoped to the repository, never a long-lived key.
  • The agent may clone another repo mid-run into its own lease directory: the coder patches spec.repos (the operator checks only the count; authority is the broker's, which refuses a repo no connection grants, §39a), and clones it. The person's yes for a second repository (the system's workspace-e2e.sh) stays the coder's gate.
  • The claim is Longhorn RWX. Verified 2026-10-06, the owner's probe on netcup: the class serves RWX through an NFS share-manager, and a pod with hostUsers: false cannot mount it (Cluster facts, below). Unverified: its speed for target/ and node_modules (§29); measuring it is the first open question below. A pod's private directory holds builds, so a slow RWX makes slow builds. A PodVolume (AD-045), the default, is one answer; emptyDir for caches with the clone on RWX is not designed here.
  • No shared git mirror or package cache across leases in v0. A mirror that holds repository X would be readable by a lease that was granted only repository Y; a per-owner cache is a later decision (open question).
  • Wipe. The holder wipes at release (above); the coder's janitor removes pods/<dir> of a pod that no longer exists, as it does for held_runs today. The operator never mounts the claim.

Amended 2026-10-06 (the owner: "Also I think we can go with normal RWO volumes too, replicated"; AD-045, AD-046): everything above is storage.mode: SharedClaim. The owner then said "PodVolume should become default": PodVolume is the default and SharedClaim stays available (AD-045, amended). An environment that wants the shared claim names it, and sets isolation.userNamespace: false (AD-048). PodVolume is a ReadWriteOnce volume of the pod's own. The coder cannot mount another pod's RWO volume, so under PodVolume the bullets above that say the coder mounts the claim, clones into it or janitors it do not apply; the next subsection says what replaces them.

Pod volume: files and git over exec (AD-045, AD-046) &ZeroWidthSpace;

The owner, 2026-10-06, after the cluster probes: "Also I think we can go with normal RWO volumes too, replicated." Too: an addition, not a replacement; amended 2026-10-06: the owner then said "PodVolume should become default", so it is the default and SharedClaim is the alternative (AD-045). The reason it is needed is a verified fact: a pod with hostUsers: false cannot mount Longhorn's RWX claim, and a Longhorn RWO ext4 volume mounts idmapped (Cluster facts, below).

What the pod gets. One ReadWriteOnce claim per run pod, a generic ephemeral volume of the pod (What the operator makes): Kubernetes makes it with the pod and deletes it with the pod, and it is mounted where SharedClaim's pod directory would be, so a lease directory has the same path in both modes. Replication is the StorageClass's: the longhorn class has numberOfReplicas: "2" (verified 2026-10-06, the owner's kubectl get sc longhorn -o jsonpath='{.parameters.numberOfReplicas}'), so a PodVolume from it has 2 replicas on netcup. Sequential reuse after a wipe works as before (the holder wipes the lease directory; the pod goes back to Free). A pod deleted for any other reason, an idle reap, a lost lease, a changed env-digest, takes its volume with it, so nothing outlives the pod to be found by another owner. The volume attaches wherever the pod schedules, so it does not pin a pod to a node; how long a Longhorn attach takes when a new pod starts is unverified.

What the coder can no longer do, and what replaces it (AD-046, from P-019). The coder mounts nothing of a PodVolume. Its file tools and its git therefore cross pods/exec, and no credential enters the pod, so P-015 holds unchanged. Decided 2026-10-06 (the owner: "P-019 is fine"): AD-046.

  • Files. The coder's file tools act through the environment session (pods/exec), not through the coder's own filesystem. This is an adam-rs change (What adam-rs must change).
  • Clone. The coder fetches the repository into a bare mirror of its own, with a broker grant for that repository and lease (§39a), makes a git bundle of it and streams the bundle into the pod on stdin of an exec, into a file of the lease directory; git clone (or git fetch) in the pod reads the bundle. The mirror is the coder's, per owner and repository; no run pod sees it, so the objection of Storage and clones to a shared mirror does not apply.
  • Push. The pod writes git bundle create of the branch to stdout, the coder fetches the bundle into its mirror and pushes with a grant. Incremental bundles (^<basis>, the last commit the other side has) keep later transfers small.
  • Image. An image built in the pod reaches the coder as the OCI archive streamed over exec, and the coder pushes it (P-018, amended).
  • Parking. A run that waits hours for a person releases its lease. Before that the coder has the pod commit the work in progress, untracked files included and ignored ones left out, to a private ref (refs/adam/park/<run-hash>), and keeps a bundle of that ref in its own storage. The next lease restores it into a pod, which may be another. Ignored build outputs are rebuilt: that is the price of not copying target/ and node_modules through exec.
  • Unverified: the exact git invocations (git bundle create with ^<basis> and - for stdout, git clone and git fetch from a bundle file, committing untracked files to a private ref through a temporary index), the throughput and the size limits of an exec stream, and what a bundle costs on a large monorepo.

Prose for what they cannot say: the coder's mirror and its parked bundles are the coder's own storage, so a coder that loses them loses only parked runs, never a pushed branch; and under UidPerLease the one volume of a pod holds each lease in its own 0700 uid directory (Isolation).

Containers in a run (AD-043, AD-047, P-018) &ZeroWidthSpace;

The owner, 2026-10-06: "some of those environments need docker; e.g. for building… How do we do?" A run pod holds no container engine, and giving it one is the most dangerous thing a pool can do, so the answer is one field, off by default: containers.mode on the RunEnvironment.

modeWhat the pod getsFor
None (default)Nothing: the pod of the tables aboveMost runs
BuildA BuildKit sidecar. The run reaches it with docker buildx through a socket on an emptyDir shared only inside the pod (a remote builder on that socket; the exact flags are unverified)Building images: docker build, buildx bake
EngineA Podman sidecar serving a Docker-compatible socket on the same kind of emptyDir; privileged only inside the pod's user namespace (below)docker run, compose, Testcontainers, devcontainers

The rules, all of them in code or CEL, none a field:

  • mode != None requires isolation.userNamespace: true (hostUsers: false, the default, AD-048), storage.mode: PodVolume (an RWX claim cannot be mounted in a pod with hostUsers: false, AD-045) and pool.maxLeasesPerPod: 1 (CEL, above). A daemon can bind-mount anything the pod mounts, so it is never shared by two leases; one daemon per pod, and never across owners (AD-037 holds as it did).
  • Never the host's Docker or containerd socket, never a hostPath. Never privileged unless the pod has hostUsers: false: the operator renders the sidecar's security context itself (the floor of What the operator makes is for the run container, which keeps it; the sidecar gets the least its daemon needs). The object cannot loosen it. Verified 2026-10-06 on netcup: both daemons start with privileged: true inside the user namespace, in a namespace whose Pod Security level is privileged. The Pod Security Standards' baseline forbids privileged: true (that hostUsers: false does not relax it is unverified; the probes did not try baseline). So pods with a daemon need a namespace at level privileged, and that level is the namespace's: it applies to every pod there. Decided 2026-10-06 (the owner: "go with its own namespace"; AD-047, from P-018): such run pods live in a namespace of their own (<coder namespace>-run, configurable in the operator chart), at level privileged, where nothing but the operator makes pods, and the chart renders a ValidatingAdmissionPolicy there that admits a pod only if its requester is the operator's ServiceAccount, it has hostUsers: false, and its only privileged container is the sidecar of the chart's pinned image. The coder's namespace keeps its level. The coder's pods/exec and runleases are granted in that namespace too, the operator works in and watches both, and a lease stays in the coder's namespace while its pod is in the other (status.podNamespace). The cost is the second namespace and its policy (the pods/exec risk row names it). Whether a smaller set of capabilities, seccomp and AppArmor than privileged is enough is unverified and decided by the kind job.
  • Build runs BuildKit rootful inside the pod and mapped to an unprivileged host user by the user namespace. Rootless BuildKit cannot run inside a user namespace, so rootful BuildKit mapped to a high uid is the pattern (verified 2026-10-06, https://kubernetes.web.cern.ch/blog/2025/06/19/rootless-container-builds-on-kubernetes/), and Kubernetes' own announcement names "builders like buildkit with hostUsers: false" (verified 2026-10-06, https://kubernetes.io/blog/2026/04/23/kubernetes-v1-36-userns-ga/, user namespaces stable in v1.36). Verified 2026-10-06 on netcup, the owner's probe: moby/buildkit, privileged: true inside the user namespace, --root on an emptyDir, built a two-line Dockerfile and exported an OCI archive.
  • Engine is Podman, the engine adam-rs and the system already chose for a repository's devcontainer: adam-rs ADR 0010 and the system's ADR 0028. There it is one Podman service of the dev stack beside the coder (verified 2026-10-06, both records); here it is a sidecar of each run pod, inside the pod's user namespace, so the devcontainer path of ADR 0010 keeps its socket and changes only where the service runs. Verified 2026-10-06 on netcup: Podman 5.8.7 (quay.io/podman/stable) ran busybox with privileged: true inside the user namespace, storage on an emptyDir, --cgroup-manager=cgroupfs --events-backend=file. That is rootful Podman inside the user namespace, privileged only there and mapped to an unprivileged host uid range; rootless Podman inside the user namespace is unverified, and so is Podman's Docker-compatible API for Testcontainers.
  • Kaniko is not chosen: its original repository was archived in June 2025 and only forks remain (verified 2026-10-06, https://ideas.harness.io/feature-request/p/kaniko-project-is-archived-how-do-we-build-images-in-un-privileged-mode).
  • The sidecar images are values of the operator chart, pinned by tag and digest, like the workspace image. The sidecar's ephemeral-storage and memory come from the size class, and the object has no field for them.

Storage and cache. The daemon's own snapshot store is an emptyDir of the sidecar (verified 2026-10-06 on netcup for both daemons; overlay snapshots on an NFS-backed claim are unverified and probably unsupported, and no such claim is mountable here anyway). The build cache lives on the pod volume or in a registry: docker buildx build --cache-to type=local writes it to the lease directory on the PodVolume (so it is wiped with the lease, and a lost pod or a parked run loses it, AD-046), and type=registry is the way across runs. Across leases there is no shared cache in v0, for the reason of Storage and clones (a cache holds what another lease's repository held); a per-owner one is the existing open question (§93), and a registry cache is per owner and repository.

Credentials and pushes (reconciling P-015). The run pod holds no credential (AD-038), and Build needs none to build: base images from public registries, and the result stays in the pod. To push an image the shape is P-015's: the build writes an OCI archive (--output type=oci,dest=<lease dir>/image.tar) into the lease directory on the pod volume, the coder reads it over pods/exec (the archive streamed on stdout, P-018 amended) and the coder pushes it with a registry grant from the broker (§39a), short-lived and scoped to the repository path, never a long-lived key and never in the pod. Git writes and image pushes are therefore both the coder's. A push from inside the build (buildx --push) or a pull of a private base image needs a credential in the pod; that is a short grant (minutes, one repository path, passed as a buildx --secret from tmpfs and never as an environment variable, an image layer or a file of the claim), and it is the one place this design puts a credential in a run pod. It is proposed, not decided, and off until the owner says (P-018). The broker has no registry connection kind yet (§39a covers code hosts and MCP servers), and which registry and which credential is open (§93).

A pod with a daemon is not reused (P-018). Containers, images, volumes and networks of a daemon are residue that the coder's wipe of a directory does not reach, so in v0 a pod with mode != None is deleted at release, never returned to the pool, and minWarm counts it as a new pod. Reuse, after the isolation suite covers the daemon, is a later decision.

Amended 2026-10-06 after the cluster probes (AD-043, AD-045, AD-047): the sidecar shapes are proven on netcup (Cluster facts, below): BuildKit rootful and Podman, each privileged inside the user namespace and on an emptyDir. What changed: mode != None now requires storage.mode: PodVolume; such pods live in a namespace of their own that allows Pod Security privileged (AD-047; the operator renders the sidecar's context; the run container keeps its floor); the OCI archive is streamed to the coder over exec. Still unverified, and decided in the kind job: Podman's Docker-compatible API for Testcontainers and devcontainers; rootless Podman inside the user namespace; the exact buildx flags.

Cluster facts (verified 2026-10-06) &ZeroWidthSpace;

Verified 2026-10-06, the owner's run of two probe scripts on the netcup cluster. The first five answer the question of §93 Run pool; the probes follow.

FactValue
Nodes5 Talos v1.13.6, Kubernetes v1.36.1, kernel 6.18.38-talos, containerd 2.2.5
User namespacesuser.max_user_namespaces is 15000: no Talos change is needed
CNICilium 1.19.6, which enforces NetworkPolicy
Runtime classesNone: no gVisor, no Kata
AddressesPod CIDR 10.244.0.0/16 (a /24 per node); the kubernetes service is 10.96.0.1
AllocatableAbout 47.75 CPU and 107 GiB memory over the 5 nodes; the control-plane node has about 4 CPU and 7 GiB
StorageClassesOnly longhorn (default, numberOfReplicas: "2") and longhorn-static, both driver.longhorn.io
Probe (a pod with hostUsers: false)Result
1. An emptyDir volumeWorks: root in the pod maps to host uid 130154496, range 65536
2. A Longhorn RWX claim (NFS share-manager)Fails to start: failed to set MOUNT_ATTR_IDMAP on …/volumes/kubernetes.io~csi/pvc-…/mount: invalid argument. Consistent with mount_setattr(2), which does not list NFS among the idmap-capable filesystems (verified 2026-10-06, https://man7.org/linux/man-pages/man2/mount_setattr.2.html)
3. A Longhorn RWO claim (block device, ext4)Works: mounted ext4 (rw,seclabel,relatime,idmapped)
4. Rootful BuildKit (moby/buildkit, privileged: true inside the user namespace, --root on an emptyDir)Works: built a two-line Dockerfile and exported an OCI archive
5. Podman 5.8.7 (quay.io/podman/stable, privileged: true inside the user namespace, storage on an emptyDir, --cgroup-manager=cgroupfs --events-backend=file)Works: ran busybox

Probes 4 and 5 ran in a namespace at Pod Security privileged; baseline was not tried (Containers in a run). Probes 2 and 3 are why AD-045 exists; probe 1 is what AD-048 rests on (a user namespace per pod, with a 65536-id range of its own); probes 4 and 5 are why AD-043's sidecars are offered.

Seams (AD-039, AD-020) &ZeroWidthSpace;

SeamWhereWhat
PoolPlanneraap-domain (pure)plan(&EnvSpec, &Observed, now) -> Plan { assign, create, delete, expire, deny }: the whole pool policy (owner binding, packing, reaping, expiry, denial) with no I/O and no clock of its own
PodProvideraap-ports, implemented by aap-runpool-kubernetescreate(env, NewPod), delete, list(env), watch() over neutral types: no Kubernetes type in a signature
Testkit (aap-ports/testkit)planner_properties!, pod_provider_conformance!, a Memory providerSee the list below

The testkit asserts: never two owners on one pod; never more than maxPods, nor maxLeasesPerPod per pod; reuse before create; a Free pod above minWarm is reaped after idleTTLSeconds and not before; an expired lease frees its slot and deletes the pod; a lease from a requester not listed is Denied; repos over the limit is Denied; no secret value ever materialises in a Plan, a pod spec or a status (as §59a's macro). The Kubernetes provider additionally proves, against a real API server, the owner reference, the ServiceAccount's automount: false, that no Role is made, and (AD-045) that a PodVolume pod's claim is made by the ephemeral volume controller, binds, and goes with the pod. The planner is a pure function, so property tests cover it.

What adam-rs must change (its own ADR, amending 0019; this repository decides nothing there):

  • a new crate, e.g. adam-env-pool, implementing Environment: ensure creates or finds the RunLease and waits for Bound; release cleans, then deletes it; held_runs lists leases by label; prepare and kill reuse the exec client of adam-env-kubernetes (adam-kube-exec);
  • a RUN_ENVIRONMENT value, pool (default stays local, and the per-run value kubernetes stays), with RUN_POOL_ENVIRONMENT (the RunEnvironment name) and the lease timings from the object, not variables;
  • the run's workspace path comes from the lease (status.directory), not from the coder: the coder must lease before it makes the workspace. That changes the order inside ensure. A defaulted method on Environment (say workspace_root) breaks no implementer; a required one would, and adam-rs's Rule 2 says to flag it;
  • pods/exec only in its chart's RBAC, no pods verbs, and runleases (pods/exec also in the run namespace of AD-047, nothing else there); the runPods block's template, quota and admission policy are not used in pool mode;
  • file access through the environment session (pods/exec), not the coder's filesystem, and git by bundles over exec with the coder's own bare mirror, for storage.mode: PodVolume, the default (AD-045, AD-046): SharedClaim keeps the coder's own filesystem and git. A defaulted method again, so that no implementer breaks, and the same flag under adam-rs's Rule 2;
  • the coder's owner: a stable id of the person the run is for, which today's thread-tools grant does not carry (§39a open question).

Migration (AD-039) &ZeroWidthSpace;

StepWhatMode in use
R0This textper-run (ADR 0019)
R1CRD types, planner and testkit in aap-api, aap-domain, aap-portsper-run
R2aap-runpool-kubernetes, the controller, the chart (runPool.enabled: false)per-run
R3adam-rs adam-env-pool and its ADRper-run
R4kind e2e with the isolation suite; a shadow coder on poolper-run for every real coder
R5A coder is switched to pool when the owner decides the proof is enoughpool per coder
R6kubernetes per-run mode is retired only by a new decision

Both modes work in one cluster: they use different pod names, labels, and RBAC, and the pool's PriorityClass is its own. Switching a coder is a value in its AgentConfig plus its RBAC, and rolls back the same way.

Risks &ZeroWidthSpace;

RiskHandling
Longhorn RWX is slow for builds (unverified) and cannot be mounted with hostUsers: false (verified 2026-10-06)Speed is measured before R5; A needs no user namespace; a user namespace (UidPerLease, containers.mode) needs PodVolume (AD-045)
PodVolume: git and files through exec are slower than a shared mount, and it is a new adam-rs seam; a Longhorn attach when a new pod starts adds latency (unverified)It is the default (AD-045, amended; SharedClaim stays available); incremental bundles; the file tools and bundles are adam-rs's change (AD-046); the attach time is measured in the kind job and on netcup
Sequential reuse leaves residueRead-only root, writable paths only the private mount and tmpfs, wipe and kill at release, delete on anything but a clean release
The coder, which mounts everything, is the weak pointAs today; mediation of writes is P-015 (§39a)
pods/exec on any pod of the namespace if resourceNames is not honouredProved in kind; otherwise all run pods move to the namespace of their own (AD-047), which the operator already works in for pods with a daemon
Every run pod in a user namespace (AD-048) needs Kubernetes with user namespaces (stable in v1.36), Linux 6.3 or later and containerd 2.0 or later (Isolation)Verified 2026-10-06 on netcup (Cluster facts); a cluster that lacks them sets userNamespace: false, and then SharedClaim is its only storage
A lease CRD adds etcd writesOne renewal per renewSeconds per active run; open question on the default
The operator now creates podsIts Role is namespaced, no Secrets, no exec; pods are fixed-hardened and the object cannot loosen them
A container daemon in a run pod widens the blast radiusOff by default; userNamespace required by CEL; never the host's socket; one daemon per pod and owner; the pod is deleted at release; its namespace admits only the operator's pods (AD-047); no credential in the pod unless the short grant of P-018 is turned on; the kind job proves the daemon starts and that a build cannot reach another lease's files

59c. Operator increments (kagent-grade minimum) &ZeroWidthSpace;

(2026-11-14, slice K0. Documentation only: it writes the plan down. Each increment is its own slice and amends the section it changes.)

The owner asked what the platform lacks, next to a Kubernetes agent control plane such as kagent, to be one a cluster operator can run. Fifteen gaps were weighed against the code and the decisions on 2026-11-14; they became the sixteen rows below (K0 is this plan, K1b and K9b are the halves of K1 and K9). Amended 2026-11-15: the owner put gVisor back on the plan, and K14 is a seventeenth row (P-040). Some are built, some planned below, and some are deliberately different (What it does not mean). Nothing here changes the architecture: every increment is additive, off by default where it adds a right or a component, and held by a test.

The increments &ZeroWidthSpace;

Progress on 2026-11-15: 8 of 16 increments are built (amended 2026-11-27: 13 of 16 are built, 81 %, as the dated notes below and the table say) (K0, K1, K2, K4, K5, K8, K9 and K9b; K9b is both halves: K9b-1 over the Platform API and K9b-2, the browser sign-in and the refresh token; K1b is void and not counted), 50 % by count, not by effort. It was 8 of 15 (53 %) until the owner added K14 the same day: the count fell because the plan grew, not because anything was undone. What is left, by what it waits for:

Waits forIncrements
Nothing: can startnone (K5 was the last)
A proposal the owner has not decidednone: P-024 to P-027 were accepted on 2026-11-16 (AD-053 to AD-056), so K3, K6, K7, K10 and K11 could start (K3, K6, K7 and K11 are built); K10 adds a server only after the owner accepted its licence
Another repositoryK12 (an adam-rs decision on approvals, and the system's)
A clusterK13, on hold; K14's proof on real nodes (its render, admission and kind proofs need none)

Amended 2026-11-18: K3a and K3b are built (the chart's toolProbe.to, its ports, DNS and deadline, the operator's egress to exactly those peers, and the MCP probe with Reachable and the tool names in the status; AD-053). K3 is built: 9 of 16 increments, 56 %. Amended 2026-11-18 (K6a): the chart's watchNamespaces and its one Role and RoleBinding per namespace are built (AD-055), with the run pods' Role in each and the admission policy's binding over all of them; K6b makes the operator watch every one and lists a shared id for neither; K6 is built: 10 of 16 increments. Amended 2026-11-19 (K7a, AD-057): the LeaderElection seam, aap-leader-kubernetes, the gated passes and the chart's replicas are built. Amended 2026-11-19 (K7b): the kind end-to-end that kills the leader, shows the follower writes nothing and serves the registry, and the graceful release of the lease is built (leader-e2e, which push needs). K7 is built: 11 of 16 increments, 69 %; the end-to-end ran green on 2026-11-19 locally (kindest/node v1.37.0) and in CI (job leader-e2e of run 44458607529 and, at the reviewed head, of run 44460925046, v1.35.8), with the same numbers. Amended 2026-11-19 (K11a, AD-054): harness.type: a2a is built: the CRD types, resolve's one-server workload, the registry card URL from the harness's path, and an a2a agent in namespaces-e2e.sh that becomes Ready and is listed. K11 is built: 12 of 16 increments, 75 %; its kind step is verified 2026-11-19 in job namespaces-e2e of run 44487393662 (job 135436059044). Amended 2026-11-19 (K10a): the owner accepted the three servers' licences and the catalogue's first one is built (the K10 row); K10 is not yet an increment, its kind end-to-end being unbuilt. Amended 2026-11-19 (K14a): the half of K14 that needs no cluster is built (AD-052: the two RuntimeClass values, empty by default with the goldens unmoved, the pod templates of every workload and of run pods, and the admission policy requiring the class once named); K14 stays one of the sixteen until its kind proof (K14b), so the count is unchanged: 12 of 16, 75 %. Amended 2026-11-20 (K14b): the owner closed K14b as the admission half (AD-052): the proof it carries is the rendering and the admission refusals, and a sandbox start under runsc is not proven — measured on a throwaway kind cluster, runsc's device cgroup is refused inside a kind node's cgroup namespace (configuring device cgroup: loading device filter: operation not permitted), and neither spelling of ignore-cgroups reaches the shim. K14 stays one of the sixteen: 12 of 16, 75 %, its gVisor line partial (M10, sys#406), with K14c and K14d planned and the sandbox start still to prove on a node that is not a container. Amended 2026-11-19 (K11b): the second half of K11 is built: the a2a harness is a form of the Platform API (aap-forms' third arm, Option<ModelChoice>, the a2a deployment defaults, kind: a2a in the list, aapctl apply and the OpenAPI document; the D4 note of §60a says it). K11 stays one of the sixteen, now whole: 12 of 16, 75 %. Amended 2026-11-19 (K10b): the catalogue's second server is built (examples/toolproviders/prometheus.yaml, the K10 row), and the catalogue's test now holds each server's allow-list to its own documented tools. Amended 2026-11-19 (K10c): the third is built (examples/toolproviders/github.yaml), with the caller's token named by reference and the server's own --read-only held by a new test. Amended 2026-11-21 (K10's kind end-to-end): the last piece of K10 is built — deploy/operator/tests/e2e/k10-e2e.sh, its job k10-e2e of operator-image.yml (which push does not need), the scripted model k10-model.js with five node --test tests, k10.yaml, k10-support.yaml, k10.values.yaml and three checks of render-check.sh (each broken on purpose). The script applies the catalogue's Kubernetes example as it stands (its namespace and its one cluster-scoped name made the run's), installs the chart with toolProbe on, and runs a folder agent (adam-agent, the coder's pin) whose model asks for kubernetes__pods_list_in_namespace: the provider is Accepted (Valid), Reachable: True (Probed) with the server's 14 tools (pods_list_in_namespace among them), InUse with usedBy: [k10] and AgentsReady: AllReady; the operator's mcp.json holds the provider's URL and exactly its 11 tools, sorted and once each; the tool's answer (the namespace's pods, as the server words them) reaches the model, which answers K10-PROBE <ns> found <pod>; the deletion leaves no object of the service and the provider names no agent; no secret and no panic is in any log. K10 is built: 13 of 16 increments, 81 %. Verified 2026-11-21 by the whole script on a throwaway kind cluster (kindest/node v1.35.8; the operator image made from this tree's binary, a debug build — the release image is CI's — and the coder's pin, the catalogue's image and Postgres pulled by the kubelet), and by the model's node --test and shellcheck; the job k10-e2e is verified 2026-11-23: it succeeded in run 44952786044 (job 136995202517, push, head 4ee28c9, 2026-11-21 21:44–21:48Z).

SliceWhat a cluster operator getsDepends onThe proof it needsState
K0This plannonecheck-docs.mjsbuilt (this section)
K1The CRDs read what adam-rs's former operator accepted (model.extraBody, echoReasoning, coder.maxAccessTier, environment.cache); a cache allow-list and an access-tier ceiling that are the deployment's (AD-049 to AD-051; §59a K1)nonethe superset test against the vendored CRD, parity goldensbuilt
K1bAdoption of objects adam-operator madethe fork decisionnonevoid: adam-rs removed its copy from main by its pull request 143 (its ADR 0046), verified 2026-11-14 with the merge commit e873fa5 of vymalo/another-adam-rs; there is one operator and nothing to adopt
K2status on ModelEndpoint and ToolProvider: who uses it, whether it is valid, whether those agents are Ready (§60a, P-023)nonethe fake API server, the objects suite, render-check.shbuilt
K3A tool server's reachability and discovered tools in its statusK2; AD-053 (was P-024)a stub MCP server in tests; a step of api-e2e.shbuilt (2026-11-18): K3a, the chart's toolProbe.to, ports, timeoutSecs and dns, and the operator's egress to exactly those peers (render-check.sh, each check broken on purpose, the six goldens unmoved); K3b, aap-tool-probe (initialize and tools/list, a JSON or SSE answer, at most 64 names), the Reachable condition and probe.tools in the ToolProvider status, off by default, a server that needs a header Unknown and no Secret read (the crate's stub server and the controller's tests, and api-e2e.sh step 6a with the stub on the runner; the step passed in CI, run 44325222462, job api-e2e 134879022830, at 56fc23e, verified 2026-11-18 in its log: the stub at the runner's address, Reachable True with its three tools, and the header provider Unknown, NeedsHeader)
K4ServiceMonitors for the operator and the Platform API; aap_api_* metrics (§59a The operator chart, §48)nonerender-check.sh, kubeconform on a vendored schemabuilt
K5OpenTelemetry traces from the operator and the API (observability is mandatory, AD-015, §48a). No span holds a prompt, a tool argument, a header, a secret or the subject: a closed enum of attributes, enforced by types and read by assert_clean (P-037 to P-039)none; an agent's own traces need adam-rsa collector in the tests (TestCollector) and the fake API server; render-check.sh for the egress rules; the dependency gatesbuilt (proven by cargo test, render-check.sh with each check broken on purpose, and tools/check-dependencies.sh; the traces step of chain-e2e.sh against a real, pinned OpenTelemetry Collector passed in CI, run 43732918179, job chain-e2e 132871058839, at cd225d2, verified 2026-11-15 in the job's log; the DELETE span and subjects checks added after that run passed on main too (job chain-e2e 140423890548 of run 45973874969 at 36ca2e0, verified 2026-11-27 in the job's log); any other backend and a private CA are unverified)
K6Watching several namespaces, one Role per namespace and never a ClusterRole (AD-055, was P-026)nonetwo namespaces reconciled independently; a duplicate registry id across namespaces not listed; a kind end-to-endK6a built (2026-11-18: the chart's watchNamespaces, one Role and RoleBinding per namespace with today's verbs, the run pods' Role in each and the admission policy's binding over all of them, and the settings, the admission policy and the PriorityClass once; never a ClusterRole; render-check.sh, each new check broken on purpose); K6b built (2026-11-18: the file key watch.namespaces since AD-064, was WATCH_NAMESPACES; one controller and cache set per namespace, every cache synced before /readyz, the registry listing a shared id for neither, the namespaces-e2e kind end-to-end; proven by the fake API server, the registry tests and the operator binary's cluster case, and the kind job namespaces-e2e passed on main, job 140423711831 of run 45973874969 at 36ca2e0, verified 2026-11-27 with gh run view)
K7Leader election and two replicas with a PodDisruptionBudget (amends §59a one replica, Recreate)K6a LeaderElection trait with its conformance macro (AD-020), on the Memory and fake-API-server implementations; kind: kill the leaderbuilt (2026-11-19). K7a: the LeaderElection seam and its conformance, MemoryElection and aap-leader-kubernetes over a Lease, the operator's gated passes, the chart's replicas/rolling update/PodDisruptionBudget/lease rule/election variables and the seventh golden; the six existing goldens unmoved; AD-057. K7b: leader-e2e.sh and the job leader-e2e (verified 2026-11-19 locally and in CI) — two replicas, a SIGKILLed holder replaced only after the lease (15 to 16 s, never before 10 s) with the survivor writing nothing meanwhile while its own registry still lists the fleet, a stopped holder passing the lease to another pod within 10 s, and the leases rule asked of the real API server
K8What the admin UI still needs of the Platform API: an OpenAPI document held equal to the table of routes, and the Kubernetes Events of an agent's objects (P-029; §60a Events and the OpenAPI document)K2a test that lists every route in the document; the new route in the permission matrixbuilt (proven on the Memory ports and the fake API server; the real-cluster half passed in CI: the Events step of api-e2e.sh, job api-e2e 140423890484 of run 45973874969 at 36ca2e0, verified 2026-11-27 in the job's log)
K9aapctl validate and render, offline (§60b, P-028)nonerender_matches_runtime_goldenbuilt (phase 1)
K9baapctl get, apply, delete, export, whoami and login --token-stdin over the Platform API with ETags (K9b-1); login with the browser (OAuth 2.0 authorization code with PKCE on a loopback redirect) and a refresh token (K9b-2; §60b, P-030 to P-036)K8tests on the Memory router; a step of api-e2e.shbuilt, both halves. K9b-1: 29 tests of the binary on the real router over the Memory ports, and the step of api-e2e.sh, which passed in CI. K9b-2: 32 tests of the binary against the testkit's issuer (bin/cli/tests/signin.rs) and 11 of the issuer's own endpoints; a real Keycloak and a real browser are unverified, and api-e2e.sh gains nothing (a headless runner has no browser)
K10A catalogue of example ToolProviders (read-only Kubernetes, Prometheus, GitHub), pinned by digest (AD-056, was P-027)K2; the owner's choicea kind end-to-end: a folder agent on a scripted model calls a list-pods toolK10a, K10b and K10c built (2026-11-19: the licences accepted by the owner. K10a: examples/toolproviders/kubernetes.yaml — the pinned image, read_only = true and the core toolset, the view account, the NetworkPolicy and the ToolProvider's read-only allow-list. K10b: examples/toolproviders/prometheus.yaml — ghcr.io/pab1it0/prometheus-mcp-server:1.4.2 by tag and digest, the HTTP transport, the image's own /health probe, no service account token and no RBAC at all, a NetworkPolicy whose egress is its Prometheus and DNS, and the five query and discovery tools and not health_check — both held by crates/domain/tests/tool_catalogue.rs, which keys its read-only claims by the image the file runs, so a new example cannot borrow another server's list. K10c: examples/toolproviders/github.yaml — ghcr.io/github/github-mcp-server:v2.2.0 by tag and digest, the image's http subcommand with --read-only and --toolsets repos,issues,pull_requests, no credential in the pod at all (the server takes the caller's token from Authorization: Bearer), the token named by reference in the ToolProvider's header, no service account token, TCP probes (the server has no health route), egress to api.github.com on 443 and DNS, and sixteen read tools; the same test also holds that every server is told to refuse its own writes (read_only = true in the Kubernetes server's TOML, --read-only in the GitHub server's args, nothing for the Prometheus one, whose tools all read)); and its kind end-to-end built (2026-11-21): deploy/operator/tests/e2e/k10-e2e.sh applies the Kubernetes example as it stands (the namespace and the cluster-scoped binding's name made the run's), installs the chart with toolProbe on, and runs a folder agent on the coder's pin whose scripted model calls kubernetes__pods_list_in_namespace; the provider is Accepted, Reachable: True (Probed, 14 tools), InUse and AllReady, mcp.json holds exactly the 11 tools of its allow-list, the tool's answer (the namespace's pods) reaches the model and its answer is K10-PROBE <ns> found <pod>, the deletion leaves nothing and no secret or panic is in any log. Verified 2026-11-21 by the whole script on a throwaway kind cluster (v1.35.8) and by node --test, shellcheck and three new render-check.sh checks, each broken on purpose; the job k10-e2e of operator-image.yml (which push does not need) is verified 2026-11-23: it succeeded in run 44952786044 (job 136995202517, push, head 4ee28c9, 2026-11-21 21:44–21:48Z). K10 is built: 13 of 16 increments, 81 %
K11A bring-your-own A2A image: harness.type: a2a with image, port, card path, health path and variables by reference (AD-054, was P-025; amends AD-022 and AD-024)K1kind: the stub image as such an agent, Ready and listedbuilt (2026-11-19, K11a and K11b): the CRD types (Harness.a2a, A2a, A2aEnv; harness.adam and model optional, the latter required of adam-rs by CEL), resolve's one workload (no command, only the declared variables, probes on the health path, no volume, no sidecar), Network::card_path and the registry's card URL, examples/a2a.yaml and an a2a agent in namespaces-e2e.sh (proven by the domain, api, runtime-kubernetes and forms tests, render-check.sh and the docs check; the kind step is verified 2026-11-19 in job namespaces-e2e of run 44487393662 (job 135436059044): the a2a agent gamma became Ready in 6 s with its store, the registry listed it at http://gamma.aap-e2e-ns-a.svc:8080/.well-known/agent-card.json, its container ran the image's entrypoint with exactly its two variables (one literal, one secretKeyRef), no volume and no sidecar, and probed /healthz; the CRDs, with their CEL, were installed on that real API server). K11b (2026-11-19) is the other half: the harness is a form of the Platform API (AgentKindForm::A2a, AgentForm.model an Option, the a2a deployment defaults, kind: a2a in the list, examples/a2a.yaml a form, aapctl apply and the OpenAPI document), so the dashboard can make and edit such an agent instead of showing it as YAML
K12requireApproval per toolan adam-rs decision and the system'sparity with adam's MCP fileplanned; waits (the tiers of K1 cover the coder meanwhile)
K13The dashboard and an agent on the owner's real cluster (D14)K1the first real agenton hold: that the netcup cluster is down and home-os no longer carries it is the owner's statement of 2026-11-14, unverified here; with no cluster to prove it on, D14 stays unverified
K14A sandboxed runtime for run pods and for the agents' own pods: gVisor (AD-052, the owner's decision of 2026-11-16 on P-040). A run pod, which runs the commands of a repository the agent did not write, starts under a RuntimeClass the deployment names (runPods.runtimeClassName; none by default, and then not a trace in any render), and the admission policy refuses a run pod of an agent's account that names another class or none (P-040; §59b; the design's runtimeClass: gvisor of §65). The agents' own pods run under a class of their own (agent.runtimeClassName, the owner's widening), after run pods: the owner fixed the order on 2026-11-24 (AD-052 amended), so agent.runtimeClassName stays empty until a run pod has started under runsc on a real node. ANR-402 (2026-11-25): a size class may name its own class (runPodClasses.<name>.runtimeClassName), replacing the deployment's for that class's pods in the template and in the guard's parameter; the build modes are left alone because coder.runPods has none (a test holds it)D15 (built); P-040the template and the policy's parameters in the parity and render tests; the policy's refusals asked of a bare kube-apiserver; a kind end-to-end with runsc installed in the node (verified 2026-11-26 that a hosted runner can, run 45889453084; limits not enforced under ignore-cgroups); the owner's nodes with Talos's gVisor extensionK14a built (2026-11-19): the two values (empty by default, the seven goldens unmoved), AGENT_RUNTIME_CLASS, Workload::runtime_class_name and RunPods::runtime_class_name (in the digest only when named), the template and the pod templates of the Deployment and the StatefulSet, the policy's tenth rule that requires the class once named with the parameter the operator writes, and the refusals (proven by the domain and runtime tests, render-check.sh with 604 checks and each new check broken on purpose, and the admission cases — asked of a real API server in kind by run-pods-e2e.sh, which runs run-pods-admission.sh against the policy the chart installed (every case as expected, job run-pods-e2e 140423711689 of run 45973874969 at 36ca2e0, verified 2026-11-27 in the job's log)). K14b closed as the admission half (2026-11-20, the owner's decision): the proof it carries is the rendering and the admission refusals, and a sandbox start under runsc is not proven — measured on a throwaway kind cluster, runsc's device cgroup is refused inside a kind node's cgroup namespace (AD-052 has the mechanism). K14c and K14d stay planned, with the coder's git-sandbox, token, egress proxy and store's connections under the class, and the owner's real nodes, still to prove on a node that is not a container; AD-052 decision 3 (the build modes Build/Engine refused with a class) has no field to read in this platform and is not built. Update 2026-11-26 (ANR-404): the 2026-11-26 measure on a container node (a local k3d cluster on a rootless Docker, deploy/operator/tests/e2e/gvisor-k3d.sh) supersedes "a sandbox start under runsc is not proven" for that setup only: a run pod of the operator's template started under runsc and the policy admitted it, with ignore-cgroups in the shim's own file; under that configuration runsc did not enforce the pod's memory or CPU limits (the control, runc, did), so that start is not production-equivalent, and a real node is still unproven. K14b's "closed" status is unchanged, K14c and K14d stay planned, and the numbers, the failing steps and the setup are in the paragraph after the table of K14a ("Measured 2026-11-26 in a local k3d cluster")

Parallel work: K4, K5, K9, K0 and K8's OpenAPI document touch no shared file. K1 and K2 both regenerated deploy/crds, so they merged one after the other. K6 comes before K7 (both touch operator.rs and the Role), K3 and K10 after K2, and K9b after K8.

What it does not mean &ZeroWidthSpace;

"Kagent-grade" is a floor of operability, not a feature list. Each line is a decision already taken.

The platform will notBecause
Ship a permit-all authorizer or an insecure modePermissions are checked by the API and it fails closed (AD-032; §60a D6, D7a)
Link a model-provider SDKModels are replaceable OpenAI-compatible endpoints (AD-018); the harness is adam-rs (AD-022)
Keep sessions, runs or memory in a CRDRuns and leases are application records (AD-016); memory is the agent's and the orchestrator's
Put a sub-agent as a tool in the CRDs, or schedule runs in the operatorThe operator reconciles infrastructure and no workflow (§59, AD-009)
Run a Go, Python, Codex or Claude harnessadam-rs is the harness; OpenCode runs inside adam-coder (AD-022)
Carry an admin UI in this repositoryIt is an area of the system's web (AD-026)
Hold a Secret value in a custom resource, or give the operator RBAC on SecretsA resource names a Secret by reference (AD-024); this is also why K3 cannot send a header's value
Give the operator a ClusterRole by defaultThe cluster-scoped objects are the chart's and the administrator's (§59a The operator chart, P-020); K6 keeps it so
Run an admission webhookCEL and the reconciler cover it, and a webhook needs cert-manager (§59a What v0 leaves out)
Load runtime pluginsImplementations are chosen at build time (AD-020)
Inject credentials in an egress gatewayThe credential broker is the design for that (AD-042, §39a)

Decisions for the owner &ZeroWidthSpace;

Twelve are open, each a P-NNN in §92 (P-028 and P-029, P-030 to P-036 of K9b and P-037 to P-039 of K5, which the slices already proceed on). P-024 to P-027 were accepted by the owner on 2026-11-16 (AD-053 to AD-056), and P-040 of K14 the same day (AD-052). Each is a recommendation that waits for the owner and blocks only the slice named.

PThe questionBlocks
P-024May the operator reach MCP servers to discover their tools? Accepted 2026-11-16 (AD-053)K3
P-025Do we accept an agent image that is not adam-rs? Accepted 2026-11-16 (AD-054)K11
P-026Several namespaces, with one Role in each? Accepted 2026-11-16 (AD-055)K6, K7
P-027Which servers does a tool catalogue ship, and under which licences? Accepted 2026-11-16 (AD-056)K10
P-028aapctl as a binary of this repository (phase 1 is built)K9b
P-029An OpenAPI document and an events route on the Platform APIK8, K9b
P-030A Keycloak public client aapctl for the browser sign-innone (built as recommended; the realm's client is the owner's to make)
P-031Where aapctl keeps the token and the refresh token: a 0600 file, no keyring (differs from AD-044)none (built)
P-032Headless sign-in is a token on stdin or in the environment, no device flownone (built)
P-033aapctl export is for agents onlynone (built)
P-034What aapctl apply means: read first, write nothing when unchanged, refuse a deployment part that differsnone (built)
P-035The exit codes 3, 4 and 5none (built)
P-036What the sign-in asks for and does: no offline_access by default, a refresh on a 401, a revocation on logout, no ID token readnone (built)
P-037A hand-written OTLP/HTTP JSON exporter, explicit spans, no tracing bridge, always compilednone (built)
P-038What a span may hold: no content, no subject, no agent name in the API, no inbound traceparentnone (built)
P-039The chart: off by default, egress only to named peers, headers from a file, otel and api.otelnone (built)

60. UI Architecture &ZeroWidthSpace;

Administrators should not need to touch CRDs.

The beginner UI may expose:

text
Name
Description
Model
Environment
Tools
Responses
A2A
MCP
CPU
Memory
Volumes
Security profile
Scaling
Routes

Advanced mode can expose:

text
View YAML
Export YAML
GitOps configuration
status conditions
revision digest
runtime status

Decision (2026-10-05, AD-025): v0 of this UI is the admin dashboard of §60a: an /admin area of another-agentic-system's chat web over a Platform API that writes AgentService and AgentConfig (AD-026, AD-027). The beginner fields above that v0 has no CRD field for (Responses, MCP exposure, routes) are not shown.


60a. Admin dashboard v0 &ZeroWidthSpace;

Status: decided (2026-10-05); slices D1, D2, D3 and D4 are built (2026-10-15), D5, D6, D7a, D7b1 and D7b2 (2026-10-16) and D13 (2026-10-17), the rest is design only (D8 is built in another-agentic-system). Slice S0 of the dashboard is this text. The decision to build it is AD-025; the owner answered the questions of Dashboard v0 in §93 the same day, and P-007 to P-012 (§92) became AD-026 to AD-031, with the permission model AD-032 and the coders per GitHub owner AD-033. Where the owner changed a recommendation (who may configure agents, who may use an agent, the takeover of coder and chat), the text below is the changed one. The names of the permissions are proposed, not final (§93).

D1 built (2026-10-15): the custom resources of What the custom resources gain, in aap-api: AgentService.spec.access.audience; the namespaced kinds ModelEndpoint and ToolProvider (the v0 subset: mcp: { url, headers, tools, optional }, no status); AgentConfig.spec.model.endpointRef and mcpServers.<n>.providerRef, each exclusive with the inline form by a CEL rule; and environment.image optional. crdgen and the CRDs chart print four CRDs; examples/coder-me.yaml is the example below as objects that reference each other, and examples/invalid/ has one object per CEL rule and per bound of the fields D1 added (48 in all then, 50 since the reasoning fields of ADR 0063: tests/examples.rs fails when a bound has none, and proves each example states the message of its own bound). Proven by cargo test: the generated schema holds every rule and bound, the examples round-trip through the types and lose nothing, each invalid example is refused for the reason it states, the audience reaches no pod (the resolved agent and the digest are equal with any audience), and the parity goldens and the pinned digest did not move. The CEL rules were run against a real API server by hand on 2026-10-15 (a bare kube-apiserver v1.35.8 with etcd 3.6.4, objects created with strict field validation): the four CRDs are admitted, the valid examples are accepted and every invalid example is refused with its stated reason; and the new CRDs applied server-side over the ones of main, with main's coder and chat stored under them, leave those four objects updatable and valid as new objects (kubectl v1.35.8, the steps the kind job now has). The kind job of operator.yml, the pipeline's own proof, is unverified until CI has run it. Nothing resolved a reference at D1 (D2 does, below): aap-domain refused a config that used endpointRef, providerRef or no image with a ConfigInvalid that named the field and said it was D2, so coder-me.yaml was accepted by an API server and blocked by the operator. Where D1 differs from the text below:

  • "Visible characters" is visible ASCII (! to ~, no space, control or non-ASCII character), the stricter reading; confirmed by the owner on 2026-10-15 (^[!-~]+$). The count and the lengths are bounds of the schema; a rule over a list needs them to be priced, and tools.mcpServers gets maxProperties: 32 for the same reason (kube-apiserver refused the CRD without it), the one bound D1 puts on a field that existed (an AgentConfig stored with more than 32 servers would be refused on its next change); the owner confirmed on 2026-10-15 that an agent has at most 32 extra MCP servers, existing configs included. The new kinds are bounded too, and nothing inline is: a title is 1 to 128 characters, a provider's URL 1 to 2048, and the aliases, the allow-list of tools and the headers at most 32 each (values and reasons in the crate's README).
  • Two CEL rules are added that §60a does not list: the fields that an endpoint reference makes optional (baseUrl, apiKeySecretRef, url) were required, and the schema cannot say "required unless", so a rule keeps the guarantee (model is an endpointRef or both inline fields; a server has a url or a providerRef). The message of the BaseUrl rule lost its model. (it is also a ModelEndpoint's).
  • ToolProvider.spec.mcp.optional defaults to false, as the inline field does (the form's "default on" is the form's), and tools has no inline counterpart: D2 decides what the operator does with it and how a server's own optional meets the provider's.
  • The refusal in aap-domain and the rest of the operator were untouched at D1: no controller watched the new kinds, and the operator chart's Role had no verbs on them (D2 changes all three).

D2 built (2026-10-15): the operator resolves the references and the default image. aap-domain (README): resolve and validate take an Externals (the ModelEndpoint and ToolProvider objects the config names, by name, and the operator's default image) and read the references into the config before anything else, so the rest is the code that reads an inline one: an endpoint with the address and key of an inline model gives the same variables, the same MCP file, the same pods and the same digest (tests/references.rs compares whole resolved agents, on both examples, on the §60a example and on every optional case). The crate stays pure: references(config) names what to read, and a composition root reads it. The digest moves with the content of a referent (an address, a key's Secret, a URL, a header, optional, tools) and with the default image of the configs that name none, and not with a title or a list of aliases. A referent that is missing, or in another namespace, is ConfigResolved: False, reason ConfigInvalid, the message naming it (ModelEndpoint "gateway" was not found in namespace …), and nothing is made from half an agent. A referent is checked as the inline form is, each issue naming the referent (ToolProvider websearch spec.mcp.url), and its sentence is the inline form's word for word: parse_http_url (no user name, password or ${VAR} in a provider's URL, no user name or password in an endpoint's), is_http_token, the prefix, the Secret references, plain http against tools.allowInsecureHttp, and the header-variable clash. After review, four more rules: an issue never carries a URL whole (it reaches the status and the Events of every service that uses the object): a refused URL is shown as its scheme and host, *** for a user name and password and /… for the rest (shown_url); a reference's name, and configRef's, must be a DNS-1123 subdomain, or the service is ConfigInvalid naming the field before any request is made with it (the CRD asks for one character only, and a name goes into the path of the GET: bad name failed the pass for good and x?watch=true added a query; not a CRD pattern, which would tighten configRef); an MCP server's name is adam-rs's server_name_ok (at most 64 characters, no __, not ending in _: verified 2026-10-15 by git show at 0391809, identical at 9a1fd4e, not run), because the loader refuses the file of a server named otherwise at every start; and a service blocked by a missing referent (not by an invalid config) is read again in the pending period, 15 s, not the settled 5 minutes, because the two objects of a config are applied one request at a time. aap-controller: a pass reads the referents with get, live, as it reads the config; the controller watches both kinds and maps a change or a deletion to the services that run a config that references the object, through the configs' and the services' caches; an edit rolls the agents that use the object, a deletion makes them ConfigInvalid at once and leaves what runs untouched, and a referent created later unblocks them. The two watches are isolated from the services' own triggers: kube's Controller puts one backoff around all of its triggers, so a kind whose CRD is not installed (or that the Role cannot list) would have delayed every service by a backoff's length, thirty seconds and more (measured 2026-10-15 on the fake, in virtual time: 11 to 16 s for a service that existed at start, 27 to 42 s for one created later); each watch has its own backoff, logs and drops its errors, and finds its kind when the CRD appears. A referent of a kind the cluster does not serve (the API server answers the plain text 404 page not found, which get_opt would call an error and fail the pass for) is ConfigInvalid with a message that says to install the CRDs of deploy/operator-crds, not to create the object. operator run --default-agent-image (DEFAULT_AGENT_IMAGE): a config with no image gets it, in every container that takes the image; with none configured such a config is ConfigInvalid, naming the flag; a new value rolls the agents that name none and no other. The chart (README): Role gains get, list and watch on modelendpoints and toolproviders and no write; defaultAgentImage is rendered as DEFAULT_AGENT_IMAGE and ships the coder image sha-9a1fd4e by tag and digest (sha256:c3c178b7…12b44, verified 2026-10-15, anonymous manifest request to ghcr.io, HTTP 200), the one the kind end-to-end of the coder runs; the chart refuses a value without a tag and a digest, and latest. Proven by cargo test: the parity goldens and the pinned digest of the inline examples did not move; the domain's table tests (22 new cases in tests/references.rs, and the invalid examples of the shared kinds now asked of validate); the reconciler on the Memory ports and the fake API server (a referent created after the config unblocks it, an edit rolls the digest and a title does not, a deletion blocks naming it and the pod spec is what ran, the default image and its bump); the running operator against the fake's list and watch (change, deletion and creation of either kind reconcile the right services, an object nobody references reconciles none); render-check.sh (the Role line by line, the variable, the refusals) and bump-tag-test.sh (the bump leaves defaultAgentImage alone). Each property was broken on purpose and a named test failed (the resolution equivalence in three ways, the referent validation in four, the optional rule in three, the default-image rules in three, the watch mapping in five). The new case of bin/operator/tests/cluster.rs was run by hand against a bare kube-apiserver v1.35.8 and etcd on 2026-10-15 with the test playing the controller manager, with the other twelve: 13 of 13 passed; and, after the review, a case that deletes the two shared CRDs (run alone, AAP_TEST_DROP_SHARED_CRDS=1) passed against a new bare kube-apiserver: a plain service is Ready and follows its config, a service that references the kinds says they are not installed, and it goes Ready once the CRDs and the objects are there (AlwaysAllow authorisation: it proves the reads, the watches, the digest and the block against a real API server, and nothing of the Role). The decisions D2 took, for the owner to confirm:

  • optional: the server is optional when either the agent's entry or the provider says so (agent.optional || provider.optional). The agent's field has a default (false), so a rule cannot tell "absent" from "false"; letting the agent's entry win would make a provider's optional: true unreachable from a plain providerRef, and letting the provider win would let a provider silence an agent that asked for the server to be required. If the owner would rather the agent's entry win, the schema needs the field to have no default, which is a change of D1's.
  • ToolProvider.mcp.tools is mapped, not refused. adam-rs supports a per-server tools allow-list in the file ADAM_EXTRA_MCP_FILE names, which the operator writes (verified 2026-10-15, read with git show at 0391809, the revision of the parity goldens, not run; and kept at 9a1fd4e, the revision of the coder image the chart ships, verified 2026-10-15 with git show and git grep there, not run: four of the five files below are byte-identical at both revisions (git diff --stat 0391809 9a1fd4e over them is empty), raw.tools is read in crates/adam-agent-fs/src/load/mcp.rs and "tools": ["echo"] is in crates/adam-assembly/tests/extra_mcp.rs, which asserts the allow-list applies; bin/adam-agent/README.md changed elsewhere (a hardening bullet, the log filter) and its ADAM_EXTRA_MCP_FILE row, line 174 at 9a1fd4e, still says "Same parser, ${VAR}, tools, optional and policy as mcp.json"): crates/adam-agent-fs/src/schema/mcp.rs (tools: Option<Vec<String>>, "the allow-list of tools (an adam extension); None allows all"), crates/adam-agent-fs/src/load/mcp.rs (each entry must become <server>__<tool>: not empty, not starting with _, ASCII letters, digits, - and _, the name at most 64 characters), bin/adam-agent/README.md ("same parser, ${VAR}, tools, optional and policy as mcp.json"), deploy/coder/templates/_helpers.tpl (coder.extraMcpJson writes tools when the list is not empty) and crates/adam-assembly/tests/extra_mcp.rs (the allow-list applies to the extra file's server). A non-empty list is written as the server's tools, sorted and once each (a set: the order typed must not roll the pods); an empty list writes no key, which is every tool, and is then the inline server; an entry adam would refuse is ConfigInvalid on ToolProvider … spec.mcp.tools[i]. Never ignored. At run time an allow-listed tool the server lacks skips an optional server and stops a required one (adam's rule, from the chart's comment).
  • The header-variable rule is the inline one, for every server of the agent. §60a says "two providers of one agent whose keys have the same name are ConfigInvalid"; D2 reads it as the rule §59a already has: a variable is named by its Secret key, and two headers that want the same variable from different Secrets are refused, the issue naming who wants it. The same Secret and key wanted twice is one variable and is accepted, as it is inline (refusing it would make a provider unusable beside an inline server that shares its Secret). A provider's header and an inline server's clash the same way.
  • The default image is a value of the operator chart with a pin of its own, defaultAgentImage, the chart rendering it as the variable DEFAULT_AGENT_IMAGE (every setting of the chart was an environment variable then; since ANR-962 it is the file's defaults.agentImage, AD-064). The chart ships the pin the end-to-end proves and two tests hold the two equal (render-check.sh, cargo test -p aap-operator --test e2e_fixture). It is not moved by bump-tag.sh, which is the operator's own image.tag and stays the only writer of it (bump-tag-test.sh holds that): the operator's image and the coder's have two release trains. The GitOps repository sets the value to roll every agent that names none onto a new coder; to move the chart's own pin, read the digest from ghcr.io (the README has the request), change it here and in tests/e2e/coder.yaml, and let the end-to-end run. The chart refuses a value without a tag and a digest; the binary refuses white space at start.

Known behaviour, and a question for the owner (not decided): a missing referent delists the agents that use it. A referent that is missing makes every service whose config names it Blocked (ConfigResolved: False, reason ConfigInvalid), and a Blocked service is not listed by the registry (Listed: False, reason ServiceBlocked), so the orchestrator stops offering it, while its pods keep running and still answer a caller that has their card URL and a token. Deleting one ModelEndpoint therefore delists every agent that uses it, at once (a deletion is a trigger), until the object is back; the same holds for a ToolProvider, and for any config that is ConfigInvalid, which is how the registry has worked since S7. The blast radius is new with D2, because one object is now shared by many agents. The alternative is that a service that has run stays listed while a referent is missing and the condition says so, which makes the registry say an agent is there that the operator could not recreate. D2 does not change the behaviour; the owner is asked which one they want (the fifth of D2's decisions to confirm, §93).

Where D2 differs from §60a: (a) the controller reads the referents with get in each pass and not from a reflector (§60a: "through the store it already uses"; the config is read the same way, and the cache is only used to map a referent to services); (b) the default image is "a value of its chart that CI bumps by GitOps" in §60a, and here it is a value of the chart that the GitOps repository sets and that CI's bump does not touch (above); (c) the header-variable sentence is read as above; (d) the doc comments of aap-api that said D2 was future were rewritten and the CRDs regenerated: only description text changed, no schema keyword; (e) ModelEndpoint.baseUrl.value is checked as the inline model.baseUrl.value is (no user name or password; a $ is allowed), not by the Models screen's stricter rule (no query or fragment), which is the form's (D4). Unverified: the Role's verbs on the shared kinds under real RBAC, and the whole chain in kind (the operator-e2e, operator-coder-e2e and kind jobs have not run on this change; the end-to-end asserts the verbs with kubectl auth can-i); that the chart's defaultAgentImage is accepted by an Argo CD Application's helm.valuesObject as written; that Argo CD syncs the CRDs chart before the operator's (the order is the deployment's, the chart READMEs say so: the CRDs first, always, since a D2 operator expects all four; what the operator does when they are not there is above).

D3 built (2026-10-15): the registry publishes the audience. The data path: AgentService.spec.access.audience → aap_ports::DirectoryEntry.audience (a Vec<String>, as the service states it: copied by ReflectorDirectory, [] for an absent list and for an empty one) → aap_registry::document::build, which writes the optional item attribute audience. The contract (agent-registry-v1.md) is edited, not versioned: the Item table, the limits, rule 5, the client-flow diagram, Serving and Versioning say it, a new Audience section holds the shape (at most 32 strings of 1 to 64 visible ASCII characters, or "*" alone), the three cases a server publishes and the consumer's rule as the section above states it, and the header note that waited for D3 is now Amended 2026-10-15 (D3); the contract stays v1, because an optional attribute is additive. The three cases: no audience and an empty one are no attribute (a consumer reads absent, empty and malformed alike, as administrators only, so the document says none of the three); ["*"] is published as it is; values are published as a set, each once, in byte order. Size: the 1 MiB and 500-item limits are measured on the document, so the audience is already inside them: 500 items of 32 values of 64 characters are 1,132,365 bytes and the registry refuses the whole document (503, RegistryFull), never a value; 29 values on each of 500 services fit (1,031,865 bytes) and 30 do not (measured, services named a0 to a499); a test lands a body on exactly 1 MiB, which is accepted, and on one byte more, which is refused. A realistic fleet, one use permission per agent, adds a few dozen bytes per item. Proven by cargo test: a fleet with no audience is byte for byte what it was (the old golden and its ETag did not move; a second golden holds the audiences, the coder's two in an order that is not the published one); the §60a item exactly; none and [] the same bytes; ["*"]; all 24 orders of four values, each said twice, the same body and ETag, and any change of the values another one; the bounds published whole; eight malformed audiences withheld; two property tests (the published audience equals the contract's rule over arbitrary lists, and in any order or said twice it is the same bytes); the router (a reordering is still 304, a change is 200 and a new ETag; audiences that pass 1 MiB are 503 with the flag raised, and cleared once they fit); the controller (the value travelling from the object through the reflector, and through the fake API server's list and watch, as stated); the contract's example, read from the contract, equals its fixture and what the builder writes. The consumer test with the system's parser: the reader vendored at e5da0a4 (2026-10-05, from before the attribute) makes exactly the same list of a document whose items carry audiences as of the same fleet without them, with nothing skipped, and keeps an item whatever its audience member holds (a string, a number, null, an object): it reads only the members it knows and rejects none it does not (verified 2026-10-15, read_item in crates/registry/tests/vendored/consumer_linkset.rs). It is not re-vendored: D8 does that, when the system's parser reads the attribute (re-vendored 2026-10-17 at 8df44c6: D8 built below). Each property was broken on purpose and named tests failed: the attribute dropped (14 tests), the order not normalised (7), an empty list published (9, the old golden among them), the audience put in every pod's environment (the_audience_reaches_no_pod, alone), a directory that sorts (the new testkit case), a mapping that drops it (two controller tests), and the cluster case with the attribute dropped. The registry case of bin/operator/tests/cluster.rs was run on 2026-10-15 against a bare kube-apiserver v1.35.8 and etcd v3.6.4 (the operator's README has the run): a service with ["agent.use:chat", "agent.use:admin"] is listed with ["agent.use:admin", "agent.use:chat"]; the file's other cases passed, one of them in a second run after it failed once on a cold API server (not investigated). The audience reaches no pod: the_audience_reaches_no_pod and the parity goldens did not change. The doc comment of access.audience said it would go to the registry, so the two CRD files are regenerated (one sentence of a description; nothing else in them moves). Unverified: the kind job and the pod part of the registry case have not run; that the deployed orchestrator of another-agentic-system ignores the attribute (the vendored reader at e5da0a4 is the only evidence, and the deployed version is not known to this repository); that D8 reads the contract's malformed as the contract says. Four decisions §60a left open, for the owner to confirm:

  • The values are sorted and de-duplicated, not shown in the stored order. The ETag is strong, a new one makes every reader fetch the document again, and a dashboard that saves the same values in another order, or kubectl apply of the same object written by hand, is not a change; an audience is read as membership, so its order means nothing. Tags keep their order because theirs is a display order. If the owner wants the stored order shown, the ETag follows every reordering.
  • The normalising is the builder's, not the controller's mapping, because the builder writes the bytes and AgentDirectory is a port that any implementation may back.
  • The contract defines "malformed", which the consumer's rule uses and §60a does not define: not an array, an element that is not a string, a string that is not 1 to 64 bytes each in 0x21 to 0x7E, more than 32 distinct values, or "*" beside another distinct value. The array is read as a set, so a repeat is a repeat and ["*", "*"] is ["*"], which is what the builder publishes. It is the CRD's own shape restated, so that a client cannot read ["*", "x"] as "everybody"; the CRD is stricter at one point: it refuses ["*", "*"] too (its rule counts the elements), so only a directory that is not the controller's can hand the builder that list. The CRD refuses all the other malformed lists; a builder fed by another directory withholds them, keeps the item listed (a consumer would read it as none) and says so in Built::audience_withheld and in the log.
  • Vec, not Option, in the neutral type, like tags: the registry does not care about absent versus empty, and the CRD's Option stays the CRD's. It breaks every DirectoryEntry { .. } literal of an implementer (the Memory directory needs nothing, it keeps entries whole). The testkit gains a sixth case, the audience is kept as the service states it, which a directory that sorts or drops it fails.

Where D3 differs from §60a: (a) §60a says "an empty one or a malformed one" without saying what malformed is, and the contract now does (above); (b) §60a says "an array of strings (as tags)", and the values here are a sorted set while tags keep their order (above); (c) the contract's rule gives an administrator no exception for an item with an audience, where one sentence of §60a's page states says an administrator sees every listed agent (the question below).

After review (2026-10-15): the contract's Audience section now states the consumer's rule so that D8 can implement it literally: the audience is read as a set (["*", "*"] is ["*"]; only * beside another distinct value is malformed), a roles claim that is missing, not an array or holding a non-string means no roles, values are compared byte for byte, the value grammar is bytes 0x21 to 0x7E and not a regular expression with $ (which accepts a trailing newline in PCRE, Perl, Python and Java: verified 2026-10-15 by running them), and a name used with the convention agent.use:<name> is at most 54 characters (the dashboard's are at most 40, so values of at most 50). §12b and §59a now name the attribute, and Built is #[non_exhaustive]; the CRDs are regenerated for one sentence of a description.

A question for the owner (not decided): does an administrator see every listed agent, or only the agents whose use permission they hold? The contract takes the second reading: an item whose audience is not none is shown to an administrator only when their roles hold * or one of its values, and "administrators only" is what none means (AD-028: "an agent with no audience is for administrators only"). It follows from what was decided: the orchestrator's check stays "the audience intersects the person's roles", composite roles give people their use permissions (AD-028, AD-032), and no code compares a role name. AD-032 says the admin composite includes every dashboard permission and that agent.use:<name> is not one of them, so an administrator holds an agent's use permission only if the deployment adds it to the administrators' composite, which an administrator makes in Keycloak with the role itself (§93, the question on who makes the role). A sentence in §60a's page states, "an administrator sees every listed agent, AD-028", reads the other way, and AD-028 does not say it. If the owner wants administrators to see every listed agent whatever its audience, the consumer's rule gains "or the person is an administrator" (the contract and D8), and an agent an administrator can see is no longer evidence that anyone else can.

D8 built (2026-10-17, in another-agentic-system): the system's orchestrator enforces audience (its ADR 0045, decision 1; PR #263, main 8df44c6): for an agent the platform registry lists, a person may read or use it only when a role of theirs grants the permission over its id and its audience holds "*" or one of the values of their roles claim; an item with none, [] or a malformed audience is for administrators only. This repository re-vendored its reader at that commit (consumer_linkset.rs, which now parses audience; the changes from upstream, each listed in the file's header and in UPSTREAM, are the definitions of is_valid_agent_id and MAX_AGENT_ID_LEN (private here, pub upstream; the doc comments of both are shorter), of AgentAudience, AudienceRoles and from_values (verbatim, with their unit tests, the contract's malformed vectors), the //! comment as //, and a file-level #![allow(dead_code, clippy::unwrap_used, clippy::expect_used, missing_docs)]) and refreshed the one fixture that comes from the system, its mock registry's agents.json, now four agents with audiences. The round trip is tested: the document the builder publishes reads through that reader as the same audiences (["*"] as everybody, values as the same set whatever their order and repeats, none, [] and an audience the builder withholds as malformed all as administrators only, and never a static one), by an example and two property tests; broken on purpose, they failed (the attribute dropped: 15 tests of the file; only the first value published: 12; a star allowed beside another value: 5; a value of 65 characters allowed: 5; a DEL (0x7F) allowed in a value: 4; published unsorted with repeats: 8, none of them the round trip, since the reader takes a set), verified 2026-10-17 (the crate's README). The D3 test that an old reader makes "exactly the same list" with and without audiences now says "the same list but for the audience", and what D3 left unverified, that D8 reads the contract's malformed as the contract says, is verified for the reader (its vectors, run here, read each malformed shape as none and keep the item), not for the system's use of it. The contract's Versioning sentence about the tested reader was corrected: it now says that the copy vendored since 2026-10-17 is the system's reader of its slice D8 (8df44c6), which parses audience; the consumer's rules (rule 2 and rule 4) are not changed, until the owner decides the question above.

Two differences between the system and the contract, for the owner. Both are in how the system uses the audience, so neither shows in the reader or the round trip, and neither is decided here:

  • Administrators. The system follows its ADR 0045 decision 1.4: a role that holds admin sees and may use every listed agent whatever its audience (still needing a role that grants the permission over the id). The contract's consumer rule 4 says the opposite, and it is unchanged. This is the open question above, does an administrator see every listed agent, or only the agents whose use permission they hold?; the system has taken the first reading for its own deployment, and a deployment that wants the contract's rule gives no role admin there. If the owner answers it, rule 4 or the system's decision 1.4 moves.
  • The roles claim. The contract's rule 2 reads a roles claim with an element that is not a string as no roles at all; the system's reader skips such an element, keeps the strings and reads a claim that is one string as one role. Keycloak's mapper is expected to write arrays of strings, so it shows only for another issuer or a malformed claim (its ADR 0045 marks that unverified on the realm).

D4 built (2026-10-15): the forms, and the two ports the Platform API is generic over. aap-api: permission, the five permissions of AD-032 as compile-time constants (AGENTS_READ, AGENTS_WRITE, MODELS_WRITE, TOOLPROVIDERS_WRITE, SECRETS_PICK, their prefix, ALL and the agent.use:<name> convention), held equal by a test to the two tables of this section. aap-ports (README): AgentObjects (list, get, put and delete an agent, which is an AgentService and its AgentConfig with one ETag made of both resourceVersions; the same four for the two shared kinds; offered_secrets) and Authenticator (a bearer token, or none, to a Principal: the subject and the whole roles claim as a set), each with a Memory implementation and a conformance macro, agent_objects_conformance! (22 cases) and authenticator_conformance! (8), which objects-kubernetes (D5) and auth-oidc (D6) are held to. aap-forms (README), pure: the agent form in two kinds, the model endpoint form and the tool server form, each to and from the custom resources, with the deployment's defaults filled in; the validation of the screens and the operator's rules (aap_domain::validate) with every error named by its form field; the YAML export. Proven by cargo test (68 tests in aap-forms, 30 more in aap-ports' memory suites, 24 in its tests/objects.rs, 4 in aap-api): every form round-trips, as a property over arbitrary forms and deployments, through the objects and through JSON; an object is a form only if the form writes it back unchanged (any one change of a field no form says makes it YAML only and names the field); examples/coder-me.yaml is a form, coder.yaml and chat.yaml are YAML only and say why; a member of a stored spec this version does not know is a reason, found on the raw JSON; no secret value is in a form, in an object or in a YAML export, under arbitrary input (a member that could carry a value is refused at every object of every form, every secret slot takes { secret, key } and nothing else, and every string in the objects and their YAML was given by the form, the deployment or the namespace or is a constant of the schema); every rule of every screen names its field, and an agent the dashboard accepts the operator resolves; the export is a whitelist and a sentinel in status, in the annotations a tool writes and in the rest of metadata never reaches it. The AgentObjects tests also run the suites against stores with a fault (a stale token accepted, a GitOps object written, a referenced object deleted, no label, a value in an offer) and authenticators with one (unavailable keys called invalid, a token in an error), and require the suites to fail. Each property was broken on purpose and named tests failed: a round-trip field dropped (every_form_round_trips and seven more for description; a_form_with_every_optional_field_set_round_trips and the property for createRepoOwners; the model endpoint's models), a literal credential added to the objects (the_objects_hold_only_what_they_were_given among four), the annotation a tool writes kept in the export (four tests, the golden among them), a secret slot that accepts an unknown member (two), the offered-key check off (four), the memory store accepting a write over a GitOps agent or shared object (a_gitops_agent_is_read_and_never_written, a_gitops_config_blocks_the_create_of_its_name, a_gitops_shared_object_is_read_and_never_written), accepting a stale token (a_stale_token_is_refused_and_nothing_changes; on a shared object shared_objects_have_the_same_life), deleting a referenced model or tool server (a_shared_object_that_agents_name_is_not_deleted and a_shared_object_nobody_names_is_deleted), the ETag that ignores the config (three), the ownership rule that ignores Argo CD's annotation (five), an offer that lists the key without the label, unavailable keys called invalid, the re-render of the config left out of load_agent (five), the check for a member the types do not know left out (two), and the deployment part read from the defaults and not from the objects (eleven). Unverified: everything that needs a Kubernetes API server or an issuer, which is D5 and D6: that a server gives a new resourceVersion to an object whose status changed (so the operator's status writes make a token stale), that a server-side apply of an unchanged object keeps it, that the CEL answers of the CRDs map to the FieldError paths aap-forms reads, that the offered keys can be listed from the ExternalSecrets with the right verbs. Decisions D4 took, for the owner to confirm:

  • The port speaks JSON, so aap-ports still depends on nothing of the workspace. A body is the JSON of a spec (serde_json::Value), a name a string, and what the server adds a field of Stored; the typed side is aap-forms'. The alternative, AgentObjects over aap-api's types, is simpler to read and gives the testkit the real types, but it makes aap-ports, and so aap-store-secret and aap-registry, depend on kube; a test holds the testkit's samples to the real CRD types instead (aap-api is a dev-dependency of aap-ports).
  • A save never moves what the person did not edit: an existing agent keeps the deployment part its objects hold, and the defaults fill a new agent. §60a says defaults "are applied when building the CRs"; applying today's defaults at every save would make an unrelated edit move an agent's store (a ledger on another database loses its runs), and refusing the form of any agent that differs from today's defaults would make every agent YAML only after a change of the file. A change of the defaults reaches an existing agent only when the caller gives the form deployment_for again, an explicit action. If the owner wants every save to converge on the defaults, to_resources already takes the deployment as an argument: the API passes deployment_for always, and the store is the field to guard.
  • A form mirrors the objects, including whether a field may be absent (description, audience, workers, prDraft, opencodeModel and image are Options); the screen's defaults ("the audience agent.use:<name>", "OpenCode's model, default the same", optional on) are the client's. A form that wrote an absent field as an empty one would change an object the person did not edit.
  • The ETag of §60a is the resourceVersions as said, so the operator's status writes make it stale and the router answers 412 until the client reads again. The alternative is the two metadata.generations, which only spec changes move; a server takes a resourceVersion as a precondition and, as far as is known, not a generation (unverified), so the check would be a read and a write with a window. If status churn makes 412 common, that is the field to change. Amended 2026-11-14 (K2, P-023): status churn did become one, for the two shared kinds (the operator writes their status after every create and every change), so their token is the kind, the name, the uid, the generation and the owner, and not the resourceVersion; an agent's is unchanged. A change of the spec, an object made again under its name and an adoption by GitOps still make an old token stale. The apply still carries the resourceVersion it read, and when that moved by a status write alone (same uid, spec, labels and annotations) it is repeated once, as an agent's is.
  • A write that names a key that is not offered is a 422, even when the object already held it. A key that stopped being offered must be picked again. The alternative is to accept a key the saved object already holds.
  • A create needs the AgentService to be absent; a dashboard-owned AgentConfig of the name, left by a create that failed halfway, is taken over, and a GitOps one is NotOwned. A replace of an agent that is not there is 404, not 412.
  • The GitHub MCP sidecar is a deployment default (coder.githubMcp), which the list in Deployment defaults above does not name: a coder without it cannot read GitHub (§59a).
  • Which objects are YAML only is decided by a re-render, so a hand-made coder that sets a tunable of the coder (maxCheckCycles, checkTimeoutSecs, workspaceSweepSecs, workspacePlacement), scaling, extraEnv, deletionPolicy: Delete or a non-default interfaces is YAML only. This includes the netcup coder as examples/coder.yaml has it, which the takeover (AD-031, D16) must edit: the tunables are in no form and in no default. The owner decides whether the tunables become deployment defaults.
  • The permission constants are in aap-api, and the table of routes to permissions waits for D7, where each route's test can hold it; the constants and their routes are in aap-api's README.

Where D4 differs from §60a: (a) the Coder screen's run-pod size class has no field, because aap-api has none until adam-rs has it (D15; amended 2026-10-26: D15a added agent.runPodSizeClass); (b) the Agents screen's rows (state, first false condition, In chat) are not built here: they read Stored::status, and the status types are aap-api's; (c) GET /v1/info's offer label and defaults are aap_forms::Defaults, with check() for the API's start; (d) the shared kinds' validation by the operator's rules is asked through a probe agent that names the object (aap-domain has no entry for a referent alone), and the operator's default image, which the API does not know, is a stand-in so that a missing image stays the operator's ConfigInvalid; (e) a PUT with neither If-None-Match nor If-Match has no value in Precondition: the router answers it (the port has no unconditional write); (f) a delete of an agent deletes the config the service names, and the dashboard never shares a config between two services.

After review (2026-10-16): a review of D4 found twenty-five gaps, most of them proved by a mutant that the suites passed. Each was checked against the code before it was changed; one was not a defect (below). The testkit is the contract D5 and D6 are held to, so the new cases matter more than the Memory fixes, and each new case was shown to fail against the mutant that proved its gap (a scratch edit of MemoryObjects, Agent::etag or the writer, restored after; or, where the fault is one a Memory store cannot be made to have, a store with that fault in aap-ports/tests/objects.rs, which is now one test per fault and per call, each required to fail at the assertion that names the call, since a case stops at its first failure). Counts now: 96 tests in aap-forms, 36 in aap-ports' memory suites (28 for AgentObjects, 8 for Authenticator), 56 in its tests/objects.rs.

  • AgentObjects (aap-ports). A refused write changes neither object: said in the contract, held by a case that makes the token stale on the service only and the draft change the config only (and the reverse), and by the stores that write one half and then refuse; D5 must read both objects, dry-run both server-side applies with dryRun=All and each resourceVersion (so a stale token on either and a CEL rule on the service, which would come after the config was applied, are refused while nothing has changed), and only then apply for real; the window that is left (the service changed between the two applies) leaves the config written and answers 412, and a retry takes it over (README of aap-ports). The ETag binds the kind, the name and the version of each object, and MemoryObjects numbers versions per object so that a token that did not bind them would fail the case (an API server's are global, which is why this was invisible); the old token is replayed after a change of only the config and of only the service, by a replace and by a delete. A delete takes the token (delete_agent and delete_shared took Option<&ETag>). An AgentConfig that another AgentService names is never written, taken over or deleted: Referenced { kind: AgentConfig, by } for a replace, a create (also of a config nobody has yet, and the takeover of an orphan) and a delete, which refuses whole; the testkit gained seed_orphan_config, so that the takeover of a dashboard-owned orphan config, documented in D4, is tested. A pair with one GitOps object is GitOps's for a replace and a delete (each of the two objects, each of the two calls); a service with no config is listed and read; no_read_carries_a_secret_value offers a key (it could not fail before); FieldError is { kind, path, message } (D5 produces it; the forms stopped parsing a sentence); OfferedSecret.key is an Option, None being a Secret made with dataFrom, whose keys are typed by hand and accepted when valid, as the text above says (implemented, not recorded as a deviation). The ownership doc now says what Owner::of reads: the dashboard's label and Argo CD's tracking annotation, and not Flux or Argo CD's label tracking.
  • Authenticator. AuthError::Invalid carries InvalidToken, a closed enum (Malformed, BadSignature, UnknownKey, Expired, WrongIssuer, WrongAudience, MissingClaim), not a string; Unavailable keeps its source, and the contract says an implementation must not put the token, a claim or a header in it; the testkit's sentinel token is JWT-shaped (the sentinel as kid, iss, aud, sub and signature, base64url) and the case reads the message, the debug form and the whole chain of sources; Principal lost its Default.
  • The agent's image (aap-forms). §60a says "a reference with a tag or a digest, an allow-list of registries being the deployment's default to set"; aap-domain only refused a space. ImagePolicy refuses a reference that is not one, has no tag and no digest, has userinfo or an @ that is not a digest, or is from a registry not in Defaults.allowedImageRegistries, on the field image, never quoting the reference. The list is the deployment's to set: absent, any registry (the tag or digest is still required); a list, only those; an empty list, none, so no agent may pin its own image (it fails closed, since somebody wrote it).
  • The export. Labels and annotations are filtered by an allow-list (no blacklist remains in the crate): of the labels, the unprefixed ones (the person's, by the convention of Kubernetes), the platform's agents.vymalo.com/… and managed-by when it says the dashboard; of the annotations, only the platform's. And the YAML is written by src/yaml.rs: verified 2026-10-16 by writing them, serde_yaml_ng 0.10.0 emits yes, no, on, off, y, n, Y, N, 12:30, 1_000, 1,000 and 2026-10-16 unquoted, which a YAML 1.1 reader reads as a boolean, an integer or a timestamp. The writer quotes whatever such a reader would read as another type, and anything that starts like a number; it is tested against a separate implementation of the YAML 1.1 resolver, written from the specification's regular expressions (not run through kubectl, go-yaml or Argo CD: unverified).
  • Free text and logs. A header's prefix is a scheme and one space (the inline form takes more; the dashboard is stricter on purpose), and no message quotes it. An address's path is not checked for a secret, and the README says so. The Debug of a form hides the address's userinfo, query and fragment.
  • Shared objects. externals() gives Referents: an object that exists and this version cannot read is not said to be missing. dependents_after(change, agents, referents) asks the operator's rules twice for each agent that names a changed model or tool server, and returns what the change adds (the probe agent that validates a tool server allows plain http, so a tool server made http:// broke its agents unseen). The function is 55 lines, with its tests in crates/forms/tests/dependents.rs; D7 must call it before a shared write and decide between a 422 and a warning.
  • Tests. A field the form always writes cannot be missing from the object (registry.title, github.app.owners); unknown members inside the elements of allowFrom and volumes make the object YAML only. The array branch of collect_dropped was correct; what was missing was a test that fails without it (the finding asked to fix it; the branch already named allowFrom[0].futureField and volumes[0].futureField). The property "the operator resolves what the dashboard accepts" counts the forms it accepted (about 245 of 256) and requires 200, so that it cannot pass because everything was refused, and the generators produce unicode, line breaks and the strings YAML 1.1 reads as another type.

Decisions this review took, for the owner to confirm: (1) DELETE carries If-Match like PUT, so there is no unconditional delete in the port; the alternative is Option<&ETag>, where a client that holds no token deletes whatever is there. (2) An empty allowedImageRegistries forbids every image, an absent one allows any registry; the alternative reads both as "no restriction". (3) The export keeps no annotation of a person and only the unprefixed labels: a note is added in the repository the object goes to; a deployment's own prefixes could be a value of Defaults. (4) A config another service names makes the whole delete 409, and not "delete the service, keep the config", which would leave a dashboard-labelled config that no screen shows. (5) The prefix of a header is a scheme and a space. A question: should dependents_after refuse the write (422, the person edits the agents first) or only warn (the write is made and the agents go ConfigInvalid)? The port can do either; the Platform API (D7) must pick one. Not decided.

D5 built (2026-10-16): AgentObjects on the API server, in aap-objects-kubernetes. Applying: server-side apply under agents.vymalo.com/dashboard with force off; what is applied is the managed-by label, the spec and the version and uid it was read at, and never a status or an annotation; AgentConfig first. Atomicity, as the port's README says: a replace reads both objects and refuses what can be refused from them (the service is there or not, both objects are the dashboard's, no other service names the config, the token), dry-runs both applies (dryRun=All, each with the resourceVersion and the uid it read) and only then applies for real, so a stale token on either object, a field another manager owns and a rule of the CRDs on either body (a CEL rule, a bound, a type) are refused with nothing changed. A delete is dry-run for both objects too, then the service goes with its version and uid, and the config with its uid only (the operator writes a config's status; its version must not strand a config whose service is gone). (Changed by the review below: the config is deleted only once the service is gone, because the operator reads it while it finalizes.) The window that remains (somebody saves the service between the dry runs and the apply of the service) leaves the config written and answers 412, and a retry succeeds: shown on a fake and on a real API server. (Refined by the review below: a move of the service's version alone, which the operator causes, is repeated once and succeeds; every other outcome is told and logged.) What a resourceVersion does in an apply, verified 2026-10-16 on a bare kube-apiserver v1.35.8 with etcd 3.6.4 (Kubernetes documents that PUT and PATCH may be made conditional on it, https://kubernetes.io/docs/reference/using-api/api-concepts/, and says nothing of an apply, so it was observed): a stale one is a 409 Conflict, also when the apply would change nothing and also under a dry run; one named for an object that is not there is ignored and the object is made; a metadata.uid is a 422 for another object and a 409 for none; a delete takes both as preconditions in its body, also with dryRun in the body (with a body the query parameter dryRun is ignored: the first attempt of this slice deleted an object with it). So a create names a version no object has (1), and an object made in the meantime is a 409, never merged into; a replace names the uid it read, and a service deleted in the meantime is a 409, never made again. The answers of the API server are mapped from Status bodies captured from the real thing (20, in tests/fixtures/status), and three are not what the conventions suggest: a body the schema refuses (a type, a field the CRD does not declare, a spec that is not an object) is a 500 from an apply, with no reason and no cause, only failed to create typed patch object (...): .spec.suspend: expected boolean, got ..., which is read as Invalid with its paths (and without the value the server printed); a stale resourceVersion and a field another manager owns are both 409 Conflict, told apart by the FieldManagerConflict cause (Conflict) or its absence (a lost race: the object is read again, and the answer is AlreadyExists, NotFound or PreconditionFailed); a uid is a 422 or a 409. The CEL rules of the CRDs are a 422 with the field they name, which aap-forms maps to a form field. Stored::spec and status are as they were written: the CRDs give a default to many fields and the API server stores them, so a save would show the administrator what they never set, and the conformance suite says the spec is what was written; they are read through metadata.managedFields (a field some manager owns is there, a default is not; a member this version does not know stays, which is why the bodies are read as JSON and not through the types), and a test fails when a CRD gains a keyed list or an atomic map, which that reading does not handle. Offered keys are the data[].secretKey of the external-secrets.io/v1 ExternalSecrets that carry agents.vymalo.com/offer: "true" (v1 is served and stored by the External Secrets Operator v2.11.0, verified 2026-10-16 in its CRD, a pinned copy of which the cluster test installs), dataFrom as the Secret with no key; no Secret is read, and the cluster test runs the whole suite as a user that holds only the Role above. Proven by cargo test (first build: 23 unit tests, 43 on the fake, 3 + 3 on the rights and the CRDs; the counts now are in the review note below): the mapping of the 20 captured bodies and the reading of 3 captured objects; the conformance suite (28) on a fake API server that copies the real behaviour; the dry runs come first and the config before the service; every apply names the version and the uid read and a create names the version nobody has; every apply is the label and the spec and nothing else, never forced; every refusal makes no write at all (a CEL rule of either body, a type, a stale token on either object, a field another manager owns); the window; a create over a service made meanwhile; a replace over one deleted meanwhile; no Secret is read; the verbs of the crate, derived from every request of the suite, are equal to the Role and to the README. Run against a real API server on 2026-10-16: the 44 cases of tests/cluster.rs (the 28 of the suite, and 16 of what only a server shows, the window among them through a client that lets an administrator get in first) passed against a bare kube-apiserver v1.35.8 and etcd 3.6.4 started by hand with --authorization-mode=RBAC, twice: as the administrator, and as a ServiceAccount that holds only the Role (AAP_TEST_REQUIRE_CLUSTER=1, four test threads, as the CI job). That also verifies what D4 listed as unverified: a status write by the operator gives an object a new resourceVersion (so it makes a client's token stale and the router's 412 will be common), an apply of an unchanged object keeps it, the CEL answers map to the FieldError paths the forms read, and the offered keys can be listed with list on externalsecrets alone. Each property was broken on purpose and named tests failed, on the fake and on the real server: the resourceVersion dropped (a_create_never_merges_into_a_service_made_between_the_read_and_the_apply and when_the_service_changes_between_the_two_applies_... on both, every_apply_names_the_version_and_the_uid_... on the fake), the uid dropped (a_replace_never_brings_back_a_service_deleted_... on both), the dry runs skipped so that the config is applied before a refused service (a_refusal_makes_no_write_of_any_kind, a_replace_is_two_dry_runs_... on the fake; a_field_another_manager_owns_is_a_conflict_that_changes_neither_object and a_body_the_schema_refuses_... on the server), the ownership check skipped (four cases of the suite, a_gitops_agent_is_read_and_never_written, a_gitops_config_blocks_the_create_of_its_name, a_gitops_shared_object_is_read_and_never_written and a_pair_with_one_gitops_object_is_gitops, on both), force on every apply (what_is_written_is_the_label_and_the_spec_and_nothing_else, a_create_never_merges_... and the conflict case), a Secret read (nothing_reads_a_secret_..., the two rights tests, and under the Role three cases of the suite: a 403), and the defaults not hidden (nine tests of the fake suite, two unit tests and eight cases on the server). Unverified: the objects-kubernetes job of operator.yml (the pipeline's own run, on kind, with the ServiceAccount made by kubectl create token: its steps were replayed by hand against the bare API server, except the CA from certificate-authority-data); an operator that writes the status while the dashboard writes (only a second manager stands for it); an External Secrets Operator that reconciles the ExternalSecrets (only the CRD is installed, and the offer reads objects, not Secrets); Argo CD (a second manager with its tracking annotation stands for it); how a service that the operator is deleting (a finalizer that has not run) looks to the dashboard. Decisions D5 took, for the owner to confirm:

  • Stored::spec and status are as written, not as stored. The alternative, the object with the defaults of the schema, is simpler and shows everything, and makes the conformance suite's the spec is what was written false against a real server (the suite would have to compare modulo defaults, which is a change of the testkit and not D5's to make). The reading through managedFields is exact for a server-side apply (the dashboard's, Argo CD's) and shows the defaults of an object made by an update (kubectl create), which owns what it caused.
  • A create names the version 1 to turn an apply into "only if absent". The API server ignores the version of an object that is not there; it is the behaviour of v1.35.8 and not documented (that the version is cleared before a write, whatever the store, is a belief from memory of the apiserver code, unverified), so a_create_names_a_version_no_object_has_and_never_merges_into_one pins it on every bump of the cluster's version. The alternative is a read and an apply, which merges into an object made in the meantime and, if it had no dashboard label, takes it.
  • 401 and 403 are Unavailable (503), as in the other providers: an RBAC rule that has not propagated is retried like an outage. A Role that lacks create makes every create a 503; tests/rbac.rs is what keeps D7's Role and the crate in step.
  • A cluster without the External Secrets Operator offers nothing (an empty list), not an error: the offer is opt-in by label, and an Unavailable would call a state of the deployment an outage and take GET /v1/secret-keys down. The alternative is Unavailable, which tells the administrator why the picker is empty.
  • Invalid lists every mistake that can be found: when the draft has one of its own (the config named is not the agent's), the bodies are also dry-run, without a version, to add the server's.
  • The config is deleted with its uid only, after the service with its version and uid; the dry runs check both versions first. The alternative, the config's version too, would leave a config behind whenever the operator writes its status between the two deletes.
  • A name that is not a DNS-1123 subdomain never reaches a request path (a read is None, a delete NotFound, a write Invalid at metadata.name), because the name is put into the path and x?watch=true would be a query.

A question for the owner (not decided; the port part is answered by the review below, which gave Stored the field): Stored has no deletion timestamp, so a service that the operator is deleting (its finalizer runs until the volumes and the database are released) is listed and read as it is, with the operator's status, until it goes; a create of its name is AlreadyExists meanwhile. Should the dashboard show it as Deleting? It needs one field in the port.

Where D5 differs from §60a: (a) the Role is smaller (above); (b) "typed aap-api resources" are used for the group, version, kind and plural only, and a body is read as JSON, because the types drop a member they do not know and the forms need it; (c) the optimistic check is not only "resourceVersion in the apply patch where Kubernetes supports it": it is also the uid, the create's version, the dry runs and the comparison with the token, for the reasons above; (d) the answers of the CRDs' rules are a 422, and a body the schema refuses is a 500, which §60a's "CEL rules come back as 422" does not say.

After review of D5 (2026-10-16): a review found one defect that could lose data, seven others and some nits, and reproduced each. Each was checked against the code before it was changed, and each new test was shown to fail against the mutant that proved its gap (a scratch edit of the crate, restored after; on the fake, and on a bare kube-apiserver v1.35.8 where the case also runs there). Counts now: 29 unit tests, 64 on the fake (33 of the suite), 56 on a real API server (33 of the suite, 23 of what only a server shows), 3 on the rights, 4 on the CRDs (one of them holds the finalizer the harness plays equal to the operator's); 33 cases per AgentObjects suite (89 in aap-ports' tests/memory.rs, 65 in its tests/objects.rs); 29 captured Status bodies; 34 in aap-controller's tests/reconcile.rs.

  • Blocking (M1): a delete could lose data. delete_agent deleted the AgentConfig one round trip after the AgentService, while the service was still Terminating on the operator's finalizer. The operator's cleanup re-applies the current objects before it deletes the compute, so that "Delete -> Retain must not lose data", but only when the config resolves; a config it cannot read leaves the policy it remembers standing, Delete. A person who saved Retain and deleted before the operator reconciled therefore lost the volumes and the database. Reproduced two ways: a_policy_changed_just_before_the_delete_is_the_one_honoured of the controller fails ("data not kept") when the config goes right after the service, and on the real API server the service stayed Terminating with no config, a put_agent meanwhile re-created one, and delete_agent then called the leftover NotFound. Fixed in the port, its testkit, the memory adapter and the Kubernetes adapter: (1) the port knows an agent that is being deleted: Stored::deleting (the deletionTimestamp), Agent::deleting(), and the new ObjectsError::Deleting { kind, name } (409, class Conflict: read again later) for a replace of one, a create over its name and a write that finds an object begin to be deleted between the read and the apply; a deleting agent is still listed and read, with the operator's status. (2) A delete returns once the service is gone or is being deleted, and the config goes when the service is gone: the dry runs, then the service, then a GET of it every few milliseconds for at most DELETE_WAIT (5 s: the operator's reconcile starts at once from its watch and releases the compute and a database in one pass, against an HTTP request that a person waits for behind proxies that cut it off after tens of seconds, and a page that asks again every 2 seconds; a choice, not a measurement), then the services are listed again and the config is deleted by its uid. When the operator is not done in time the delete returns Ok, the agent is deleting, and the config stays. (3) Orphans: a dashboard-owned config that no service names (what that leaves, what a create that failed halfway leaves) is listed by the new list_orphans with the token a delete_agent of its name takes, and a delete of a name whose service is absent deletes that config on its own token (NotFound when there is neither); a GitOps config (NotOwned) and a config that any service names (Referenced) are never deleted that way. This is the smaller of the ways (the other, a half-agent with service: None in list_agents, would make every reader of an agent handle a half that has no service). (4) The services are listed again right before the config is deleted, so a service made while the delete waited keeps its config; a window of one request remains (a service made between that list and the DELETE loses its config, and the operator reports it ConfigNotFound), and it needs a GitOps tool to name the config of an agent that is being deleted, in that second. (5) Finalizers in the tests: the fake API server has them (259f6e7: a delete of an object that has some answers the object with a deletionTimestamp, moves its version and generation and keeps it until the last is removed; an apply of such an object is accepted: all observed on the v1.35.8, and asserted against both by tests/support/facts.rs), and three scenarios run by the same code on the fake and on the real server: the config stays and every write is Deleting until the finalizer is removed (and the policy the person saved is the one in the service the operator reads), a delete the operator finishes in time removes the config, a service made meanwhile that names the config keeps it. The harness plays the operator with the administrator's client, so the crate's Role is unchanged. Shown to fail against the old immediate delete: four tests on the fake and the same four on the real server; against a delete that does not wait, two; against one that does not list again, one; against one that accepts a write to a deleting agent, two (each the same on the real server; and the testkit's a_deleting_agent_refuses_a_write in aap-ports, with one faulty store per property: a store that hides deleting, writes to a deleting agent, deletes the config at once, lists no orphan, lists a GitOps config as one, deletes an orphan on a stale token, deletes a GitOps config or one that a service names). The controller has the premise as a test: a_config_that_is_gone_when_the_finalizer_runs_leaves_the_remembered_policy_standing, which fails the day the operator no longer needs the config, so that this crate's rule can be looked at then. The testkit has 33 cases (28 before: five new) and agent_objects_cases! is the one list of them.
  • m1: a half-written replace. When the service apply failed after the config apply had succeeded (a 409, a 5xx, a timeout, a field conflict) the config stayed written with no word, and the operator itself races here: a config change makes it write the service's status, which gives the service a new resourceVersion between the two applies (and so does it when it puts its finalizer on). A 409 about the version of an object that was read is now looked into once: the object is read again, and when it is the same object (the uid), not being deleted, with the same spec, labels and annotations, the apply is repeated with the version it has now; otherwise PreconditionFailed (NotFound or AlreadyExists for the service itself, Deleting if it began to be deleted). Every outcome is in the crate README, its state diagram and the port's contract, and each has a test on the fake (the status and the finalizer: the save succeeds; a label, an annotation, a field of the spec: 412 with the config written; a 503: Unavailable with the config written and a retry that succeeds; a field another manager took: Conflict, and the retry is refused by the dry run until they let go; a service that began to be deleted: Deleting); the first runs on the real server too. A half-write is logged at warn (namespace, name, written, failed and a fixed outcome: names and kinds, never a value of the draft and never the server's words; a test looks for the draft's values and the server's words in the log and finds none). Shown to fail against a mutant that does not repeat (fake and real server), one that compares only the spec, and one that compares no label or annotation.
  • m3: two rules without a test. lost_race treats only the primary kind (the service, a shared object) as AlreadyExists and NotFound: a config made or deleted between the read and its apply is a stale token, PreconditionFailed, and not an agent that exists or is missing (two tests; both fail against a mutant that makes every kind primary). The swallow branch of the config delete (NotFound and PreconditionFailed are the agent gone, which is what was asked) has two tests, a config that goes before its delete and one that is made again by somebody else (left alone, with another uid), and a third for the orphan that goes first (NotFound, which is not swallowed); each fails against the mutant that removes the branch.
  • m5: the mapping of the API server's answers. From bodies captured on the v1.35.8 (nine new, in tests/fixtures/status): an admission webhook that denies (admission webhook "<name>" denied the request[: <why>], a 400 when the webhook chose no code, a 403 when it did) and a ValidatingAdmissionPolicy that denies (a 403, or the 422 the policy chose) are Invalid, one FieldError at spec (the body as a whole, a form-level error) in the server's words; 413 and the 500s of etcd (etcdserver: request is too large) and of the API server's client of etcd (trying to send message larger than max) are Invalid too, the person's body; a webhook that cannot be reached (failed calling webhook, a 500) stays Unavailable; a webhook that does not support a dry run (a 400, from the source: admissionregistration.k8s.io/v1 accepts no sideEffects that would make a webhook say it, so it could not be captured) is Internal: the dashboard cannot write atomically through it, a retry will not help and the person cannot fix it. 401 and 403 stay Unavailable (the captured RBAC 403 is a test), and ObjectsError::Unavailable does not say which it was, so D7's router must log the source. One test per case, each failing against the mutant that breaks it (the denial taken for an outage, the size taken for an outage, a refusal to dry-run taken for a denial). The webhook text is from k8s.io/apiserver v0.35.8 (pkg/admission/plugin/webhook/errors/statuserror.go, verified 2026-10-16, fetched and read).
  • m6: the fake and NEVER. The fake ran the resourceVersion check before the schema and the CEL refusals, and its POST did not store the defaults, unlike the real server; 259f6e7 copies the real order (the schema's 500, the fields another manager owns, the version, the uid, the rules) and the defaults, and the three facts are asserted against both the fake and the real server. NEVER = "1" is pinned on v1.35.8 only: the crate documentation, the README and a comment say so, and the real-server test asserts that no object has that version.
  • m7: Stored::spec hides a default, and it is persisted. If a CRD later changes a default, the objects made before keep the old one in etcd, and the dashboard shows neither (not in the form, not in the export; a save does not name the field). Stated in the crate README and in stored.rs. It is the consequence of the decision above, not a new one.
  • Nits. The module header of failure.rs cited a tests/status.rs that does not exist (its tests are in the file). tests/rbac.rs and the README said "the whole conformance suite" and ran 14 of 28 cases: it now runs every case, through agent_objects_cases!. The README counted 20 Status bodies and one of them, unserved-kind.404.txt, was read by no test: it is read by the fake and a unit test, and one test now fails when a body is read by none. The Kubernetes documentation quotes of the crate documentation are marked: the API concepts page and the server-side apply page were fetched and read on 2026-10-16 (verified: a client that needs to detect lost updates should make its request conditional on the resourceVersion, "either HTTP PUT or HTTP PATCH"; the page does not say what an apply does with one; create is needed to create with a server-side apply). Cargo.lock gained tracing and tracing-subscriber on aap-objects-kubernetes (the log of a half-write and its test; both were in the lock already, for the operator), and the forms' test support builds Stored with the new field.
  • Now verified (it was unverified above): how a service that the operator is deleting looks to the dashboard, on a real API server with real finalizers (a bare kube-apiserver honours them on custom resources; the harness plays the operator). Still unverified: that 5 s is long enough for the real operator's cleanup (the reconcile's time was not measured, and the wait does not need it to be: a delete that outwaits it still succeeds and leaves an orphan), and the kind job.

Decisions this review took, for the owner to confirm: (1) the wait is 5 s and an operator that is slower leaves an orphan config (the alternative is to wait for the operator with no bound, which holds a worker and an HTTP request, or never to wait and always leave the config to a later delete by name); (2) orphans are cleaned by a delete of the config's name, on its own token (the alternative is a half-agent with service: None in the list, or the operator deleting a dashboard-owned config that no service names); (3) a save over a service whose only change since the read is the operator's status or finalizer goes through (the alternative, 412 for any change of the version, makes every save race the operator); (4) a webhook's or a policy's denial reaches the person in the cluster administrator's own words, at spec; (5) Deleting is its own error, 409, class Conflict, and not Conflict or PreconditionFailed (the person should read again later, not resolve a field). Questions (not decided): who deletes an orphan, a person from a list of leftovers (a screen in D7 or later) or the operator (it would need the right to delete configs, which it does not have)? And does the dashboard show Deleting, with the operator's status, for the seconds an agent takes to go?

D6 built (2026-10-16): the Authenticator of the Platform API, in aap-auth-oidc: another-agentic-system's orch-auth-jwt (ADR 0033 there), ported with its tests, without DPoP and without the user and e-mail claims (the platform's Principal is the subject and the permissions). What it checks, in this order: a token over 16 KiB is refused unread; one that is not three base64url parts of JSON, or whose alg is not RS256, RS384, ES256 or EdDSA (none, the HMAC family, RS512, PS*, ES384 are refused whatever key they name), ends before any key is looked at, with no request to the issuer; the keys are the JWKS keys of the token's kid and of the algorithm's kind, every one of them tried (a key never verifies another family; a JWKS key that cannot verify is skipped, never an error for the rest; no kid takes the one key of its kind); then the signature, and only then, in this order, exp required and not past, nbf honoured (60 s of leeway for both), iss one text equal to the configured issuer, one of the configured audiences in aud, sub required, not blank and without a control character; the permissions are the values at the dotted path rolesClaim (a claim whose own name has dots is found by that name first, a list gives its texts, a text is one, anything else is none, and a bad roles claim never refuses a token). The key cache is the system's: fetched on first use and by ready(), refreshed at 10 minutes, fetched again for an unknown kid at most once in 30 s whatever the number of tokens, not again for 5 s after a failure, one fetch at a time, on a task of its own and with no lock held across it, a copy older than 10 minutes served at once while it is refreshed, a copy that keeps verifying for an hour past its refresh while the issuer is down and then fails closed (Unavailable, 503, never a 401); the keys come from jwksUrl or from the discovery document, whose issuer must be the configured one (OpenID Connect Discovery 1.0, 4.3, verified 2026-10-16, https://openid.net/specs/openid-connect-discovery-1_0.html, which also says a terminating / of the issuer is removed before /.well-known/openid-configuration is appended), a redirect is never followed, a body over 1 MiB is refused, a request times out at 5 s. What an error holds: a refusal is one word of InvalidToken; the source of an Unavailable is the crate's own KeysUnavailable, over a FetchFailure that is a closed set of words and one status code, because no request carries anything of a token; the transport's own message goes to the debug log and nowhere else, without the URL. OidcConfig (issuer, audiences, rolesClaim, optional jwksUrl, camelCase, an unknown key is an error, no default for the roles claim) is what D7's YAML file reads and OidcAuthenticator::new validates; the intervals are Tuning, not in the file. The feature testkit is an issuer on a local port (TestIdp: discovery, JWKS, RSA, P-256 and Ed25519 keys made at run time, tokens signed as a case says, the forged ones included) and TestAuthenticator, which is an AuthenticatorUnderTest (D7's router tests get tokens for people who hold the permissions a case needs). Dependencies (verified 2026-10-16 by reading jsonwebtoken 11.1.0 as downloaded and the crates.io index entry of reqwest 0.12.28): jsonwebtoken has two backends, aws_lc_rs and rust_crypto, and no ring; the workspace's TLS is rustls with ring (kube), so JWS is checked by aws-lc-rs as in the system and TLS stays single: reqwest is 0.12 with rustls-tls-native-roots (rustls with ring; 0.13's rustls feature is aws-lc-rs and would put two providers in rustls). cargo tree -p aap-auth-oidc -e normal shows ring (rustls), aws-lc-rs (jsonwebtoken) and openssl-probe (a helper of rustls-native-certs, not OpenSSL), and no openssl; bin/operator does not depend on the crate, so the operator's image is unchanged. Proven by cargo test (76 tests when D6 was built, 101 after the review below; over real HTTP against issuers on local ports): the port's authenticator_conformance! (8); every word of InvalidToken produced by the token that deserves it, each algorithm accepted, alg: none, HS256 signed with the RSA public key and the other algorithms refused with no fetch, another key's signature under a published kid, a payload edited after signing, an unknown kid, no kid, exp past (beyond and within the leeway), nbf, iss, aud (text, list, several configured), sub, a token of exactly 16 KiB accepted and one step more refused, garbage, the roles claim in every shape (30); rotation (a rotated key found, a withdrawn key lost at the refresh), an unknown kid is one fetch for a flood and none within 30 s, the issuer down at the start and recovering, the stale copy and its grace, one fetch for 24 concurrent first requests, a discovery document for another issuer or without a usable jwks_uri, a redirect never followed, an answer over 1 MiB, not a key set, no usable key, unusable keys beside good ones (20); the sentinel in every place a token has something to leak, in the message, the debug form and the chain of sources, and in everything logged (3); the YAML and what construction refuses (4); unit tests of the key choice, the claims and the jwks_uri rule (11). Each check was broken on purpose and named tests failed (41 scratch edits, one at a time, restored after; the first run of the log mutant passed and showed that tracing caches a callsite that another test of the same binary hit first with no subscriber, so that test is now a binary of its own): the algorithm allow-list off (algorithms_that_are_not_allowed_are_refused_unread, hs256_signed_with_a_public_key_is_refused_as_an_algorithm_that_is_not_accepted), the key-family check off (four), the signature not verified (eleven), aud not validated or not required (one_of_the_audiences_must_be_in_aud), iss not validated or not required (the_issuer_must_match_exactly), exp not validated or not required (a_token_past_its_exp_is_expired_beyond_the_leeway_of_60_seconds, exp_is_required_and_must_be_a_time), nbf not validated, the leeway 0 or an hour, iat required (iat_is_not_required), the refetch for an unknown kid not rate limited or never made (an_unknown_kid_fetches_the_keys_again_once_and_no_more_within_the_interval, a_rotated_key_is_found_once_published), an unknown kid with the issuer down called invalid (an_unknown_kid_while_the_issuer_cannot_be_reached_is_unavailable_and_not_a_refusal), a stale copy that verifies for ever or never (keys_that_cannot_be_refreshed_go_on_verifying_for_the_grace_and_no_longer), a failed fetch retried at once (a_failed_fetch_is_not_repeated_within_the_retry_interval), no single flight (concurrent_first_requests_make_one_fetch), the roles claim's exact name not tried first (ten), a bad roles claim that refuses the token (a_bad_roles_claim_is_no_permission_and_never_refuses_the_token), a text that is not a role, a list item that is not text refusing, sub not required, the kid in the source of an Unavailable (ten tests, the port suite's an_error_does_not_carry_the_token among them) and in a log (nothing_the_authenticator_logs_holds_a_token_or_a_claim), unavailable keys called an invalid token (eleven, the port suite's keys_that_cannot_be_fetched_are_unavailable_not_invalid among them), the discovery issuer not compared, redirects followed, the body not capped, the token not capped (a_token_of_16_kib_is_read_and_one_byte_more_is_not), an empty token not Missing (the port suite's no_token_is_missing_whatever_the_state_of_the_keys), nbf and a bad signature and a missing aud given another word, a JWKS key for encryption used, an RSA key under 2048 bits used, an unusable key spoiling the set, no kid taking any key, ready() that does not fetch. Run once by hand, not a test of the repository (it needs the network): against Google's issuer, https://accounts.google.com, on 2026-10-16 through the sandbox's HTTPS_PROXY and CA bundle, the discovery document and the JWKS were fetched over TLS (rustls with ring, native roots), the document's issuer matched, the real RS256 keys were read, and a token with an unknown kid was refused as UnknownKey; so the TLS path, the proxy variable and a real issuer's JWKS are verified, a Keycloak's are not. Unverified: that Keycloak's User Client Role mapper puts the composite-expanded client roles in agentic_roles (§60a, Permissions and roles; the plan was to try it before the API is built, and it is still to be tried on the realm, D14), a Keycloak's JWKS (its use, alg and kid) and discovery document, the mapping of the reasons to the API's status codes and problem details (D7), a run of the crate in CI (aws-lc-sys builds from C: it did here on stable and 1.94.1, and ubuntu-latest has a compiler), and the 5 s timeout and the HTTP(S)_PROXY variable beyond the one request above. Decisions D6 took, for the owner to confirm:

  • iat is not required. §60a names exp only; the system's orchestrator requires exp and iat. A token without iat is accepted. If the owner wants the system's rule, it is one line in verify and one case.
  • A token that carries cnf is accepted as a plain bearer, and there is no DPoP. The system's web holds DPoP-bound tokens (its ADR 0054) and its orchestrator checks the proof when auth.dpop is on; §60a says the API checks a token "as the orchestrator does" and names no proof of possession. A thief who has a bound token can use it here. The owner decides whether the Platform API must require proof of possession; it would be a slice of its own (the proof's checks, a replay cache, the public origins of the API behind the edge, and the Tauri and web clients sending the proof).
  • nbf in the future is InvalidToken::Expired. The closed set has no word for "not valid yet", and the caller's remedy is the same, another token; the doc of Expired in aap-ports now says so. If the owner wants a word of its own, NotYetValid is a variant added to the port: every host and store compiles against the enum (that is its purpose), and ALL and as_str change.
  • An unknown kid while the issuer cannot be reached is Unavailable (KeysUnavailable::Unrefreshed), not UnknownKey. The system's orchestrator refuses the token; here a person whose good token was signed with a key the issuer published a minute ago would be told it is bad and sign in again for nothing, which is what the port's Unavailable forbids. A key that is unknown while the last fetch succeeded is still UnknownKey.
  • A missing iss is WrongIssuer and a missing aud is WrongAudience; MissingClaim is for sub and exp, the two claims the port names. The alternative is MissingClaim for all four. A claim of the wrong shape that the library cannot read past (exp, nbf or sub as a list or an object) is Malformed, one it can (exp as text) is MissingClaim.
  • JWS is aws-lc-rs and TLS is ring, so a binary that links the crate has both libraries; rustls has only ring in its features (above). The alternative is jsonwebtoken's rust_crypto backend, which is pure Rust and brings no second native library, and costs the testkit its fast RSA keys (generating and signing with RSA keys in the pure-Rust rsa crate in a debug build is slow, not measured here, and the testkit signs hundreds of tokens) and gives the tree the rsa crate. reqwest is pinned to 0.12 on the same ground; moving to 0.13 is a change of the TLS provider of the process, not of this crate.
  • The configuration has no default roles claim and refuses an unknown key, so that a misspelt audiences does not leave the API on a default, and the issuer, the JWKS URL and the audiences are compared as written (white space around them is refused at construction, since the URL parser would drop it and iss would never match).
  • A copy of the keys older than the refresh interval is served at once while a refresh runs in the background (added by the review, below). A request waits for a refresh only when there is no copy that can verify, or when its token names a kid the copy lacks. The cost: a key the issuer withdrew keeps verifying until the refresh that follows is over, and a request that comes after a long quiet is verified against the copy it finds, up to 70 minutes old (10 minutes and the hour of grace). The alternative is to wait for the refresh, with which a slow issuer holds up every request and a hanging one holds them for the timeout.
  • iss must be one text equal to the configured issuer (added by the review). A list that holds it is WrongIssuer: jsonwebtoken accepts any match, so a token that named another issuer beside ours passed. aud is checked here too (a text, or a list of texts, one of the configured audiences among them).
  • A sub that is blank, or has a control character, is MissingClaim (added by the review); any other text is kept byte for byte. The alternative is any non-empty text.

A question for the owner (not decided): should the Platform API require proof of possession (DPoP) for the tokens the web sends it, as the orchestrator can? The second decision above is the cost of saying no: a bound token works as a bearer; the cost of saying yes is the slice above and every client of the API signing a proof.

Where D6 differs from §60a: (a) §60a says "keys that cannot be fetched are 503"; they are, and so is a token whose key the copy lacks while the keys cannot be fetched (above); (b) §60a says nothing of sub or nbf: sub is required and nbf honoured, as in the system; (c) "the values of the configured claim" is a dotted path (agentic_roles is a flat claim, realm_access.roles a nested one), as in the system; (d) the mapping to 401, 403 and 503, and the problem details, are D7's: this crate returns the port's AuthError.

After review of D6 (2026-10-16): a review found one major defect, several others and some nits, and reproduced each. Each was checked against the code before it was changed, and each fix is proven by a test that failed on the previous code (named below; run against the code before the fix, none left behind as a mutant). Counts now: 101 tests in the crate (76 before): 15 unit (11), 8 of the port's authenticator_conformance!, 32 in tests/checks.rs (30), 21 in tests/jwks.rs (20), 7 in tests/keys.rs, 10 in tests/slow.rs, 1 in tests/provider.rs, 2 in tests/secrets.rs, 1 in tests/logs.rs and 4 in tests/config.rs.

  • Major: the lock was held across the fetch of the keys, and every request took it first. One token with an invented kid, with the issuer slow, stalled every request (2.8 s for a good token behind a JWKS that took 3 s), and a request that was dropped during a fetch had spent the 30 s budget of an unknown kid without the new keys being recorded. A fetch now runs on a task of its own, one at a time; the lock is held to read or to change the state and never across a request to the issuer. No copy, or one past the grace: the request waits for the fetch and fails closed. A fresh copy: it waits for nothing. A copy older than 10 minutes and within the grace is served at once and refreshed in the background (the first of the three decisions above marked as added by the review). An unknown kid starts or joins a fetch and only that request waits. A request that is dropped leaves the fetch running, and the keys it brings are recorded. ready() returns at once while a copy can verify. Tests of tests/slow.rs that failed on the previous code: a_good_token_is_answered_while_an_unknown_kid_fetch_to_a_slow_issuer_is_running (2.49 s), a_stale_copy_is_served_at_once_and_refreshed_in_the_background_once (3.0 s with the issuer hanging), ready_returns_at_once_while_a_copy_can_verify_and_waits_when_there_is_none (0.8 s), a_request_cancelled_during_a_slow_fetch_does_not_lose_the_keys_it_asked_for and an_unknown_kid_joins_the_refresh_of_a_stale_copy_that_is_already_running. The timeout of each request to the issuer, which no test touched, is pinned (a discovery never answered, a JWKS never answered after a good discovery, a body that drips in: each FetchFailure::Timeout after the configured time); the behaviour was right.
  • A key that is valid could be skipped, and a key that is not could be admitted. The size checks stripped leading zero octets before counting, so an Ed25519 key whose public key starts with a zero octet (about one in 256) was counted 31 and skipped, and every token it signed was UnknownKey; RSA integers and P-256 coordinates with a leading zero, cut below 32 octets or covered by a sign byte were admitted and never verified (BadSignature). An Ed25519 key is now exactly 32 raw octets; RSA n and e and the P-256 coordinates are read without their leading zeros and given to the library normalised (each coordinate left-padded to 32 octets, refused over 32 or empty). 5 of the 6 first tests of tests/keys.rs (real keys, as issuers write them), 2 unit tests and the log of a set with no usable key failed on the previous code. The size check was ported from the system's orch-auth-jwt, which has the Ed25519 defect too (verified 2026-10-16: another-agentic-system orchestrator/crates/auth-jwt/src/keys.rs at 4527a9e, lines 108 and 153, the same skip_while and != 32; a finding to carry to that repository, which this change does not touch). The fetch also logs how many keys it skipped and how many are usable, at debug, counts only.
  • No crypto provider was installed. jsonwebtoken picks its backend from its features only when exactly one of aws_lc_rs and rust_crypto is enabled; with two, as in a binary that links another crate using the other (the Platform API will), the first verification panics. The constructor installs aws-lc-rs once per process and ignores "already installed"; the dev-dependencies of the crate link both backends, so every test runs in that situation, and tests/provider.rs is the case on its own (without the install every verification of every test panicked).
  • iss as a list was accepted; a blank sub was accepted; the word depended on a hash set. The library accepts a list that holds the issuer, so a token that named another issuer beside ours passed; iss and aud are checked here now (the decisions above), and sub blank after trimming, or with a control character, is MissingClaim. With several claims missing the word came from the iteration order of a set inside the library and could change from one request to the next; the order is exp, iss, aud, sub, every time. The 60 s leeway was untested: it is pinned at 55 s (accepted) and 65 s (refused) for exp and nbf. Failed on the previous code: tests/checks.rs a_sub_that_is_blank_or_holds_a_control_character_is_a_missing_claim, when_several_required_claims_are_missing_the_word_is_always_the_same, the_issuer_must_match_exactly (a list that holds the issuer), and the leeway cases of a_token_past_its_exp_is_expired_beyond_the_leeway_of_60_seconds and a_token_before_its_nbf_is_refused_beyond_the_leeway_of_60_seconds (with LEEWAY_SECS at 30 the 55 s cases fail, at 120 the 65 s cases).
  • Two keys under one kid verified only for the first. The key selection took the first key of the token's kind and kid, so a JWKS that holds two (a rotation that kept the name, two sets merged) refused every token the second signed. Every key of that kid and kind is tried now and the token is good if one signed it; only a bad signature moves on to the next, and a token with no kid still needs exactly one key of its kind. Failed before: tests/keys.rs every_key_of_a_shared_kid_is_tried_and_not_only_the_first (BadSignature for the second key's token).
  • All the trailing slashes of the issuer were removed to find the discovery document; OpenID Connect Discovery 1.0, 4 removes a terminating /, one. Failed before: tests/jwks.rs only_one_terminating_slash_of_the_issuer_is_removed_to_find_the_discovery_document (two slashes asked for /.well-known/... instead of //.well-known/...).
  • A URL was in a debug log. The line for a failed request printed the reqwest error, which writes the whole URL, query included, and a jwksUrl is the operator's own and may carry a secret (?key=...). The error is logged without_url(); every other tracing call of the crate holds a closed word or a count. An issuer (or a jwksUrl) over plain http is now warned about once at construction, in a line that names no URL (not a refusal: a Keycloak in the cluster is often reached that way on purpose). Failed before, in tests/logs.rs nothing_the_authenticator_logs_holds_a_token_or_a_claim: one warning for an http issuer (0 lines), and the secret of a jwksUrl in the log of a connection that fails.
  • Hermeticity. Two clients the tests built for themselves (tests/jwks.rs, tests/logs.rs) read the proxy variables; the authenticator under test never did (Tuning::use_system_proxy is false in the tests and the testkit). Every client takes no proxy now, and the suite passes with HTTP_PROXY and HTTPS_PROXY set to a closed port and no NO_PROXY (run 2026-10-16). Production is unchanged and honours the proxy: an identity provider on a private address is reached through it unless NO_PROXY names it, which a deployment that sets a proxy must do (the crate's README says so).
  • Nits. RUSTDOCFLAGS='-D warnings' cargo doc failed on a redundant explicit link and passes; three statements of tests/checks.rs that existed only to use imports are gone and the imports are fixed; the README's diagrams, counts and the roles-claim section follow the code (the unknown-kid branch redoes discovery when there is no jwksUrl, a copy another request has already replaced is used at once, the claim order, one terminating slash, duplicate kids, the http warning, the test files; and that a key which itself contains a dot below the top level of the roles path cannot be named, beyond the rule that the exact name is tried first, as in the system).

Decisions this review took, for the owner to confirm: (1) a copy older than the refresh interval is served at once, so a withdrawn key may verify for the time of one refresh and a request after a quiet period is verified against a copy up to 70 minutes old; (2) iss must be one text equal to the issuer; (3) a sub that is blank or has a control character is MissingClaim; (4) plain http is warned about and allowed. All four are in the decision list above except the last, which is a log line. Still unverified: a CI run of the crate after these changes (aws-lc-sys and the second backend build from C and Rust), and everything the D6 note lists as unverified.

D7a built (2026-10-16): the Platform API's router and its binary: aap-platform-api (package aap-platform-api) and aap-api-server (package aap-api-server, binary api, as bin/operator is package aap-operator, binary operator). D7 is two pull requests: D7a is these two, D7b is the image, its CI build, the chart's api component and the kind end-to-end. The router is generic over AgentObjects and Authenticator and names no implementation. Every route of Routes is under /v1 and is built from one table, ROUTES (method, template, the permission of The permission of each route as a constant of aap_api::permission, and whether the body may name a secret key); one layer over the whole router, applied last (after review: it was a route_layer, which does not cover what is added after it), reads it by the template that matched, authenticates the bearer token and checks the one permission, so a handler never decides who may call it, and a route that is not in the table is a 500 and is never served, however it was added (nothing matched is 404 and a method the table lacks is 405, each answered before a token is asked for). The scheme of Authorization is case-insensitive and anything else is no credential (401, WWW-Authenticate: Bearer, plus error="invalid_token" for a token that does not verify, RFC 6750 §3); two Authorization headers are 400; keys that cannot be fetched are 503, never 401; a token without the permission is 403 whose problem detail, and WWW-Authenticate: Bearer error="insufficient_scope", scope=…, name that permission and no other; a write whose form names a secret key (names_a_secret, not a scan of the text) also needs platform:secrets.pick. Every error is a problem detail (RFC 9457, application/problem+json, type a URN): a 422 carries errors: [{ field, message }] with the form fields aap-forms names (the API server's own Invalid answers are mapped by from_object_errors), a 409 for a shared object that agents name carries agents, and a 400 for a body that is not a form names a member and quotes no value (serde_json's sentences quote them). PUT takes If-None-Match: * (create, 201, Location) or If-Match (replace, 200) and answers the new ETag; DELETE takes If-Match; the ETag is the port's token as a strong entity-tag (a byte an entity-tag may not hold is written %XX), and a weak tag never matches. A replace of an agent reads it first, so that the answers come in the order a person can act on: not yours (GitOps), being deleted, stale (412), YAML only, and only then the form's own errors; the deployment part of the objects it read is what the save writes back (D4's decision, held by a test that changes the router's defaults between the create and the save), and today's defaults fill a new agent. A write to a shared object asks dependents_after of every agent that names it and refuses what the operator would refuse in them. GET /v1/info is version, namespace, offerLabel, defaults (the deployment's defaults as the forms show them), runPodSizeClasses (empty until adam-rs has them, D15) and limits; GET /v1/agents/{name}/yaml is aap_forms::export_agent as application/yaml; CORS is tower-http's layer over exact origins (a wildcard, null, anything that is not an origin as a browser writes it and, after review, the default port of the scheme, which a browser leaves out, are refused when the list is read), GET, PUT, DELETE, OPTIONS, the request headers authorization, content-type, if-match and if-none-match, etag exposed, max-age 600, no credentials, and no list is no CORS; every answer is no-store and nosniff (after review, a preflight too). The log is one event per request in a span with the method, the route template, the subject, the status and the latency, and never the token, a header, a body, a name from the path or a secret key. The binary reads one YAML file (--config, API_CONFIG_FILE; an unknown key refused at every level (after review: the CRD types below defaults deny nothing, so the file is compared with what they write back, and defaults.allowedImageRegistries is required); oidc, cors.allowedOrigins and defaults validated at load, --check does only that, with no cluster), composes aap-objects-kubernetes and aap-auth-oidc, serves the API on listen and /healthz and /readyz on healthListen (the flags --listen and --health-addr win over the file), and on SIGTERM or SIGINT turns /readyz to 503, closes the API's port, lets the requests in flight finish for at most 25 s and then closes the health port. /readyz asks the authenticator's ready() (which answers at once while a copy of the keys can verify) and a list of one ModelEndpoint (after review; before, of all of them), which needs the API's own rights in its namespace, and keeps the answer for 5 s. Proven by cargo test (80 tests in aap-platform-api, 17 in aap-api-server when built; 108 and 27 after the review; loopback only): the route-by-permission matrix (a second, hand-written copy of this section's table must equal ROUTES, and each of the 16 routes is asked with no token, a token that does not verify, every permission but the needed one (403 naming that one only), none at all, and the needed one; .route( appears in the source once, in the loop over the table; a route outside the table is refused in a unit test); the ETag round trip, 412 after a save and after the operator's status write, 428, a weak tag, 409 for exists, GitOps, referenced (with the agents), being deleted and YAML only, 422 with form fields, 415, 413 by Content-Length and by the bytes read, 400 with no value quoted (sentinels), 503 from the objects and from the keys; secrets.pick for an agent, a model and a tool server; a change that breaks the agents that name a tool server; preflights from listed and unlisted origins; a real signed token over the router (aap-auth-oidc's testkit issuer: every reason for a 401, keys down is 503); the log of requests with a sentinel token, secret key, value, path and title holds none of them (a test binary of its own, as D6's); and, in aap-api-server, the example file is parsed and holds no secret, every kind of bad file is refused naming the setting, and the router comes up on a real socket with the Memory ports and over a real issuer, answers, and stops when told. Each check was broken on purpose and a named test failed (33 scratch edits, one at a time, restored after; none committed): the permission check removed, a route's permission changed in the table, secrets.pick not required for an agent and for a shared write, a PUT with no precondition taken for a create, a DELETE with no If-Match accepted, a weak tag accepted, the stale tag checked after the form, CORS answering any origin and a wildcard accepted at config time, NotOwned answered 412 and the owner not read before the form, keys down answered 401, dependents_after not asked, a route outside the table served, the body error quoting serde's sentence, the token logged, any scheme read as a bearer, a form replacing a YAML-only object, no body limit, no media-type check, the path's name and the form's name allowed to differ, HEAD not read as GET, a save writing today's defaults, a delete that hides the operator still releasing, the ETag made weak, the 403 naming every permission, GET /v1/me listing every role, the cache header dropped, and in the binary a wildcard origin accepted, an unknown key accepted, the issuer not validated at load, and readiness that does not ask the keys. Two survived the first run, and each got the test it lacked (the body limit was taken from the constant it was meant to hold; a replace that wrote today's defaults was not noticed). Unverified, all of it until D7b's kind end-to-end: that the binary runs against a real API server and a real issuer (it has not: --check and the tests are all that ran; aap-objects-kubernetes and aap-auth-oidc are proven against their own fakes and a bare kube-apiserver, not through this router); the Role of the chart under real RBAC; that the readiness call is cheap enough on a real cluster; that a Keycloak token carries the roles claim with the composites expanded (D14, D6's note); that a browser reads these CORS headers as intended (they are asserted on the response, not with a browser) and which origins each Tauri webview sends; the behaviour of the kube client on a stalled connection (no timeout of the API's own is set; timeouts are the edge's). Decisions D7a took, for the owner to confirm:

  • 428 Precondition Required for a PUT with neither If-None-Match: * nor If-Match, for a DELETE without If-Match, and for If-Match: *. §60a names no 428, and the port has no unconditional write; If-Match: * ("whatever is there") is the unconditional write in another spelling, so it is refused too. The alternative is 400, which says less (RFC 6585 §3 is this case).
  • A second create of a name is 409 (already-exists), not 412. RFC 9110 §13.1.2 makes a failed If-None-Match: * a 412. §60a's status list says 409 for "exists" and 412 for "stale", and AD-031 says "a create whose name exists is 409"; the client's remedies differ (another name, or read again), and a client that keeps 412 for "read again" is simpler. If the owner wants the RFC, AlreadyExists becomes 412 in one arm of Problem::from_objects and the matrix of statuses follows.
  • The body limit is 2 MiB, not 1 MiB. §60a lets a folder agent's files be 1 MiB, and the JSON of 1 MiB of text (quotes, line breaks and non-ASCII characters are escaped) is larger; 2 MiB leaves room, and the API server's own limit for one object (etcd's 1.5 MiB by default) is what a larger folder meets next, as a 422. GET /v1/info says it (limits.maxBodyBytes).
  • application/yaml (RFC 9512) is the media type of GET /v1/agents/{name}/yaml, with no charset; D4's export documents none. The two objects are two YAML documents, the AgentConfig first.
  • dependents_after refuses. D4 left the choice between a 422 and a warning the person confirms (not decided): a change to a model or a tool server that would make the operator refuse an agent that names it is 409 breaks-agents, naming the agents and the rule (agents, errors), and nothing is written; the person changes the agents first (for an http:// server, by allowing plain http in the agent, which is its own decision). There is no override. The alternative leaves agents ConfigInvalid (and delisted, the question of D2) at the click of one person. A delete has no dependents_after: the port refuses a delete of an object agents name (409 referenced, with them).
  • A form never replaces what it cannot say. An agent or a shared object with a member no form says (load_agent and *Form::load say YamlOnly) is 409 yaml-only with the reasons for a PUT; a form would write back without it. This includes the netcup coder as examples/coder.yaml has it, until the owner decides whether the coder's tunables become deployment defaults (D4's decision).
  • GET /v1/secret-keys needs platform:secrets.pick and not platform:agents.read as well, as the table of The permission of each route says; GET /v1/info, the lists and usedBy need platform:agents.read. A model's write always needs platform:secrets.pick (its API key is a reference to an offered key), so a person who may edit models and may not pick a key cannot edit them.
  • DELETE is 202 with the agent's row while the operator still holds it (the port returns once the service is gone or is being deleted; the page asks again), and 204 once it is gone. A delete of an orphan config by its name is possible in the port and has no route (nothing lists the orphans' tokens to a client): D5's question, who deletes an orphan, is still open.
  • The log names the route template and never a name from the path, and logs the subject. The names of agents are not secret; a path that matched nothing is whatever a client sent. If the owner wants the name in the log, it is one field.
  • The type of a problem is a URN (urn:vymalo:agents:problem:<slug>), not an address: RFC 9457 asks a consumer not to dereference it and the repository has no site to put documents on. The slugs are a table in the crate's README.
  • defaults.namespace is the API's namespace, the only one in the file; there is no top-level namespace to disagree with it. The flags --listen and --health-addr win over the file. --check is added.

Questions for the owner (not decided): (1) should an administrator be able to override a 409 breaks-agents (a force), knowing which agents it will break? The router has no way to say "I know"; the agents would go ConfigInvalid and be delisted at once. This includes an agent of GitOps that is valid today and would break: it blocks the write, and nothing here can change that agent. (2) Secret references (a Secret's name and key, never a value) are readable with platform:agents.read alone, in GET /v1/agents/{name} and in the shared objects: platform:secrets.pick gates choosing a key, not seeing which one an agent uses. Is that what is meant? (3) A coder's body always names its GitHub App key, so a token without platform:secrets.pick cannot suspend or resume a coder (the rule is literal: "any write whose body names a secret key"). The alternative asks for secrets.pick only when a pick differs from the one stored. (4) dependents_after is best effort: it reads the agents once, so an agent saved at the same moment can still end ConfigInvalid (the same window as D5's two applies).

Where D7a differs from §60a: (a) §60a's D7 row has the chart's api component (the Role, the Service, the edge route, the NetworkPolicy), the image and the kind end-to-end in the same slice: they are D7b; (b) the status list gains 413, 415 and 428; (c) GET /v1/info has no run-pod size classes to list (an empty array), and carries limits; (d) the Agents screen's In chat is the page's own check, and the Adopt action (D16) and the orphan list have no route; (e) HEAD is served as GET.

After review of D7a (2026-10-16): a review found three major defects, several others and some nits, and reproduced each. Each was checked against the code before it was changed, and each fix is proven by a test that failed on the previous code (named below; where the code was right and a mutant survived, the test now kills it, and the mutants are listed instead; none left behind). Counts now: 108 tests in aap-platform-api (80 before: 18 unit (15), 34 in tests/agents.rs (29), 12 in matrix.rs, 15 in lifecycle.rs (new), 14 in shared.rs (11), 6 in cors.rs (5), 4 in misc.rs, 3 in oidc.rs, 1 in logs.rs and 1 in key_logs.rs (new)) and 27 in aap-api-server (17: config 14, serve 6, run 7); the workspace passes, 1116 tests, and the crates' suites three times in a row.

  • Major: "unknown keys refused at every level" was false for most of defaults. The types below it (aap-api's Security, Cnpg, GitAuthor, GithubMcp, Volume, SecretKeyRef, k8s-openapi's ResourceRequirements and NetworkPolicyPeer) are the CRDs' schema and do not deny unknown fields, so a typo in any of them passed api --check and left the default: a misspelt podSelectr in defaults.allowFrom[0] made a NetworkPolicy peer broader. The CRD types' serde is untouched; after the typed parse, the defaults are written back to JSON and every member of the file that does not come back is refused with its path (defaults.allowFrom[0].podSelectr); an explicit null is absence, and a complete file that says every optional member is accepted. Failed before: config::tests::an_unknown_key_is_refused_at_every_level_of_defaults_and_names_its_path (walks every mapping of the example) and a_misspelt_peer_of_allow_from_is_refused_and_not_a_broader_policy.
  • Major: authorization was a route_layer, so what was added after it was served with no token. A .route_service, .merge, .nest or .fallback(handler) added after it was not wrapped, and the matrix test only scanned for .route(. The router is built in two steps (assemble: the table's routes; guarded: the one layer, CORS, the log and the headers around whatever the router then holds), so there is no "after", and the layer answers before anything else of the router runs: nothing matched is 404 (a fallback never runs), a template the table lacks is 500 (logged), a method the table lacks on a template it has is 405 with Allow and no token, and a route of the table needs its token and its permission. Failed before: router::tests::nothing_that_is_not_in_the_table_runs_whoever_calls_and_whatever_it_is_added_with (with a route_layer over the table's routes, a fallback added to them answered 200 to a call with no token); three scratch edits of the layer (nothing matched passes on, an unknown template passes on, a stray method passes on) each fail it. tests/matrix.rs also refuses .route_service, .merge, .nest, .nest_service, .fallback and .method_not_allowed_fallback in the source.
  • Major: the lifecycle state and the members of a row were untested (the reviewer's scratch edits of view.rs survived). tests/lifecycle.rs pins each state of An agent's lifecycle, as the dashboard shows it from the two objects (a generation the operator has not observed, a config edited alone, which does not move the service's generation, no status, a status with no state, each of the four states, Deleting before everything, a GitOps agent) and each member of a row and of a detail (title, description, tags, suspend, audience, kind, managedBy, configDigest, the order of conditions, status and configStatus whole). The code was right; killed now: service_seen forced true, config_seen forced true or false, Suspended read as Ready, Blocked as Degraded, no status or no state read as Ready, Deleting dropped, and every member above dropped.
  • The cumulative body limit was untested. a_stream_of_chunks_that_are_each_under_the_limit_and_together_over_it_is_413 (a stream of three chunks of a third of the limit each, and the limit to the byte); the check of the count across chunks, replaced by one per chunk, now fails it.
  • A create over an existing name could answer breaks-agents, and a 409 named agents to a token that cannot read them. A PUT with If-None-Match: * ran dependents_after and could answer breaks-agents (with the agents) where the port answers already-exists; a create changes nothing that exists, so no agent is asked. breaks-agents and referenced named the agents (in agents, errors and detail) to a token that may hold only platform:models.write or platform:agents.write; now the names are in the problem only for a caller who holds platform:agents.read (a member agentCount is always there), from the agents, models and tool servers handlers, and a call site that forgets says no name. Failed before: a_create_over_a_name_that_exists_is_already_exists_and_asks_the_operators_rules_nothing, the_agents_a_409_names_are_named_only_to_a_token_that_may_read_agents and the_agents_that_name_a_config_are_named_only_to_a_token_that_may_read_agents. every_agent_a_change_breaks_is_reported_and_so_is_one_that_gitops_owns (every broken agent and not the first, byte order, GitOps's agents in usedBy and in the agents a change breaks) found the code right and kills the mutants that reported the first, or ignored GitOps's agents.
  • Preflights lacked the hardening headers. CORS answers a preflight itself and was outside the layer that sets no-store and nosniff. The headers are now outside the log and CORS, so every answer of the router, a preflight, a 404, a 405 and a 401 included, carries them and the CORS headers stay on the refusals. Failed before: every_answer_carries_the_hardening_headers_a_preflight_and_a_refusal_included.
  • /readyz did real work per hit, and was open to anyone who reaches the health port. Each GET ran the key check and a list of all the ModelEndpoints. The answer is now kept 5 s and shared: probes that arrive while the check runs wait for its answer and start none, a failure and a timeout are kept too (a hung issuer is asked once), a draining pod is not ready at once. The cluster call is a list of one object (limit=1), made by the binary with kube::Api (the AgentObjects port has no way to say "one", and its list is the API's own). Failed before: a_burst_of_probes_asks_the_check_once_and_the_answer_is_kept_for_a_few_seconds (50 checks for 50 probes), a_failure_is_kept_too_and_a_check_that_timed_out_is_not_asked_again_at_once and the_cluster_probe_lists_one_model_endpoint_of_the_namespace_and_no_more (a client that records the request).
  • allowedImageRegistries absent meant any registry. A person with agents.write and not secrets.pick can name a folder agent's own image, and its pod is handed the model endpoint's API key and the A2A bearer. The binary now refuses a file without defaults.allowedImageRegistries, or with an empty list; aap-forms keeps "absent is any registry" (a library cannot know the deployment). The example says why, and that an entry is a registry host and does not bound repositories. Failed before: the_registries_an_agent_may_pin_its_image_from_are_required_and_not_empty.
  • CORS origins with a default port never matched. https://x:443 and http://x:80 (and wss, ws) are refused when the list is read, with a message that says to drop the port; a port with a leading zero is no origin. Failed before: an_origin_with_the_default_port_of_its_scheme_is_refused_because_a_browser_never_sends_it and the same in the binary's config.
  • Two Content-Type headers and a DELETE with If-None-Match. Two Content-Type headers were 415; they are 400 (invalid-request), as two Authorization or two If-Match are. A DELETE that carries If-None-Match was 400 and untested (a mistake of the request, not a missing precondition, so not 428; also with If-Match; nothing deleted): a_delete_with_if_none_match_is_a_mistake_of_the_request_and_deletes_nothing kills the mutant that accepted it. Failed before: two_content_type_headers_are_an_error_of_the_request_and_not_a_pick_of_one.
  • Nits. The warning for keys that cannot be fetched was a line per request: it is now one when it starts and one line when they are back, and a 503 carries Retry-After: 5 (failed before: keys_that_are_down_are_one_warning_and_their_return_is_one_line, 25 warnings for 25 requests, and the two 503 tests). %+f in an If-Match was read as the byte 0x0f because from_str_radix takes a sign: only two ASCII hexadecimal digits are an escape (an_escape_is_a_percent_and_two_hexadecimal_digits_and_nothing_else). tower is a workspace dependency of the two crates (six other crates of the workspace still write their own pin; not changed here). The README said a second DELETE of an agent that is going is 409; it is 202 and the row again, as the port accepts it (a_second_delete_of_an_agent_that_is_going_is_accepted_again_and_a_put_is_not), and the READMEs, the state diagram, the table of crates and this note are corrected.

Decisions this review took, for the owner to confirm: (1) a route outside the table is 500 and not 401, with no handler run, and nothing matched or a stray method is answered by the layer before a token is asked for; (2) two Content-Type headers and a DELETE with If-None-Match are 400; (3) a refusal names agents only to a holder of platform:agents.read (any other gets agentCount, and no errors); (4) defaults.allowedImageRegistries is required and not empty in the binary's file, an entry being a host that bounds no repository (the owner may relax it); (5) a CORS origin with the default port of its scheme is refused; (6) the readiness answer is kept 5 s and its cluster call is a list of one object; (7) a 503 says Retry-After: 5, and keys that are down are logged when that changes; (8) a create asks no agent. Three questions are added to the one above and it is extended (they are numbered there). Still unverified: everything the D7a note lists as unverified, which waits for D7b.

D7b1 built (2026-10-16, the image and the CI jobs unverified until CI has run them): the Platform API's image, its CI build, push and tag bump, and the chart's api component. D7b is two pull requests; D7b2, the kind end-to-end through the API, is the one that runs the binary against a real API server and a real issuer. The image (docker/api/Dockerfile) is the operator's with the package and the binary changed: the same cargo-chef builder and distroless base, by the same tags and digests (not re-read: unchanged from verified 2026-10-05), user 65532, ENTRYPOINT ["/api"], no shell; the build stage runs --version, --help, --check on bin/api/config.example.yaml and a refusal of the same file with a misspelt key, which must name it. The chart (README): api.enabled, off by default, and then nothing of it is rendered or checked and the three golden renders are byte for byte what they were. When on: a Deployment (RollingUpdate, maxSurge: 1, maxUnavailable: 0; the operator's pod security; probes /healthz and /readyz on the health port; the file mounted read-only from a ConfigMap and named by API_CONFIG_FILE, a checksum of it a pod annotation), a ClusterIP Service on the API port that does not expose the health port, its own ServiceAccount, Role and RoleBinding, a NetworkPolicy, an optional Ingress. The Role is exactly crates/objects-kubernetes/tests/rbac.yaml: render-check.sh reads that file and compares its two rules with the rendered Role, so they cannot drift; no right on Secrets, none on watch, none on a workload, and the operator's Role gains nothing. The file is rendered from api.config (oidc, cors, defaults); the chart owns listen, healthListen (from api.port and api.healthPort, which the probes and the Service use) and defaults.namespace (the namespace the operator watches; a different value is refused). _validate.tpl refuses, naming the value, what the binary would refuse at start and can be seen at render time (the issuer, the audiences, the roles claim, a wildcard or default-port origin, no registries, both or neither store, a tag latest, a grace period shorter than the sleep plus 32 s) and what only the chart knows (a policy with no peer that may reach the API, an Ingress with no host); the issuer, an audience, the roles claim, the registries and the peers have no default (each is asserted on its own). The CI (operator-image.yml, one workflow, the README's "The image"): the job api-image builds the image, smoke-tests it like the operator's, and runs the image's api --check on the file the chart renders for each shape of values the chart is tested in (deploy/operator/tests/api-shapes.sh writes the files: the golden one, a Secret per agent, the least a deployment must say, and one that sets every value), which finds a shape the chart renders and the binary refuses and does not prove there is none: the chart refuses what it can check at render time, and the binary refuses the rest at start and fails closed (a pod that never becomes ready, the old ones still serving); push pushes sha-<7> and latest of both images; one bump job sets image.tag and api.image.tag and pushes one commit, chore(deploy): bump operator and api to sha-<7> (bump-tag.sh <file> <tag> [operator|api] is still the only writer of either). Proven here: the release binary built (cargo build --release --locked -p aap-api-server, 3 min 20 s) and, from it, the Dockerfile's whole smoke sequence, --check on the three rendered files (the golden shape, the Secret-per-agent shape with cnpg: null, and the least a deployment must say), and the workflow's smoke and chart steps run as written (the listing of the image's file system excepted) with a stand-in for docker that runs that binary; hadolint on both Dockerfiles, actionlint on the workflows, shellcheck, helm lint and kubeconform v0.7.0 (the pinned release, its checksum equal to CI's) over six renders (46 valid, the four CRDs skipped); render-check.sh, 194 checks (91 before), the API's refusals each asserted by name; bump-tag-test.sh, 53 checks (26 before). Each guarantee was broken on purpose and a named check failed (18 scratch edits in copies of the chart, none committed): a watch or secrets in the API's Role, a verb dropped, a writable root file system, the API's pods carrying the operator's name label, the health port in the Service or the policy, maxUnavailable: 1, no preStop, a wildcard origin accepted, the registries not required, the API on by default, a secret key in the file, the API using the operator's service account, and a default for the registries, the audience and the roles claim (the first run of that last kind survived and got the test it lacked, for all five values that have none); the bump script, with the block match broken (9 failures). Not proven here, unverified: the image itself, because no container daemon runs where this was written (the build is CI's proof; aws-lc-sys 0.46.0, which jsonwebtoken pulls in, builds with the C compiler alone on x86_64 Linux, verified 2026-10-16 by reading its builder/main.rs at that version, not by building it in the cargo-chef image); every CI job of this slice; the pod running in kind against a real API server and a real issuer (D7b2: a read-only root file system is enough, the Role is enough under real RBAC, /readyz goes green, the policy's three egress rules reach a real issuer); that lifecycle.preStop.sleep and the grace period behave as described on a real cluster; that a Traefik Middleware grouping by the Authorization header gives a limit per token (its fields and the annotation that attaches it are verified 2026-10-16 against doc.traefik.io); and that the first bump commit is accepted on main (as for the operator's). The Kubernetes sleep action is a feature gate that is alpha and off in 1.29, beta and on from 1.30 and GA in 1.34 (verified 2026-10-16, kubernetes.io feature gates), and the chart's floor is 1.29: api.preStopSleepSeconds: 0 renders no hook. Decisions D7b1 took, for the owner to confirm:

  • One workflow, one bump job, one commit for both images. Two workflows would each push a bump to main and race, and the operator's "has main moved on?" test, which reads the subjects of the commits after its own, would count the API's bump as a newer build and skip its own. The cost: the API's image is pushed only after the operator's coder end-to-end (2.9 GB, the flakiest job), both tags always move together, and a failure of the API's jobs (its Dockerfile lint, its smoke test, its --check of the rendered files) blocks the operator's release as well: push needs all of them, so no image is pushed and no tag bumped until the next green build. The subject of the bump commit changes from bump operator to to bump operator and api to, and both subjects are ignored by the test. If the owner wants the API released apart, it needs its own workflow, its own bump key and a rebase-and-retry on a shared concurrency group, and a pending bump can be replaced by a newer one there. The alternative that keeps one workflow is two pushes, each after its own jobs, and one bump that moves each tag only when its own image passed (bump-tag.sh already moves one key alone): an API failure would then not hold back the operator, at the price of a bump that decides per tag. Open for the owner: the coupling stays until they say otherwise.
  • The API's pods carry a name label of their own (aap-operator-api) and component: api. The operator's Deployment, Services and NetworkPolicy select on name and instance only, and a Deployment's selector cannot change, so the operator's pods keep their labels and the API's must differ or the operator's Deployment and policy would select them (a check holds it).
  • defaults.namespace is not a value. The API writes what the operator reconciles, so it is the namespace the operator watches (watchNamespace, else the first of watchNamespaces, else the release's; K6a), and the Role is there; the chart refuses another.
  • allowFrom of a new agent is empty by default: an agent made from the dashboard can be called by nobody until the deployment says who. The chart does not guess the orchestrator's namespace; the other defaults (cnpg, one instance, 5Gi; agent-a2a-bearer / AGENT_REGISTRY_AGENT_TOKEN) are config.example.yaml's, without netcup's storage class and coder settings.
  • The NetworkPolicy has three egress rules (the API server, the cluster's DNS, the issuer) where the operator's has one, because the API resolves the issuer's name and fetches its keys. The issuer rule is any address on issuer.ports (443) by default, and so is the API server's (apiServer.cidrs is empty by default: any address on 443 and 6443, the cluster and the internet, not only the API server; the chart cannot know the addresses, so it keeps the defaults, says so in the README, the values and NOTES.txt, and recommends setting both; amended after the review below). The ingress rule is the peers of from, on the API port only, refused when empty. The health port has no rule (the kubelet's probes come from the node, as for the operator).
  • A rolling update that loses no pod, one replica by default, a 5 s preStop sleep, a 40 s grace period. The sleep counts against the grace period, the binary drains for up to 25 s and then gives its health endpoints up to 2 s to stop (bin/api/src/run.rs), and the chart refuses less than the sleep plus 32 (25 + 2 + 5 s of margin; it was 30, which left 3 s and not the 5 s the text claimed); the default, 40, leaves 8 s.
  • The Ingress is off by default, /v1 with Prefix, TLS on. Rate limits, TLS and a first check of the JWT are the edge's, as §60a says (a limit keyed by the raw Authorization header is dodged by sending a new forged value each time, so a limit per token needs the edge to verify the JWT first, and a limit per address is needed as well: the README's The edge): the chart passes annotations through, documents a Traefik Middleware, and implements no limiter. NGINX's annotations limit per address, not per token.

After review of D7b1 (2026-10-16): the review found seven things and six nits; all are fixed or recorded, each fix proven by a check that failed before it (a scratch copy of the chart with the fix reverted, none committed).

  • "The chart can never render a file the binary refuses" was false, and is gone (workflow, api-config.sh, _validate.tpl, values.yaml, the chart README and this note). What is true: the chart refuses what it can check at render time; CI runs api --check on the file rendered for each of four shapes (tests/api-shapes.sh: the golden one, a Secret per agent, the least a deployment must say, and a new full one, tests/api-full.values.yaml, that sets every value the chart exposes to something other than its default: ports, apiServer.cidrs, issuer.to, every key of defaults, the Ingress, the scheduling, the extra environment); anything else the binary refuses at start and fails closed (a pod that never becomes ready, the old ones serving under maxUnavailable: 0). That finds a shape the chart renders and the binary refuses; it does not prove there is none. The shapes the review named were all accepted by the chart and refused by the binary (an issuer with a query, a fragment or a port above 65535; a registry ghcr.io. or a..b; an origin with a port above 65535 or an underscore; store.cnpg.instances: 0, storage.size: lots, an unknown key of defaults, a bad allowFrom peer, an offerLabel with a space, a secretRef without {name}), and _validate.tpl now reads the issuer, the origins and the registries as aap-auth-oidc, aap-platform-api and aap-forms do and checks those keys (26 checks that fail on the previous template; the binary was run on the accepted edge of each). Not checkable by the chart: the types below defaults (coder, folder, security).
  • Test gaps (mutants that survived) are closed: apiServer.cidrs and issuer.to ignored in the policy, checkPeers dropped for issuer.to, listen and healthListen written as constants, and the pod-level runAsNonRoot removed (only the golden saw it, because the container's own satisfied the pattern) each fail a named check now, as do the same on dns.to, the container ports, the Service port and the policy's ingress port, and the pod's runAsGroup and seccomp profile; the pod's securityContext and the container's are extracted apart. Four checks that joined check to a second command with && (one of them in the first commit of the slice) would have aborted the script under set -e instead of failing, and are functions now.
  • helm lint of the Secret-per-agent shape logged ten [INFO] Fail and exited 0: lint coalesces the values twice, so the second pass puts back the chart's default cnpg for a key set to null (reproduced with a four-line chart on helm v3.19.0); helm template, which Argo CD and install run, deletes it. That shape is no longer linted, with the reason in the workflow; render-check, api --check and kubeconform read it.
  • New values api.extraEnv, api.extraVolumes and api.extraVolumeMounts (an issuer behind a private CA or a proxy). What the binary reads, verified 2026-10-16 by reading rustls-native-certs 0.8.4, reqwest 0.12.28, hyper-util 0.1.21 and kube-client 4.0.0 (not run): SSL_CERT_FILE or SSL_CERT_DIR replaces the platform store (the bundle holds every CA the chain needs), a wrong path loads nothing without an error and /readyz stays not ready, ALL_PROXY, HTTP_PROXY, HTTPS_PROXY and NO_PROXY are honoured by the issuer fetch only (the cluster client trusts the service account's CA and has no proxy in cluster), and behind a proxy issuer.to and issuer.ports must name the proxy. The chart refuses the variables it owns (API_CONFIG_FILE, RUST_LOG, and API_LISTEN_ADDR and HEALTH_ADDR, which would win over the ports the probes follow), a volume named config, a mount of an unlisted volume and any mount at or under /etc/aap-api. The recipe was not tried on a cluster; that the image's base has a platform bundle for the case with no SSL_CERT_FILE is unverified.
  • Smaller: the rate-limit example groups by the raw Authorization header, so a forged value gets a fresh bucket each time (the README says so, and that a per-address limit or a JWT check at the edge is needed; Traefik's ipStrategy was not re-read, unverified); a null api.networkPolicy, api.ingress, api.image, api.serviceAccount, api.ingress.tls or a block of the policy is a named refusal and not a nil pointer; podLabels cannot repeat a selector label nor podAnnotations the checksum; NOTES.txt names the API's Service and says the edge must route /v1 to it; the grace-period floor is the sleep plus 32 and not 30 (25 s of drain, 2 s for the health port, 5 s of margin: 30 left 3 s where the text claimed 5; the default 40 leaves 8); the README's api.* row says which operator values reach the API (imagePullSecrets, watchNamespace, the name overrides) and the layout row says four golden renders. Recorded, not changed: the API listens on 0.0.0.0 (IPv4 only, the binary's default too), so an IPv6-only cluster would need [::], which the chart has no value for; and the chart's own version (0.1.0) is moved by nothing (it is installed from the repository's path, Chart.yaml has never changed it), so D7b1 leaves it.
  • Counts now: render-check.sh 298 checks (194 before), bump-tag-test.sh 53 (unchanged), kubeconform over seven renders (60 valid, the four CRDs skipped; 46 over six before), api --check on four shapes, all ok with the release binary built for the first review.

New decisions for the owner to confirm:

  • An API failure blocks the operator's release, and the other way round (push needs the jobs of both images): the coupling of the first decision stays, and is now stated; the alternative is two pushes and a bump that moves each tag only when its own image passed.
  • The egress defaults stay open and are announced, not refused: with apiServer.cidrs and issuer.to empty the pod may reach any address on 443 and 6443. The stricter choice, which the chart does not make, is to refuse an empty list while the policy is on, so that every deployment must name the addresses; the chart prints a warning at install instead (NOTES.txt).
  • The grace-period floor is the sleep plus 32, a stricter floor than the first build's 30.
  • api.extraEnv may carry a secretKeyRef, and extraVolumes may hold anything: the chart refuses only the names and the path it owns. A deployment that wants the pod to mount no Secret and nothing of the node (the first build's guarantee for the defaults) must not use these lists for it; the default render still has none, and the render check holds that.

D7b2 built (2026-10-16; the job passed on its first run, run 38896792093 at ef0b86f, verified 2026-10-16 in the job's log; what the review below changed in the script passed in CI on main too, run 38970194294 at 2ca4454, job api-e2e 117207892113, verified 2026-10-17 with gh api and in the job's log; the port of the D13 review's hardening into the script, last paragraph below, is unverified until CI has run it): the kind end-to-end through the deployed API: the Platform API creates a folder agent, the operator makes it Ready, and the API lists, reads, exports, replaces and deletes it, in a kind cluster, with the image that passed the smoke test. It is deploy/operator/tests/e2e/api-e2e.sh and the job api-e2e of operator-image.yml (it needs image and api-image, whose images it runs; push needs it, so no API image is pushed that failed to serve its first agent, and the one bump job still moves both tags in one commit). The issuer is a program on the runner, not a pod: the example test-issuer of aap-auth-oidc (required-features = ["testkit"], in no image) is the testkit's issuer (TestIdp::start_at(bind, public_host) names it http://<the host's address on the docker network of kind>:<port>, which is the iss of its tokens and the API's oidc.issuer; token_with_roles makes a token that holds roles) with a control port bound to the loopback, which the script checks a pod cannot reach, where it asks for tokens by subject and roles. The script: the CRDs (and the ExternalSecret CRD, the pinned copy of aap-objects-kubernetes' tests), the Secrets (the model's API key is a sentinel), a labelled ExternalSecret that offers it, the chart with api.enabled and the images loaded into kind (tests/e2e/api.values.yaml plus what it writes when it runs); then, through kubectl port-forward with tokens of the issuer: 401 without a token and for one that is not (a problem detail and the challenge), 403 naming the permission, /v1/me, /v1/info, the offered keys; a model by reference to the offered key (403 without platform:secrets.pick, then 201); a folder agent that pins the stand-in image of operator-e2e (428 with no precondition and nothing written, 403 for a reader, 422 on the field image for a registry the deployment does not allow, 201 with Location, an ETag, the field manager agents.vymalo.com/dashboard and the label of the dashboard on both objects, 409 for a second create); the operator makes it Ready (the API's state, and kubectl's: four conditions, an Available Deployment on the stand-in, the card through the Service); the list row, the detail, the YAML export (both objects, no status, no managed field, no value), the model's usedBy and 409 referenced for its delete; a replace with the current ETag (200, both objects renamed) and with the old one (412, nothing changed); a delete with no If-Match (428), the old tag (412) and the current one (202 or 204), the operator's finalizer completing, the objects and the workload gone, the agent 404, and then the model's delete (204). The operator writes its status all the time, so a replace or a delete right after a read may be 412: the script reads again, up to five times. Also asserted: the API's pod runs as 65532 on a read-only root file system, did not restart and has its preStop hook; its service account has exactly the Role of crates/objects-kubernetes/tests/rbac.yaml (kubectl auth can-i as the service account: nothing on Secrets, no watch, nothing on workloads or outside the namespace); its NetworkPolicy has the one /32 rule to the issuer; a pod the policy names reaches the API through its Service, and one it does not name is refused (as built: if the cluster enforces policies, otherwise a warning and no failure; since the review below: always, unless AAP_E2E_CNI_MAY_IGNORE_POLICIES=1); the sentinel and the tokens are in no answer, no export and no log. render-check.sh renders the values of the end-to-end with what the script adds and asserts what the script depends on (seven checks, each broken on purpose), so a change that breaks them fails the chart job and not a kind cluster (render-check.sh 305 checks, 298 before).

What was run where this was written (no container daemon, no kind): shellcheck, actionlint, helm template of the values and the built api --check on the file it renders, the test-issuer by hand (the discovery document names the issuer, a token carries the claims asked for, --control 0.0.0.0:0 is refused), and the whole script against the real router of aap-platform-api over the Memory ports, the real OidcAuthenticator and the real test-issuer, with a fake kubectl (scratch, not committed) that answers from the objects the router wrote: both branches of the policy check, the 412 retry (the status churned every 120 ms), and a red run (the diagnostics print, the issuer is killed). That walk found two faults of the script, both fixed: the NetworkPolicy filter took the DNS rule's peers (no ipBlock) for the issuer's, and the detail's configStatus is null until the operator writes one. Every curl step and jq filter of the API half ran against the real handlers; every kubectl assertion is the fake's, so none of the cluster half ran: the stand-in starting, the finalizer, can-i as a service account, the port-forward, the policy.

Unverified, still, when the job is green: a real Keycloak (the issuer is the testkit's: RS256, a flat roles claim, plain http), the netcup edge (TLS, a JWT check, rate limits), that the API's NetworkPolicy lets the pod be Ready under enforcement (verified 2026-10-16 by the first run of the job, below: it did, and refused the other pod; kind's kindnet enforces a NetworkPolicy, as operator-coder-e2e of run 38892472909 on main, kind v0.33.0 and node v1.35.8, had shown), preStop.sleep under a rolling update (the pod has the hook; nothing measures it), two replicas, and a coder or a tool server made through the API. One thing the walk showed that nobody asked about: the binary's log carries ANSI colour codes (tracing_subscriber::fmt() with no with_ansi, as the operator's; observed with stderr redirected to a file), so a log pipeline sees escape sequences inside route=. The end-to-end strips them; the binaries are not changed.

Decisions this slice took, for the owner to confirm: (1) the end-to-end is a job of operator-image.yml and push needs it, so the coupling of D7b1 grows: a flake of the API's end-to-end blocks the operator's release too (the alternatives are a job of operator.yml that builds the images itself and gates nothing, or the two pushes with a bump that moves each tag when its own image passed); (2) the issuer is a process on the runner reached at the gateway of the docker network of kind, with a control port on the loopback, where the alternatives are a pod in the cluster (an image to build and pin) or a real Keycloak (D14, which proves the claim of a realm and not the API); (3) it is an example of aap-auth-oidc, not a crate or a binary of its own; (4) the agent pins its own image (aap-stub:ci, Docker Hub's by its name, so allowedImageRegistries: [docker.io] is what admits it) and names no defaultAgentImage, because the chart requires that default to be a tag and a digest and a local image has none: the path of an agent that names no image is not run here; (5) as built: the NetworkPolicy check accepts both outcomes (a warning when the cluster does not enforce) and does not require enforcement, though kind's does; changed by the review below: it requires the refusal and accepts a pod that got through only behind AAP_E2E_CNI_MAY_IGNORE_POLICIES=1; (6) the log's colour codes are left as they are.

After review of D7b2 (2026-10-16): the script had two major faults and six minor ones that its first green run did not touch. Verified 2026-10-16, in the log of the job api-e2e of run 38896792093 (head ef0b86f, read through the GitHub API): every step passed; the delete was 204; the agent was ready after 5 s; the policy step printed a pod the API's NetworkPolicy does not name cannot reach the API (status 000), so the job runs under enforcement and the API's pod is Ready under it. Fixed, in the order of the review:

  • The cleanup was destructive and armed before any check (major). The trap was set before step 0, which could still fail (a missing jq, a failed cargo build), and then ran helm uninstall aap-operator and deleted secret/agent-a2a-bearer, the chart's own default name for the real orchestrator's token, in another-agentic-system, and kubectl apply replaced any Secret of those names. Now: a kubectl context that is not kind-* is refused before anything is made and before the trap exists (AAP_E2E_ALLOW_ANY_CONTEXT=1 says that another cluster is a throwaway one); the run works in a namespace of its own, aap-e2e-api (AAP_E2E_NAMESPACE), that it makes with the label aap-e2e/made-by=api-e2e and that is refused if it exists without the label; its Secrets (e2e-agent-models, e2e-a2a-bearer, e2e-chat-db-app) and the ExternalSecret (e2e-agent-models-es) have names of their own, carry the label, and one that exists without it is never overwritten; and the cleanup undoes what each step recorded (objects_made, installed, ns_made): a run that stops before the namespace exists uninstalls and deletes nothing. The values the script writes carry the namespace and the bearer's Secret, and render-check.sh renders them in aap-e2e-api and asserts that neither another-agentic-system nor agent-a2a-bearer is named. Proven against fakes of kubectl and helm (scratch, not committed) with a real router, a real issuer and the real script: a missing jq, a failed build, a context minikube or none, and a namespace without the label end with no helm, no delete and nothing made; a Secret without the label is not applied over (the run deletes only the namespace it made); the opt-in runs as before; a terminating leftover of ours is waited for; and the script before the change, on the same fakes, ran helm uninstall and deleted secret/agent-a2a-bearer for a missing jq and for a failed build.
  • A 202 on the agent's delete was accepted, and then both objects were required to be gone (major). The API answers 202 when the operator's finalizer outlasts its 5 s wait (DELETE_WAIT) and does not delete the config then (D5: an orphan), so the wait could not end. On 204 both objects still must go; on 202 the body must say deleting, the AgentService must go, and a config that stays is reported in a ::warning:: and removed with kubectl, so the run ends clean and the model can go. The final line says what is checked, not an order the end state cannot show. Walked: 204, a forced 202 with and without an orphan and with a service that lingers 5 s; a 204 with an orphan fails.
  • The NetworkPolicy check could pass vacuously. A pod that got a 200 only warned and any other status counted as enforced. Kind's kindnet enforces (above), so the default is now a dropped connection (000) and anything else, a 401 or a 5xx included, fails, after a control: the pod must reach the issuer, or its refusal proves nothing. AAP_E2E_CNI_MAY_IGNORE_POLICIES=1 is the lenient reading for a cluster whose plugin has no policy support. Walked: unenforced, 401, 503, no status and a pod with no network fail; enforced passes; the opt-in warns and passes.
  • No signal trap. dash does not run the EXIT trap when a signal ends the script, so ^C, a cancelled job or TERM left the release, the namespace and the issuer. INT is now exit 130, TERM and HUP exit 143, and the cleanup ignores a second signal. Walked under dash against the fakes: the three signals run the cleanup (and the old script died with -15, leaving the issuer running).
  • Smaller: until_ok keeps the last attempt's output and prints it when it gives up; gone takes only the API server's NotFound for "gone" (any other error is not, and is shown), as does the check that the agent's pod is gone; the two curl pods are named for the run (a rerun within 30 s no longer collides); the minted tokens are looked for by their exact value, their payload and their signature, in the API's and the operator's logs and in the answers' headers as well as their bodies (walked: a planted token, payload, signature, a header and the operator's log are each found; a header segment, which every token shares, is not a leak); the check ... && dhas of render-check.sh that ended the script without a FAIL line are functions now (the old form passed its check and then aborted); the e2e README's "blocked for 30 s" is "three looks in a row, about 10 s", which is what the loop does; and the test issuer's command line is parsed in the testkit (aap_auth_oidc::testkit::issuer_cli) and covered by 11 tests, each refusal broken on purpose: a flag twice, a --bind, --control or --public-host that is not what it says, a control address that is not a loopback address are a message that names the flag and exit 2, an address it cannot listen on is exit 1 (TestIdp::try_start_at), and none is a panic (101).

Decisions for the owner: (7) the script uses a namespace only if it made it (the label), so even the opt-in cannot point a run at a namespace with something in it; the alternative is a prefix check on the name, which a real namespace could carry; (8) its cleanup deletes the namespace it made, with everything in it, and does not wait for it (a rerun waits for a terminating one); (9) the exit code of a refused flag of the test issuer is 2 and not 1 (the README of the crate said 1); (10) the control that the pod the policy does not name reaches the issuer is a new assertion of the job. Only CI can prove (verified 2026-10-17: the job api-e2e passed with all of this in run 38970194294, the push to main at 2ca4454 of 2026-10-16T21:33Z, job 117207892113; its log shows the context kind-aap-api, the namespace aap-e2e-api, the delete 204, the stranger pod refused with status 000 after the control, and no secret value, no token and no panic in the logs; the 202 path with an orphan config was not taken, so it stays proven only by the walks): the script in a namespace other than another-agentic-system (nothing in the chart names that one: render-check.sh renders it), kubectl create -f - of a labelled namespace and its deletion with the finalizers stripped, the control (the stranger pod reaches the host's address like the client pod did in step 1), and the strict policy step on kindnet again. Not done: the orphan config of a 202 is removed with kubectl and not through the API (the router of aap-platform-api does not mention orphans: D5's list_orphans is the port's); a partial token (a prefix of one) in a log is not found.

The D13 review's hardening, ported (2026-10-17), this commit, unverified until CI has run it (the PR's run of api-e2e is the first): the review of chain-e2e.sh (D13, below) found gaps that api-e2e.sh, which chain-e2e.sh was modelled on, had too, and they are ported as chain-e2e.sh has them, without changing what api-e2e.sh asserts, its namespace, names, guards or cleanup. (1) ok, die and every message that carries an answer body or other data use printf: dash's echo interprets backslashes and a JSON body has them. (2) Step 7 reads each log with read_log: the kubectl logs must succeed (no || true; its stderr kept apart), the output must not be empty and must hold a line only that component logs (the API's route=/v1/agents, the operator's the caches are synced, crates/controller/src/operator.rs, info level, which the chart's logLevel: info writes); before, the operator's log was read with 2>&1 ... || true and no check at all, so a log that could not be read held no secret and passed. (3) The diagnostics go through redact (no line that holds the sentinel or a token of the run; missing or empty pattern files tolerate; redacted before any head -c), so a failure that found a secret does not print it again. (4) HELM_KUBECONTEXT is the checked context. (5) The panic check matches panicked at, as chain-e2e.sh's, and not the words panic and backtrace; the script has no // [] fallback to harden (its empty listing is compared with [] exactly, which {} does not pass). Walked, not run on a cluster, under dash, with the scratch walk of this review (a fake kubectl and helm, the real router over the Memory ports, the real OidcAuthenticator and test-issuer): the whole script passes (the operator's log with colour codes, as the binary writes it); with a kubectl logs of the operator that fails, that is empty or that is another pod's log the run fails at step 7 (the script before the change passed with the failing one); with the sentinel planted in the logs and in a describe, the diagnostics of a red run print none of it (the script before the change printed it four times); redact on its own passes everything through with no pattern files or empty ones and drops the lines that hold the sentinel, a token, its payload or its signature. What the walk cannot show: that the operator of the api-e2e job logs the caches are synced (it does in chain-e2e's, same image and chart, verified 2026-10-17 in run 38996503582; the check is new here) and everything of the cluster half.

D13 built (2026-10-17; the job chain-e2e passed on its first run, run 38994193619 at 4929e3c, verified 2026-10-17 in its log; the changes of the review of the same day passed in CI too, run 38996503582 at the PR head 8d45dab, job chain-e2e 117290340019, success, verified 2026-10-17 with gh api and in the job's log): the kind end-to-end of the whole chain, deploy/operator/tests/e2e/chain-e2e.sh and the job chain-e2e of operator-image.yml (it needs image and api-image; push does not need it). In one kind cluster: the operator chart with the API and the registry on (the operator's registry with a Secret of the script's own for its token, readable only by the pods labelled aap-e2e/registry-reader), the testkit's issuer on the runner as the one issuer of the API and of the orchestrator (audience aap-e2e-chain, roles at agentic_roles), and the system's orchestrator, its published image pinned by tag and digest in one file (chain-orchestrator.yaml, with its Postgres 16), configured by a file the script renders: the operator's registry as its only source of agents, auth.mode: jwt, userClaim: sub, rolesClaim: agentic_roles, defaultRole: null, two roles (user, admin) that may read and use every agent, agents.registry.maxAgeSecs: 1, server.environment: development (the issuer, the registry and the cards are plain http). The script makes the Secrets (a sentinel for the model's key and one for the GitHub App's key, the registry's token, the A2A bearer the orchestrator presents and every new agent reads, the coder's ledger, the orchestrator's database), the ExternalSecret that offers the two keys, installs the chart, applies Postgres and then the orchestrator, and checks that the pod runs the pin and is ready; then, through the deployed API, a model and a coder (an adam-coder on the stand-in image, a GitHub App by id and by reference to the offered key, audience: ["agent.use:e2e-coder"]; 403 naming platform:secrets.pick first, then 201), the AgentService carries that audience, the operator makes it Ready and Listed, and the registry, read from a pod it admits, answers 401 without its token and with it lists the coder with its title, its card URL and the audience. Then the orchestrator is asked by four people with tokens of the one issuer: alice (roles user and agent.use:e2e-coder) is listed exactly e2e-coder, from the registry, with the description of the card the stand-in serves, reads its capabilities (200), and /api/me says her role is user only; bob (user and agent.use:other) is listed [], /api/registry says the platform's registry is ok (the empty list is the audience, not a failed registry), his /api/me is alice's but for the person, and the capabilities are the 404 of an agent that does not exist, body for body; admin (the role admin) is listed the coder and reads its capabilities (below); carol (agent.use:e2e-coder and nothing else) is 403 no_access, and her /api/me holds no role and no permission: the audience admits, it never grants. The coder is then deleted through the API (If-Match), the registry lists nothing, and the orchestrator lists nothing to the administrator or to alice, the registry still ok; and no secret value (four) and no token minted by the run is in any answer, header or log of the API, the operator or the orchestrator. The guards and the cleanup are api-e2e.sh's after its review (a kind-* context only, a namespace of its own, aap-e2e-chain, made with the label aap-e2e/made-by=chain-e2e and refused without it, names of its own, a cleanup that undoes only what it made, a signal trap). render-check.sh renders the values in aap-e2e-chain and asserts what the script depends on (ten checks: the registry's Service and its token, the policy's label, the coder's defaults, the namespace and the bearer, the ledger and the registry, the pin, the manifest, the offer and the script's own names; 316 checks, 306 before), each broken on purpose: sixteen edits, one at a time, in a copy of the tree, each failing the check it targets (for policy, the label of the policy and not its comment).

The stand-in's card. The orchestrator parses the agent's card to list it (GET /api/agents) and an agent whose card it cannot parse stays listed with no description and a warning (observed 2026-10-17: the agent card is not a valid A2A 1.0 card: missing field 'version'). The stand-in's card was a name and a description, so bin/operator/tests/stub/Dockerfile now serves a full A2A 1.0 card (a version, an interface, capabilities, input and output modes, one skill) for an agent that does nothing. Nothing else reads the card (the other jobs ask /healthz), and the script asserts the card is one the orchestrator can read before it asks the orchestrator.

The administrator. The assertion about admin is what the pinned system does, its ADR 0045 decision 1.4 (a role that holds admin sees every platform agent whatever its audience); the registry's contract, consumer's rule 4, says the opposite, and the question of the D3 note (does an administrator see every listed agent, or only those whose use permission they hold?) is still the owner's. The script says so in a comment on the assertion. If the owner answers for the contract and the system follows, the pin moves and this is the check that fails, and it moves with the answer.

Verified 2026-10-17: the orchestrator's pin by an anonymous manifest request to ghcr.io (orchestrator:sha-8df44c6 is an OCI index of sha256:2794587bc94f657e43a65810a6a470c22baff3adf0edd526acb691fb1af8902a with one linux/amd64 image and an attestation; the config's org.opencontainers.image.revision is 8df44c6f88f0d9eb47aa7c9f5874a914765c8376, the user 65532:65532, the entrypoint /orchestrator, LISTEN_ADDR=0.0.0.0:8080; the package is public); Postgres's by an anonymous request to mirror.gcr.io (postgres:16.15-alpine3.23 is the index sha256:621a7610...); and, with the orchestrator binary built at 8df44c6 from the system's checkout (a debug build with the crate's default features, which are the image's: its Dockerfile adds none) on a scratch Postgres 16: the configuration the script renders is accepted (--print-config, and a live start: migrations applied, the issuer's keys fetched, /readyz 200, the registry read with the bearer token and the card with the A2A bearer), and the tokens of the testkit's issuer are accepted (alice, bob, admin and carol get the answers above).

What was run where this was written: shellcheck, dash -n, actionlint, render-check.sh, and the whole script, end to end, under dash, against the real orchestrator above (in a private mount namespace with the cluster's names in /etc/hosts and the Secrets as files, on the configuration the script had made), the real router of aap-platform-api over the Memory ports with the defaults the chart rendered from chain.values.yaml (the API's own Defaults refuses a key it does not know), the real aap-registry router over a directory that follows the objects, the real test-issuer, and a fake kubectl and helm (scratch, not committed) that answer from what the script applied; it passed. The coder the API wrote was also resolved by the operator's own aap_domain::resolve: a Deployment (no volume, no pod-name identity), the stand-in image, no sidecar, and every Secret it names (e2e-coder-db-app, e2e-agent-models twice, e2e-a2a-bearer) is one the script makes. Sixteen of the script's assertions were broken on purpose, one edit at a time in a copy of it, and each failed as written (the pin without a digest, a Secret of the manifest misnamed, an audience that is not the role's, a registry item with another title, alice without the role, bob with it, the registry's expectation for bob turned, the administrator without admin, carol with user, bob's /api/me made different, the 404 compared with another body, a delete that is not made, a secret value and a token planted in the answers, a registry path that does not exist, a coder written without platform:secrets.pick); so were the guards (a context that is not kind's, a namespace and a Secret without the label, the opt-in that lets another context through) and the stand-in's old card, and TERM and INT ran the cleanup. The cluster half could not be run there, and ran in CI (below).

The job passed on its first run (run 38994193619, job 117283711764, at 4929e3c, 2026-10-17 from 02:18:57Z to 02:22:03Z, about three minutes; verified 2026-10-17 in its log, every ok line of the script), and that run proved the half that could not be run where this was written: the kubelet pulled both pinned images (the pod's imageID is the orchestrator's digest, no restart) and the orchestrator's pod became ready (/readyz: its configuration accepted, its migrations run, the issuer's keys fetched); kindnet admitted the orchestrator to the registry and to the agent (alice is listed the coder, from the registry, with the description of the card the stand-in serves through its Service, so the registry was read with its token and the card with the A2A bearer); the operator's real Ready and Listed (the coder Ready after 5 s, its four conditions and Listed True, its Deployment available on the stand-in, the card answering through the Service and a full A2A 1.0 card); the four people's answers as asserted (alice listed e2e-coder, bob [] with the registry ok and the 404 of an agent that does not exist, admin listed, carol 403 no_access); the delete (204, the objects and the pod gone about 34 s later, the registry and the orchestrator emptied, the registry still ok); and no secret value and no token in any answer or log (15803 bytes of answers read). It needed no fix.

After review (2026-10-17), commit 8d45dab, which passed in CI (verified 2026-10-17: run 38996503582, the PR head 8d45dab, job chain-e2e 117290340019, success; its log shows each of the three logs read by a kubectl logs that succeeded and holding a line of its own component, the registry of an empty fleet, and no secret, no token and no panic): the log checks of step 7 could pass on a log that was never read (kubectl logs ... || true), so each of the three logs now has to come from a kubectl logs that succeeded, be non-empty and hold a line only its component logs (the API's route=/v1/agents, the operator's the caches are synced, the orchestrator's database migrations applied in JSON lines); the empty-registry assertion counted zero items for {} and now requires the document of an empty fleet (one linkset context with the v1 profile and no item, which is what aap-registry writes); the diagnostics print no line that holds a secret value or a token of the run, so a failure that found one does not print it again; HELM_KUBECONTEXT is the context that was checked; printf and not echo for anything that can hold a body; the panic check matches panicked at; Postgres's readiness probe goes over TCP (pg_isready -h 127.0.0.1: the image's entrypoint first runs a server that listens on its socket only); and the orchestrator's digest is on one line of the manifest, which render-check.sh holds (316 checks still). Each was shown on the scratch walk above: before, a failed kubectl logs of the operator and a {} registry passed and the diagnostics printed a planted key; after, the first two fail the run and the third is not printed.

Unverified, still, now that the job is green: a real Keycloak and the system's chart reading the operator's registry (D14); a message sent to the agent (the coder is the stand-in; the real one is operator-coder-e2e's); a system newer than the pin; and an orchestrator with more than one replica.

Decisions this slice took, for the owner to confirm: (1) chain-e2e does not gate push (recommended): it pulls two third-party images into kind and reads a pin this repository does not control, so a flake of those pulls, or a pin that has gone bad, would block the operator's release for a reason that is not the operator's; to make it gate, add it to needs of push (one line; the workflow's header and the comment at push say so); (2) the shared stand-in's card changes to a valid A2A 1.0 card, for every job that runs the stub, where the alternative is a second image or a card per job; (3) the administrator exception is asserted as the pinned system builds it and not as the contract writes it, with the comment, where the alternatives are to assert nothing about admin or to assert the contract's reading and fail until the system changes; (4) the orchestrator reads the user from sub (userClaim: sub) because the testkit's issuer mints no e-mail and the orchestrator's default is email, where the alternative is to teach the issuer an e-mail claim; (5) the coder runs on the stand-in image and the real one stays in operator-coder-e2e (the real image is 2.9 GB and needs a real GitHub App to do anything the stand-in cannot); (6) chain-e2e.sh copies the guards and helpers of api-e2e.sh instead of both sourcing a shared library, so that the green job's script is not touched, at the price of two copies to keep in step (the copies had drifted by the review of D13, whose hardening api-e2e.sh has since been given: the paragraph at the end of the D7b2 review). Also chosen, not decided: the pin's tag is the system's main at its slice D8 and a bump is a deliberate change of one file; the orchestrator runs with server.environment: development, as the system's own dev stack does for its plain-http issuer; Postgres is a plain pod, as the system's own CI runs one; the registry's cache is one second (maxAgeSecs: 1) so the wait is for the operator, not for a timer.

D15a built (2026-10-26): the operator sets up run pods for a coder, the half of D15 that needs no cluster; the kind end-to-end is D15b (below). An AgentConfig that sets coder.runPods.sizeClass gets, besides its workers, the objects that adam-rs's coder chart renders for the commands of a run (adam-rs #131 at 3f714d0): the pod template its workers read (RUN_POD_TEMPLATE_FILE), a ResourceQuota, a NetworkPolicy, the account the workers run as, its RoleBinding and an admission policy. An AgentConfig that does not set it gets nothing, and its digest, its objects and the four golden renders of the chart are byte for byte what they were (held by tests that fail when a field is serialised as null or a trace of run pods appears in a render). What is built, where, and how it is proven:

PartWhereProven by
coder.runPods { sizeClass } (default standard); the CRDs regeneratedaap-api, deploy/crds, deploy/operator-crds/filesthe CRD drift tests, examples/coder-run-pods.yaml
RuntimeSpec.run_pods and Workload.service_account (absent from the JSON when absent), EnvValue::PodNamespace, the invariants of check()aap-portstests/contract.rs: 15 broken invariants, each named; the sample without run pods is the JSON it was
The deployment's settings (RunPodSettings, read from the file key runPods (was the file RUN_PODS_FILE names) and validated at start), the template as a file set, adam's variables, the rules a config must pass (a class the operator has, the coder's work volume, none of the variables the operator sets in extraEnv, no Podman beside run pods, one claim shared by several workers only if it is shared)aap-domain, the only home of adam's env contracttests/run_pods.rs (22), the parity cases below
The account, the quota, the network policy, the binding and the ConfigMap that holds the policy's parameters; all removed, pods included, when a service stops asking for run pods or goes (amended 2026-10-27: in an order that frees the workloads of the account first, see the note after the D15b built note)aap-runtime-kubernetesthe golden tests/golden/coder-run-pods.yaml, tests/run_pods.rs (14), tests/run_pods_api.rs against the fake API server (14: the order of the writes, the order of the removals, an object of another owner never touched; amended 2026-10-27: an account deleted while a workload names it, a workload freed of the name, the template removed), tests/cluster.rs against a real API server (one case)
the file key runPods (was RUN_PODS_FILE)aap-controller, operator runtests/reconcile.rs, tests/cli.rs
runPods and runPodClasses (off by default), the PriorityClass, the Role of run pods, one admission policy and its binding, the operator's Role gaining exactly the rights below, a validatordeploy/operatorrender-check.sh (379 checks, 62 of them in its run pods section), the golden render tests/golden/runpods.yaml, api --check on the shape with run pods on
agent.runPodSizeClass in the coder form; GET /v1/info offers runPodSizeClassesaap-forms, aap-platform-api, bin/apitests/validation.rs, tests/round_trip.rs, tests/misc.rs, tests/agents.rs

Parity at adam-rs 3f714d0. The goldens moved from 0391809 (the pin in tools/adam-parity/regen.sh and the goldens' README say why). At that revision a GitHub App coder refuses to start (exit 78) beside local commands unless the risk is accepted by name; the two App cases keep their meaning and accept it (runPods.allowCommandsNextToSecrets), the token case needs nothing, and the env contract of a coder with run pods off did not move (verified 2026-10-26: the projected renders of the three first cases differ between the two revisions only by the two keys the projection gained and the revision). Four cases are new: run pods on (defaults), sharing a ReadWriteMany claim, a split coder, and tuned settings. The template (the Pod, its env, volumes, security, affinity and the account of each workload) is compared in aap-domain with the chart's render for all four; the quota, the network policy, the binding, the account, the Role, the PriorityClass and the admission policy are compared in aap-runtime-kubernetes (tests/run_pods_parity.rs) with the chart's render, the policy with the agent's parameters substituted into the operator chart's expressions (so a reworded rule, a rule that moved in one chart and not the other, or a parameter that is not the value the rule reads, fails). What differs, on purpose, and is asserted to differ: the names of the cluster-scoped objects (the release's and the namespace's, not the agent's), the policy's match condition (it reads the account from the parameter: one policy, many agents), and the image digest of the coder (the operator's example pins one, the chart's case does not: the same normalisation as the workloads').

Run against a real API server (a bare kube-apiserver v1.35.8 with etcd 3.6.4 and no controller, verified 2026-10-26): deploy/operator/tests/run-pods-admission.sh builds the pod the coder builds from the operator's template and creates it, with --dry-run=server, as the agent's account: the pod of the template is admitted and each of 25 mutations is refused with the message of the rule it breaks (a missing label, another priority class, another image in any container, a hostPath, a Secret or another claim, envFrom, another Secret key, privileged, privilege escalation, root, the host's namespaces, the account's token; amended 2026-10-27: in a cluster, whose ServiceAccount admission plugin adds the token as a projected volume before the policy runs, the two cases of the token are refused by the volume rule instead, which the script now accepts, verified 2026-10-27 in the first run of run-pods-e2e, run 40430887039), and another account's pod is not the guard's business; run once against the operator chart's policy with the objects the operator renders (2026-10-26, 27 cases as expected), and once against the coder chart's own objects rendered from adam-rs 3f714d0 (its policy, quota, account, Role, binding and template; the parameters the script reads written by hand to match), with the same table (27 cases as expected). On the same server: params is usable in a match condition; a binding with parameterNotFoundAction: Deny denies every pod creation of the namespace when no parameter exists (so the chart sets Allow); a deleted parameter object leaves the account unguarded (below); a Role that holds the verbs of pods and pods/exec cannot be made by an account that does not hold them (the escalation check), and an account that holds bind on that Role by name can bind it, cannot make a pod, exec, or read a Secret itself, and can bind it to any account of the namespace, itself included.

What a person must know, as the chart's README says it (Run pods): (1) the operator's Role gains bind on the one Role of run pods, by name, and so the operator could give any account of the namespace the right to make pods and exec in them, itself included; it already makes Deployments that run any pod, so this is no new class of reach, but it is a reach it did not have in the verbs a reader of the Role sees. (2) The admission policy fails open for an account whose parameter object is gone, because the binding must not deny the whole namespace when an agent has none: the operator makes the parameters before the right to make pods and removes the right first, and the account's own Role gives it no right on ConfigMaps, but a person who deletes the ConfigMap by hand removes the guard. (3) A quota cannot select pods by label, only by priority class: the run pods of the agents of one namespace share a class, so they share the tighter of their quotas; one namespace per coder keeps them apart. (4) A Role cannot name the pods it may exec in: the account may exec in any pod of its namespace (the coder chart's Role has the same reach); it holds no Secret right, but another agent's pod in the namespace is within reach. (5) The policy and its binding, the PriorityClass and the Role are cluster-scoped or made by the chart; the operator, which is namespaced, makes none of them.

Decided without the owner (the six the issue asks for), for the owner to confirm:

  1. The field is a struct, coder.runPods { sizeClass }, and absence means none. Not a boolean, so that a later field is not a new field name; not a per-agent quota or image, which stay the deployment's (a person who may edit an agent should not widen its quota or name its run image). sizeClass defaults to standard when runPods: {} is written and names a class of the chart's runPodClasses; a class the operator does not have is ConfigInvalid naming the ones it has.
  2. The admission policy is the chart's, one for every agent, with its values in a ConfigMap per agent (proposed as P-020, with 3). The operator is namespaced and stays so (§59a): it makes a ConfigMap of parameters (<service>-run-pods-policy, labelled agents.vymalo.com/run-pods-policy), and the chart's one ValidatingAdmissionPolicy reads it (paramKind: ConfigMap, a binding that selects the parameters by that label). The alternative, a ClusterRole for the operator to make a policy per agent, was refused: it would give the operator a cluster-scoped right to write admission policy, which can disable admission for everybody. The cost is (2) above. Kubernetes 1.30 or later is needed for the v1 API; that params may be used in a match condition was verified 2026-10-26 on v1.35.8 only, and the oldest version where it works is unverified.
  3. The operator holds bind on the Role of run pods and nothing of pods, pods/exec or roles beyond it. The Role is made by the chart (Helm runs as an administrator, who may make it); Kubernetes lets a subject make a binding to a Role it may bind, by name, without holding the Role's verbs. The operator also gains get list patch create delete on serviceaccounts, resourcequotas and rolebindings, and delete on pods (to clear the run pods of a service that stops asking for them or goes: it finds them by the labels its parameter object names). render-check.sh holds the Role rule by rule, and holds that it has no create on pods, no exec, no secrets, no escalate and no roles verb but bind.
  4. The domain decides, the provider renders, the chart writes the policy. aap-domain makes the neutral RunPods and the template (it is adam's contract, and the contract has one home); aap-runtime-kubernetes turns the neutral spec into objects; the policy and the Role are the chart's because they are cluster-scoped. The settings reach the operator as the runPods block of its one configuration file (the ConfigMap the chart renders, mounted, read once at start, validated, and a change is a new pod by checksum/config; was a file of its own, RUN_PODS_FILE, since ANR-962) and not as thirty environment variables.
  5. Names and labels are the coder chart's wherever the object is the agent's (<service>-run-pods for the quota, the network policy and the binding; the account is the service's own name; <service>-run-pod for the template), so a person who knows the one knows the other, and parity can be asserted; the objects the chart makes carry the release and the namespace (<fullname>-<namespace>-run for the class, <fullname>-<namespace>-run-pods for the policy), because two releases in two namespaces share a cluster. Every object the operator makes carries the labels, the digest annotation and the owner reference of the others, so a deleted service takes them with it, and one the operator did not make is a conflict reported, not overwritten.
  6. GET /v1/info offers runPodSizeClasses from the API's own file, which the chart writes from runPodClasses; the form field is agent.runPodSizeClass. The API does not read the operator: both read the chart's values (the chart refuses a hand-written list), and the API checks at start that a coder asking for the first class is a valid one (it needs coder.workVolume among the defaults, which the chart requires when both are on). An operator and an API configured apart can disagree; the operator's ConfigInvalid is then the answer, naming the class.

Also decided, for the owner to confirm: (7) an App-mode coder with no run pods is not refused by the operator: at 3f714d0 the coder itself exits 78 and says why, ALLOW_COMMANDS_NEXT_TO_SECRETS is an extraEnv of the config (the example shows it, commented), and adding adam's rule to aap-domain would put a second copy of it in the contract; the alternative is a ConfigInvalid that names the two ways out, which turns a crash loop into a message and costs a copy of the rule. defaultAgentImage was not moved (the brief of this slice), so no agent breaks now; the day it moves to an image that includes #131, coder-vymalo and coder-me need run pods or the acknowledgement in the same change. (8) The run image is pinned by tag and digest in the chart (ghcr.io/vymalo/another-agentic-images/workspace:1.98.1-e6a528f, verified 2026-10-11 in the coder chart by an anonymous ghcr.io manifest request; not re-checked here), and the chart refuses a tag latest or no digest. (9) The settings of run pods are the deployment's, not the agent's: the image, the quota, the network policy, the idle and ready times and the node placement are runPods.* of the operator chart; the agent picks a size class and nothing else. (10) blockedCIDRs is a list of IPv4 ranges and the policy has no IPv6 rule, as the coder chart's: a cluster with IPv6 egress needs extraEgress and a CNI that enforces it. (11) The provider looks for run pod objects to clear only when the operator has settings for run pods (KubernetesRuntime::clearing_run_pods, off by default): the look reads kinds the chart's Role has no right on while runPods.enabled is false, and a provider that looked anyway would have failed every reconcile and every delete of every agent with Forbidden (found in review of this slice, before any CI: the fake API server enforces no RBAC, so a test now asserts that a default provider names none of those kinds). The cost, stated in the chart's README: turning runPods.enabled off clears nothing, and an agent that made run pods keeps their objects until it is deleted, so remove coder.runPods from the configs first.

What only D15b (the kind end-to-end) can prove, and D15a does not: that a kubelet starts the pod the operator's template describes and that the quota counts it (a fifth pod is refused with exceeded quota and the coder waits); that the coder reads the mounted template at /etc/adam/run-pod/pod.yaml and runs a command in the pod by exec (D15a proves the template is the chart's by comparing the objects, not by running adam); that a NetworkPolicy is enforced (a run pod reaches a public address and not a private one, and cannot reach the operator's registry); the admission policy under real RBAC, with run-pods-admission.sh run in kind against the policy the chart installed and the parameters the operator made, as the account the operator made; that kubectl auth can-i --as agrees with the Role (the operator cannot make a pod, exec or read a Secret; the agent's account can make and exec and cannot read a Secret); that a service deleted takes everything, run pods included, with it, and that an agent that stops asking leaves no object; that an existing agent without the field is untouched by the upgrade (its pods are not restarted: the digest is the same); and the real coder at or after 3f714d0, in App mode with run pods, reaching its first run. D15 stays open until it has run. (Amended 2026-10-27: D15b is built, in the D15b built note below; D15 stays open until its job has run in CI.)

Unverified, still: a Kubernetes older than 1.35 (the policy's params in a match condition; the ValidatingAdmissionPolicy v1 API from 1.30) (amended 2026-11-27, AD-067: the floor is now 1.37, so older versions are unsupported and what stays open is 1.37, unverified until CI has run the kind jobs on v1.37.0), the exec verb as the API server authorizes a WebSocket on 1.35 and later (the Role has get and create on pods/exec; unverified, as the coder chart's comment says), a CNI that enforces NetworkPolicy, Pod Security admission in the agents' namespace (a run pod runs as uid 10001 with RuntimeDefault seccomp, no privilege escalation and all capabilities dropped, which restricted admits, but this was not tried; its root file system is writable: the template, like the coder chart's, sets no readOnlyRootFilesystem, a correction of 2026-10-27), the CI jobs of this slice (operator.yml's lint, test and chart, operator-image.yml's api-image with the new shape of api --check, docs) before they have run, and the whole against netcup.

Run where this was written: cargo fmt --check, cargo clippy --workspace --all-targets --locked -- -D warnings, cargo test --workspace --locked, render-check.sh, tools/adam-parity/regen.sh --check against a clone of adam-rs at 3f714d0, run-pods-admission.sh (twice, against the two charts' policies, on the bare server above), api --check on the five shapes, and mutation of each new guarantee (an operator that renders the rules with run pods off, that can bind any Role, that can make pods, that can read Secrets; a policy that audits, that drops the rule on root, that judges every account, that fails closed on a missing parameter; a quota on another scope; a network policy without TCP on 53; a digest that includes the applied objects; a spec that serialises null; a provider that leaves run pods behind; a chart that accepts an unknown key or a run image with no digest, or tells the API no class; a form that drops the class; /v1/info that offers none): each fails a named check, listed in the pull request.

D15b built (2026-10-27): the kind end-to-end of run pods, the half of D15 that needs a cluster: deploy/operator/tests/e2e/run-pods-e2e.sh and the job run-pods-e2e of operator-image.yml (it needs the job image and runs the operator image that passed its smoke test; push does not need it, decision 1 below). It installs the operator chart in kind twice, first with --set runPods.enabled=false and then without the flag (the upgrade, the only difference), and runs the real adam-rs coder, pinned by tag and digest in run-pods.yaml and nowhere else (ghcr.io/vymalo/another-adam-rs/coder:sha-3f714d0@sha256:3686145…, adam-rs main at #131, which contains #117), as two agents: e2e-plain, a token-variant coder with no run pods, made before the upgrade, and e2e-coder, a GitHub App coder with coder.runPods. The coders talk to a scripted model, a Node script that the coder's own image runs from a ConfigMap (so nothing else is pulled), which makes the same three turns for every task (a project, run_command with a probe, the answer). The script shows, in this order:

StepShownBy
1, 3With run pods off there is no PriorityClass, policy, binding, Role or settings, and the operator may not make a service account; after the upgrade they exist, the policy type-checks with no warning, and the operator may bind that one Role and may not make a pod, exec, read a Secret, make a Role, escalate, bind another Role or make a policykubectl auth can-i --as against the Roles the chart rendered
2, 3, 9An agent without run pods is untouched by the upgrade (the same objects, the same pod uid, start time and restart count, the same StatefulSet generation, the same config digest), runs its commands in its own container, and can ask for run pods (the objects appear, its pod is replaced) and stop asking (its set of objects is again the one it had)recorded before, compared after
4The operator made, for e2e-coder alone, the account, the quota (two pods, scoped to the class), the network policy, the binding, the template and the guard's parameters, each owned by the service; the coder's pod runs as the account with the template mounted and says it runs commands in a pod of its own; the account may make, get, list, watch and delete pods and exec, and may not read a Secret or a ConfigMap, patch a pod, make a binding or make a pod elsewhere; run-pods-admission.sh runs in the cluster as that account against the policy the chart installed and the parameters the operator madethe objects, can-i, the admission script
5Two runs hold two run pods made from the operator's template and started by the kubelet (Running and Ready, labels, priority class, template resources, the image by digest, the init container, no Secret volume, no token); the command ran in each (the pod is the host it saw, its lines are the lines of the answer); each pod mounts its run's directory of the coder's volume and nothing else of it (the spec, the annotation, ls from inside); the pod of B, told to look at A's directory, finds it absentthe pod's spec and a probe the command writes in the pod
6The quota counts two of two; a pod of the run class made by an administrator is refused with exceeded quota; a third run, in a repository of the coder's volume, says as a step of its stream that it waits for a slot, with the cluster's words, has no pod, is still working, and the model was asked its first two turns onlystatus.used, the API server's refusal, the coder's SSE steps, the model's journal
7From the pod of A, DNS and a public address answer and the model's Service address does not (000) while the coder's own pod reaches itcurl; needs a network plugin that enforces policies (kind's does); AAP_E2E_CNI_MAY_IGNORE_POLICIES=1 makes it a warning
8A is released, completes, its pod goes with its run; the third run gets the slot and a pod, sees its own run, its own mirror (read-only: a write is refused), its worktree, git works, and sees neither A's nor B's nor the other mirror; B and C complete, no run pod is left, the quota counts nonethe janitor of the coder, the probes
10With a run holding a pod, e2e-coder is deleted: the finalizer completes, the run pod, the workload, the service, account, quota, network policies, binding, template and parameters are gone, only the claim stays (Retain), and the chart's own objects staykubectl get of each
11None of four secrets of the run (the model's key and a GitHub token, sentinels; a random A2A bearer; the App's key, generated) and no panicked at is in an answer, in the model's journal or in the logs of the operator, of e2e-plain, of the model and of e2e-coder at its start (each log must come from a kubectl logs that succeeded and hold a line only its component logs)grep of every log and answer

The script follows the house style of api-e2e.sh and chain-e2e.sh: it refuses a context that is not kind-* (AAP_E2E_ALLOW_ANY_CONTEXT=1 for another throwaway cluster), works in a namespace of its own, aap-e2e-runpods, that it makes with a label and refuses if it exists without it, applies over and deletes only what carries the label, undoes only what it got as far as making (agents first, with the operator still there to run the finalizer, then the Helm release, then the namespace; a signal runs the cleanup), pins HELM_KUBECONTEXT, uses printf for anything that can hold a body, and prints no line that holds a secret of the run when it fails. render-check.sh renders its values and holds what the script depends on (388 checks in all, nine of them new, each broken on purpose), bin/operator/tests/e2e_run_pods_fixture.rs resolves its two coders with the operator's own aap_domain::resolve and holds the pin, and the model has seven tests of its own (node --test, in the workflow's scripts job).

Verified where it was written (2026-10-27), and what that is not. No container daemon and no kind exist here, so the script was walked under dash, start to finish, against: a bare kube-apiserver v1.35.8 with etcd (RBAC on, the v1 admission policy API, quota admission), the real operator binary built from this branch, running as its own service account (its token from kubectl create token: not one reconcile of the run was Forbidden, so the chart's Role is enough under real RBAC), the real adam-coder built from adam-rs main (the code of 3f714d0; the two later commits only bump deploy/ tags) in Kubernetes mode, a Postgres 16, the real kubectl and the real helm template (v3.19.0), and a stand-in for the kubelet and the controllers (scratch, not committed): a pod gets a mount namespace in which its volumes are bind-mounted as its spec says (sub-paths, read-only), its account's token, status, the quota's status.used, garbage collection of owned objects, and an exec over a socket. All eleven steps passed (44 assertions printed ok, exit 0), with the real answers of the API server for the quota's refusal (exceeded quota: e2e-coder-run-pods, requested: pods=1, used: pods=2, limited: pods=2), run-pods-admission.sh (every case of its table as expected), can-i and the admission of the pod of the template, and the real coder's own steps for the wait for a slot. That is a walk of the script's mechanics and of the operator's and the coder's behaviour against a real API server. It is not a kubelet: the image is not pulled, no container runs under a container runtime, the init container that copies the tools is not run, no network plugin exists (step 7 passes there only because the stand-in's run pod has no route to the Service address by construction, so the check was also run with a route, below), and the readiness, the timings and the 3 GB pull are CI's. The pin was read again from ghcr.io anonymously on 2026-10-27 (the manifest of the tag is a Docker v2 image manifest, not an index, whose digest, docker-content-digest and the sha256 of the body, is the one in the file; 14 layers; six of the workspace image's seven layers are the coder's, so the run pods pull one layer more).

Each assertion that matters was broken on purpose, one edit at a time in a copy of the tree, and the walk failed where it should (seven mutations of the world, each a walk of its own, each failing in the step it should: a quota of three pods in the values (step 4; and with that assertion neutralised, step 6, which finds the third pod admitted); the second install with run pods off (step 3); a kubelet stand-in that mounts the whole workspaces directory in a run pod (step 5); a run pod that can reach the Service address (step 7, after its 60 s; with AAP_E2E_CNI_MAY_IGNORE_POLICIES=1 the same world passes with the warning); a quota named for the plain agent (step 2); a model that ends a run without the command's output (step 8); a model whose journal keeps the key it was sent (step 11). Four attempts did not take effect the first time and were redone, and the walks that ran beside a leftover process of the stand-in were thrown away; nine checks of render-check.sh are new and each fails when its input is broken (listed in the message of the commit that adds them)).

What only CI can prove, and is therefore unverified until the job has run: that the real kubelet pulls the coder, the run image and Postgres by digest, starts the run pod from the operator's template (its init container, uid 10001, the mounts with sub-paths on a real volume, the readiness) and that the coder's adam-kube-exec reaches it by the WebSocket exec on Kubernetes 1.35 with the Role the chart made; that kindnet enforces the egress rule of the policy for a new pod after a moment (the script waits up to 60 s) and refuses the Service address of the model while it answers the coder's pod; that the coder's volume in kind (a PVC of the default storage class) holds workspaces/<run> as the template mounts it; the timings (READY_TIMEOUT_SECS, 1500 s by default, POD_TIMEOUT_SECS, TASK_TIMEOUT_SECS); the disk of the runner; and the workflow's syntax (actionlint passes here, nothing has run it).

Decisions this slice took, for the owner to confirm: (1) run-pods-e2e does not gate push (recommended, as D13's): it pulls a 3 GB image of another repository, pinned here, and waits for pods and a quota, so a flake of those, or a pin that has gone bad, would block the operator's release for a reason that is not the operator's; run pods are off by default, so a red run does not put a broken default into the image; to make it gate, add it to needs of push (one line; the workflow's header and the comment at push say so). The alternative is to gate: the job then must be stable enough, and the first runs tell. (2) The coder's pin is the fixture's own (sha-3f714d0) and defaultAgentImage (sha-9a1fd4e) is not moved: moving it needs coder-vymalo and coder-me to ask for run pods or acknowledge the risk in the same change (D15a decision 7), which is the owner's. (3) The model is a script that the coder's own image runs, where the alternative is a mock image (one more pull and one more pin); the cost is that the script is Node run in the coder's image and tested with node --test beside the shell. (4) The network check needs a plugin that enforces policies and fails otherwise: kindnet enforces an ingress policy (verified 2026-10-16 by api-e2e.sh's policy step) but an egress rule with ipBlock.except, which is what a run pod's policy is, has not been asked of it in this repository before, so step 7 is the first time and a red run there is a finding about the plugin as much as about the chart; AAP_E2E_CNI_MAY_IGNORE_POLICIES=1 is the escape, as the API's end-to-end's, and a warning says what was not proven. (5) The third pod past the quota is made by an administrator, with the run class, because the guard keeps the agent's own account from a pod that is not the template's, and the coder's own refusal is shown by its stream (the step that waits, with the cluster's words), where the alternative is to ask the coder to make a third pod, which it does the moment a slot is free. (6) A GitHub App coder with a made-up App (its id is not real, its key is generated for the run and parsed at start, no task names a GitHub repository) is the run-pods coder, because at 3f714d0 the App key file next to local commands is refused unless run pods hold the commands; the run in a repository uses ALLOW_LOCAL_REPOS, a development setting of the coder, so that no git server is needed. (7) The script copies the guards and helpers of the other two (the third copy), where the alternative is a shared library that would touch the green jobs' scripts. Also chosen, not decided: the janitor's sweep is 10 s (workspaceSweepSecs) so that a release is not a wait of a minute; the quota is two pods so that it can be filled; the node image is v1.35.8 by digest, as the other kind jobs'.

Unverified, still: all of the paragraph above that only CI can prove; a Kubernetes older than 1.35 (the policy's params in a match condition; the v1 admission policy API from 1.30) (amended 2026-11-27, AD-067: the floor is now 1.37, unverified until CI has run run-pods-e2e on v1.37.0) and the exec verb as the API server authorizes a WebSocket on 1.35 and later, which the job shows on 1.35.8 only once it has run; Pod Security admission in the agents' namespace; a second node; a real model and a task that edits files and opens a pull request; netcup. D15 stays open until the job has run green. (Amended 2026-10-27, D15c: the job has run green, run 40435825771 at 0b5a67f, job run-pods-e2e, verified 2026-10-27 with gh run view; D15 stays open until it has run green with D15c's checks.)

Amended 2026-10-27, found by run-pods-e2e's first full run (run 40432460348, step 9): a service that stops asking for run pods could be left at 0 pods for good. The script gave e2e-plain (a token coder) coder.runPods and took it away again: the operator removed the quota, the network policy, the binding, the parameters and the account, rolled the StatefulSet, and the new pod was refused (error looking up service account aap-e2e-runpods/e2e-plain: serviceaccount "e2e-plain" not found): e2e-plain was Degraded, 0/1, and the template ConfigMap e2e-plain-run-pod was still there after 120 s. Two faults, both the provider's. (1) ensure cleared everything, the account included, before it applied the workloads, so for the moment between the two the StatefulSet still named an account that was gone; and the template (a file set) was left to remove_stale_config_maps, which runs only once the service is Ready, which it could not become. (2) Applying the workload without the account did not take the name out: a real API server keeps the deprecated serviceAccount of a pod template through a server-side apply that leaves serviceAccountName out (the field is one value on write, the apply releases the one it owned, and conversion fills serviceAccountName from the other), so the template named the deleted account even after a correct apply. Verified 2026-10-27 on a bare kube-apiserver v1.35.8 with etcd 3.6.4, StatefulSet and Deployment, kubectl apply --server-side under a field manager: an apply with serviceAccountName: acct, then one without it, answered serviceAccountName: acct and serviceAccount: acct, and managedFields held neither; a JSON merge patch that nulls only serviceAccountName answered "no change"; one that nulls both removed both, and a further apply without them kept them removed. The fix (aap-runtime-kubernetes): the removal is in two halves around the apply. First the right to make pods and the pods go (the binding, then the run pods), as before; then the workloads are applied without the account, and any workload whose answer still names an account that its render does not gets that merge patch (both names null; sent only then, so a render without run pods sends nothing and a workload an earlier operator left naming a deleted account is freed by the next pass, whether or not the provider is clearing); only then the quota, the network policy, the parameters, the template and, last, the account. The delete path is as it was. Proven by tests/run_pods_api.rs against a fake API server that now copies that one rule of the real server and records an account deleted while a workload names it (it fails on the code before: ("coder", "coder")), with a mutation of each guarantee (the account first, no patch, a patch of only serviceAccountName, a patch that is always sent, the template kept, the template deleted though it is not ours, the account before the rest, the patch only while clearing: each fails a named test), and by tests/cluster.rs against a real API server (a bare kube-apiserver v1.35.8, run on 2026-10-27: it passes on the fix and fails on the code before, and fails on a patch of only serviceAccountName). What that is not: the fake has no StatefulSet controller, so the order of the account's deletion against the rollout is held by the fake's record and by reading the requests, not by a pod; run-pods-e2e step 9 is what shows it with a kubelet, and has not run since the fix. One more rollout may follow the apply (the patch is a second change of the template), which is a restart and not a stall.

D15c built (2026-10-27): a run pod made by the platform is no more open than one made by the coder chart. adam-rs closed the network of a run pod (its ADR 0042, #134 and #135, ff10395 and 7598255): deny by default, the run pods' NetworkPolicy allows DNS, the pods of an HTTPS-only egress proxy (adam-egress, in the coder's image) on 3128, and extraEgress; the rule that let a run pod reach the whole internet is gone, and no value brings it back; the proxy is a Deployment, Service, ServiceAccount, allow-list ConfigMap, PodDisruptionBudget and NetworkPolicy beside the run pods; and the run-pod template carries HTTPS_PROXY, HTTP_PROXY (lower case too) and NO_PROXY. The operator now makes the same, per agent, with the agent's name in place of the release's. aap-ports gains EgressProxy, and RunPods::network is required (a spec with run pods and no policy for them is not one); aap-domain reads egressProxy in the settings (RunPodSettings::validate repeats the coder chart's checks), adds the six variables to the template and describes the proxy (adam's names stay in the domain); aap-runtime-kubernetes makes the six objects and the deny-by-default policy, applies, updates and clears them in an order that never leaves a run pod under no policy; the operator chart gains runPods.egressProxy.{allow, extraAllow, extraNoProxy, replicas, ports, resources} and loses runPods.networkPolicy.enabled; the parity goldens move from 3f714d0 to 7598255; and run-pods-e2e.sh asks the kind cluster what adam-rs's kind-run-pods.sh asks of its own. With run pods off, nothing of this is rendered or made: the four golden renders of the chart with run pods off (the defaults, netcup, secret.values.yaml, the Platform API) are byte for byte what they were, and only the runpods one moved, by the settings it writes.

WhatWhereProven by
Parity at adam-rs 7598255tools/adam-parity (the pin, extract.py projects the proxy's six objects found by app.kubernetes.io/component: egress-proxy), the seven goldens, two cases that move the proxy off its defaults (three replicas, two ports, more hosts, names and resources; one replica and no budget)regen.sh at that revision (the diff of the goldens: the revision alone for the three cases without run pods, so the env contract of a coder did not move; the template's six variables, the run pods' policy, and the proxy under runPods.egressProxy for the four with them), crates/domain/tests/parity.rs
The six variables of the templateaap-domain (run_pods.rs, contract::run_pods::egress)the template of each of the four cases equal to the chart's; tests/run_pods.rs
The proxy's objects and the deny-by-default policyaap-runtime-kubernetes (render.rs)tests/run_pods_parity.rs: Deployment (replicas, strategy, selector, pod labels, the annotation key that rolls it, account, token, security context, volumes, and the container field by field: command, image, pull policy, security context, lifecycle, probes, ports, resources, mounts, variables), Service, ServiceAccount, allow-list (to the letter), budget, the proxy's policy and the run pods' policy, in the four cases; a mutation of the grace period or of a probe's period fails it
Apply, update, clear, orderaap-runtime-kubernetes (provider.rs)tests/run_pods_api.rs against the fake API server: sixteen objects in the order proxy, proxy policy, run pods' policy, binding; nothing of the proxy taken for stale; a changed list rolls the pods and strands nothing; fewer replicas take the budget away and only it; a foreign object of any of the six names blocks and nothing is written; on stopping and on delete, binding, run pods, the proxy's Deployment and budget, its policy, the run pods' policy, then the quota, the Service, the file, the parameters, the template, the accounts last; no account is deleted while a Deployment names it (the proxy's); a mutation of that order fails the test
The settingsaap-domain (RunPodSettings), the chart (values.yaml, _validate.tpl, templates/config.yaml's runPods block)RunPodSettings::validate, each rule tested in tests/run_pods.rs; render-check.sh: the default list is the coder chart's, host for host (a test in run_pods_parity.rs holds the two equal), the render refuses an empty list, a URL, a port, a wildcard, an IP address, a bare suffix, no port, port 0, a port above 65535, no replica, a name with a space or a comma, an unknown key, null, a resource that is no quantity, a proxy variable in extraEnv, an IPv6 range and networkPolicy.enabled: false; each new check was broken on purpose (below)
The operator's Roledeploy/operator/templates/role.yamlunchanged: Deployments, Services, ConfigMaps, NetworkPolicies and PodDisruptionBudgets were its rights already and ServiceAccounts came with run pods; still no Secrets, no right to make a pod or exec (render-check.sh)
The kind end-to-endrun-pods-e2e.sh, run-pods.yaml (the pin moves to sha-7598255)unverified until CI has run the job; see below

What the job shows once it has run (step 4 and step 7 of the script, 9 to 11 gain the proxy's objects, pods and log): the six objects exist, owned by the service, and the proxy is rolled out (two pods of the coder's own image, no token, a read-only root file system, nothing mounted but its allow-list); the run pods' policy names the proxy and no address; from a run pod made by the operator, after the controls (the coder's own pod reaches the model's pod and Service; the proxy's own pod reaches registry.npmjs.org on 443), a direct connection to a public address, to the API server (by name and by address) and to another pod's IP is refused, as is a packet to another port of the proxy; the proxy's pods reach no public address on 80 and no pod; a pod that is not a run pod cannot use the proxy; curl https://registry.npmjs.org/ and npm view is-number version succeed through the proxy; https://example.com/ is answered 403; the proxy's log holds the decisions and no byte of what the requests carried, and no secret of the run; no policy names an IPv6 range. The script fails where the plugin does not enforce (AAP_E2E_CNI_MAY_IGNORE_POLICIES=1 makes the refusals warnings, as before).

The coder's pin moves (run-pods.yaml, the one place): ghcr.io/vymalo/another-adam-rs/coder:sha-7598255@sha256:6e74b292…, verified 2026-10-27 by anonymous requests to ghcr.io: the manifest of the tag is a Docker v2 image manifest (not an index), 14 layers, 3.0 GB, linux/amd64, user 10001, entrypoint tini -- adam-coder, label org.opencontainers.image.revision the full hash of 7598255, and a layer in its history that copies adam-egress next to adam-coder (adam-rs's docker/coder/Dockerfile at that revision installs it and smoke-tests command -v adam-egress). The image was not unpacked here: that the binary is in /usr/local/bin is read from the history and the Dockerfile, not seen. defaultAgentImage (sha-9a1fd4e) is not moved, and it has no adam-egress: decision 2.

Verified where it was written (2026-10-27), and what that is not. cargo fmt, clippy -D warnings and cargo test --workspace with --locked; render-check.sh (the checks of the slice are new and each was broken on purpose, one edit at a time in a copy of the tree: a host of the default list removed, storage.googleapis.com added, the default replicas changed, the refusal of enabled: false removed, the key written to the settings file, each of the refusals removed, a trace of the proxy rendered with run pods off, an object of the proxy rendered by the chart, a rule added to the operator's Role, the proxy's name changed in the script: each failed the check made for it, listed in the message of the commit); docs-check; shellcheck 0.9.0 and dash -n on the script; the jq programs of the script run against the objects the operator makes (the golden render) and failing under seventeen of eighteen mutations of those objects (a writable root file system, a token, a secret in the environment, a wrong port in either policy, an open run pods' policy, an IPv6 range, a host that opens a bucket, a node port, a budget of two, a missing no_proxy, no owner, one replica ready, a command without tini, no ipBlock at all; the eighteenth, another image, is compared with the fixture's pin, which the harness does not have). That is not a cluster. No container daemon, no kind and no network plugin exist where this was written, so the following are unverified until the job run-pods-e2e has run: that a kubelet starts the proxy from the pinned image (and so that adam-egress is in it); that kindnet drops the direct connections and the packet to another port, after the retry the script allows; that curl and npm of the workspace image read the variables the template gives and the proxy answers them; the log lines the script greps (they are adam-rs's, as its script reads them); the order of the clearing against a real API server (the fake API server holds it: it lists in name order, which the code no longer relies on); and the workflow's syntax in a runner. git, cargo, pip and go reading the variables are documented by adam-rs and tried by nobody; IPv6 egress cannot be tried on kind, and what is shown is that no rule allows it.

Decisions this slice took, for the owner to confirm: (1) The allow-list is the deployment's, and an AgentConfig cannot extend it (recommended): runPods.egressProxy.allow and extraAllow are values of the operator chart, like the quota and the network policy (D15a decision 9); a person who may edit an agent cannot widen what its run pods reach. The cost: a host one agent needs is allowed to every agent of the deployment, and a change is a Helm change and a restart of the operator, then a rollout of every proxy. The alternative is a field of the config (coder.runPods.extraAllow, a list of hosts, checked by the same rules) behind a permission of its own; it would be a new field of the CRD and a new row of the permission table, so it is a slice, not a line. (2) The operator documents that the agent's image must contain adam-egress, and does not refuse one that does not: the proxy runs the agent's own coder image, as the coder chart's does, so an image older than adam-rs ff10395 has no such binary, the proxy's pod never starts, and a run pod, under a policy that denies the rest, reaches nothing. The operator cannot tell: an image is a tag (sha-<7 hex>) with no order, the card says nothing of it, and a list of known tags in aap-domain would be a second copy of adam's history. defaultAgentImage is such an image, so an agent with run pods that names no environment.image of its own gets a proxy that does not start; the chart's README says so where defaultAgentImage is, and the fixture of the end-to-end names its own. The alternatives: a deployment setting for the proxy's own image (runPods.egressProxy.image), which separates the proxy's pin from every agent's and is a deviation from the coder chart (it would be the only object of run pods whose image is not the agent's), or moving defaultAgentImage, which the owner decided not to do until coder-vymalo and coder-me ask for run pods or accept the risk (D15a decision 7). (3) The proxy is no workload of the service: its Deployment is not read by the observation (its component is no Role), its pods are not the service's pods, and so a proxy that is down leaves the service Ready with its replicas and no issue. The reasons: Phase is the state of adam's process, and a failed proxy does not stop the coder, only the fetches of its commands; listing in the registry depends on Ready, and delisting a coder because its proxy is down would be a large reaction to a small cause. The cost: nothing in the status says it; kubectl get pods -l app.kubernetes.io/component=egress-proxy does. The alternative is to fold the proxy's rollout into Ready (the coder chart does it implicitly: helm --wait waits for every Deployment). (4) runPods.networkPolicy.enabled is gone, as in the coder chart: false is refused by the chart (the message says what to use instead), true is tolerated and not written, and the operator's settings file refuses the key (it refuses an unknown key), as it now refuses a file with no egressProxy. The operator and its chart move together (one release), and so do aap-ports and its providers: RunPods::network is not optional any more, which breaks every literal of RunPods (the testkit's is updated) and obliges a provider for another substrate to make a proxy or refuse the spec. (5) The proxy's pods carry no managed-by: the labels of their objects say the operator made them (managed-by: aap-operator, which the adoption guard and the listings need), and their pods carry the three selector labels of the coder chart (name: <svc>-egress, instance, component: egress-proxy) and nothing else, so the service's own ingress policy (which selects by managed-by and the instance) and the listing of its pods never take them. (6) The order: applied, the proxy and its policy before the run pods' policy and the binding before nothing is made into a network with a policy and no way out; cleared, the binding, the run pods, the proxy's Deployment and budget, its policy, the run pods' policy last of the policies, the Service and the file, the parameters and the template, the accounts last. What the order cannot do: the proxy's terminating pods outlive their policy by up to 45 s (a proxy holds no credential and no token and dials only allowed public hosts; its ranges are kept twice on purpose), and a run pod made in the instant between the listing of the run pods and the loss of the binding is the race D15a already had, now under a policy that denies. (7) Pods made before the upgrade lose their way out: the run pods' policy is replaced in place, the pods have no proxy variables, and they reach nothing until their run ends or the idle sweep (runPods.idleSecs, 900 by default) replaces them, as adam-rs's ADR 0042 says. (8) The proxy's scheduling (nodeSelector, tolerations, affinity) is not a setting of the operator chart (the coder chart has them): the brief of the slice named six settings, the proxy needs no volume and runs anywhere, and a deployment that reserves nodes for run pods can ask for them when it needs them. (9) checksum/egress-allow holds the SHA-256 of the allow-list file, where the coder chart's is a hash of its rendered ConfigMap: the same key (a changed list rolls the pods), another value, listed among the differences on purpose. (10) The operator's Role does not change: no verb is added for the proxy.

Unverified, still: everything the job above would show; a cluster whose network plugin does not enforce NetworkPolicy (it gets the proxy and no deny); the owner's cluster CIDRs (clusterCIDRs, which only the owner knows); domain fronting, what an allowed host accepts and DNS as a channel (adam-rs's ADR 0042, "What is not covered", all of it applies here); and git, cargo, pip and go through the proxy. D15 stays open until the job has run green with these checks. (Amended 2026-10-27: the job has run green with D15c's checks, run 40484065490, job run-pods-e2e 122121514621, verified 2026-10-27 with gh run view: step 7, the network checks, passed after a fix to step 5's mount expectation (a run pod mounts each slot of its run on its own: 5c94029). Step 7 asserts that a kubelet starts the proxy from the pin, that kindnet drops the direct connections and that curl and npm go through the proxy; it passed. D15 stays open until it has run green with D15d's checks, below.)

D15d built (2026-10-27): the coder's own git runs where no secret is readable. adam-rs closed vymalo/another-adam-rs#118 in #136 (05cda7f: adam-git-sandbox, a server on a Unix socket that runs the one git it resolved at start, and adam-git, the relay the coder talks to it through) and #137 (581aeed: the coder chart's pod): git runs what a repository's configuration names (a filter.x.clean, a core.fsmonitor) and some repositories are the run's own, so in the coder's container that program could read the GitHub App's key, the model key and the service-account token. With runPods.enabled the chart renders the coder's pod with a git-sandbox native sidecar (the coder's own image, first of the init containers, mounting the work volume at the same path, its socket's emptyDir and a /tmp of its own and nothing else: no Secret, no variable from a Secret, no token, a read-only root file system, a process namespace of its own), the token as a projected volume of the coder container alone (automountServiceAccountToken: false on the pod) and GIT_SANDBOX_SOCKET. The operator now makes the same. It changes no object and no right: the sidecar and the volumes are in the pod template of a StatefulSet it applied already. aap-ports gains VolumeSource::Scratch (an emptyDir, in memory and sized or not), VolumeSource::AccountToken (the credentials of the workload's account, which check lets the agent container alone mount) and Container::read_only_root_filesystem, and Workload::service_account stops meaning "with its token mounted"; aap-domain reads runPods.gitSandbox in the settings (RunPodSettings::validate repeats the coder chart's checks), makes the sidecar, the volumes, the mounts and the variable for the workers and for no other workload, and reserves the names and directories it uses when run pods are on; aap-runtime-kubernetes renders the two volumes and the flag and never automounts a token; the operator chart gains runPods.gitSandbox.{resources, tmpSize, maxCommands}; the parity goldens move from 7598255 to 581aeed; and run-pods-e2e.sh asks the kind cluster what adam-rs's kind-run-pods.sh asks of its own, of the pod the operator made. With run pods off, nothing of this is rendered or made: the three goldens without run pods differ from before by the revision alone, the four golden renders of the operator chart with run pods off are byte for byte what they were, and only the runpods one moved, by the settings it writes.

WhatWhereProven by
Parity at adam-rs 581aeedtools/adam-parity (the pin; extract.py projects emptyDir and projected volumes whole and a container's readOnlyRootFilesystem, and raises for any other container security context it does not know), the seven goldens, the tuned case with other sandbox settingsregen.sh --check at that revision (the diff of the goldens: the revision alone for the three cases without run pods, so neither the env contract nor the pod of a coder with run pods off moved; for the four with them the revision, GIT_SANDBOX_SOCKET, two mounts, the sidecar, three volumes and automountServiceAccountToken: false), crates/domain/tests/parity.rs
The sidecar, the volumes, the mounts and the variableaap-domain (run_pods.rs, contract::run_pods::git_sandbox)the four cases equal to the chart's, field by field (tests/parity.rs); one function asks "does the sandbox hold what the coder holds" of the chart's golden and of the operator's spec (it mounts the work volume, its socket and its /tmp and nothing else, has no variable from a source, a read-only root, and the coder container alone mounts the credentials), a split front has none of it; the sandbox follows a work volume mounted anywhere (a path with a space is quoted in the probe); tests/run_pods.rs (+7)
The real renderaap-runtime-kubernetes (render.rs)tests/run_pods_parity.rs: the pod's token setting, the git-sandbox container field by field, the three volumes with the chart's projected sources whole, the coder container's two mounts and the variable, who mounts the credentials in the render itself, in the four cases; a split front has none; tests/run_pods.rs: no envFrom, no variable from a source, no volume that carries a credential in the sandbox, no shared process namespace, and a coder without run pods has none of it; the golden coder-run-pods.yaml
The settingsaap-domain (RunPodSettings, GitSandboxSettings), the chart (values.yaml, _validate.tpl)RunPodSettings::validate (a memory limit required, quantities, a size above zero, 1 to 4096 commands, no switch, the key required), the operator refuses a file with none of it at start (bin/operator/tests/cli.rs); render-check.sh: the same refusals at render, the settings the chart writes, nothing of the sandbox with run pods off, and the defaults held equal to the coder chart's (a test in run_pods_parity.rs); each new check was broken on purpose (below)
The operator's Roledeploy/operator/templates/role.yamlunchanged, and it needs nothing new: the change is the pod spec of a StatefulSet the operator applies already, and a pod's volumes and containers are not an object it makes; still no Secrets, no right to make a pod or exec (render-check.sh holds the Role rule by rule)
The kind end-to-endrun-pods-e2e.sh (step 4b), git-sandbox-vector.sh (vendored), run-pods.yaml (the pin moves to sha-581aeed)ran green in CI: run 40520862547, job run-pods-e2e 122249371008, at b8290bf, verified 2026-10-27 in its log; see below

What the job shows (run 40520862547, job run-pods-e2e 122249371008, at b8290bf, verified 2026-10-27 in its log; step 4b of the script; steps 2, 8, 9 and 11 gain a few lines): of the pod the operator made for e2e-coder, the real coder running in it, that it automounts no token, shares no process namespace and has no token volume the API server added; that the sidecar is a native sidecar of the coder's image with a read-only root file system, no envFrom and no variable from a source, mounting the work volume, its socket and its /tmp and nothing else, ready and not restarted; that no container but the coder's mounts a volume that carries a credential; the controls: the coder container's token is accepted by the API server, and it holds the App's key and the model key, the bearer and the database URL; that the sandbox has no token file, no key, nothing under /run/secrets, no mount of a secret or of the template, none of the five secrets in its environment, and its process 1 is its own tini -- adam-git-sandbox with no process of the coder in sight; that adam-git through the socket makes a commit that is the same in both containers and refuses a directory outside /work; that the vector (a scratch repository whose own configuration names a filter and an fsmonitor, vendored from adam-rs) added by plain git in the coder container reads all five secrets and added through the sandbox reads none, running as the sandbox's tini's child; that the sandbox's log has the commands and no secret; that the sandbox's log holds a git worktree that the coder itself ran for run C; and that e2e-plain has none of it with no run pods, has the sandbox and the credentials in the coder container alone when it asks, and none again when it stops asking.

The coder's pin moves (run-pods.yaml, the one place): ghcr.io/vymalo/another-adam-rs/coder:sha-581aeed@sha256:5e851765…, verified 2026-10-27 by anonymous requests to ghcr.io: the manifest of the tag is a Docker v2 image manifest (not an index), 14 layers, 3.0 GB, linux/amd64, user 10001, entrypoint tini -- adam-coder, label org.opencontainers.image.revision the full hash of 581aeed, and a layer in its history that copies adam-coder, adam-agent, adam-kube-exec, adam-egress, adam-git-sandbox and adam-git into /usr/local/bin. The image was not unpacked here: that the binaries are there is read from the history. The newest tag at or after 05cda7f was taken: adam-rs's deploy/coder/values.yaml still named sha-05cda7f (the bump to the tag of #137 had not been committed), and sha-05cda7f has the same layer; the pin is the one whose chart the goldens are rendered from. defaultAgentImage (sha-9a1fd4e) is not moved, and it has neither adam-egress nor adam-git-sandbox: decision 2.

Verified where it was written (2026-10-27), and what that is not. cargo fmt, clippy -D warnings and cargo test --workspace with --locked; tools/adam-parity/regen.sh --check at 581aeed (helm 3.19.0); render-check.sh (the new checks were broken on purpose, one edit at a time in a copy of the tree, below); bump-tag-test.sh; docs-check; shellcheck 0.9.0, dash -n and actionlint on the script and the workflow; the jq programs of step 4b run against a pod and a StatefulSet made from the operator's golden render, passing, and failing under seventeen of seventeen mutations of the pod (a shared process namespace, an automounted token, an injected token volume, a writable root, a variable from a Secret, an envFrom, the token, the App's key or the template mounted in the sandbox, the GitHub server holding the token, the coder container without the token or with it writable, a socket that is not the sandbox's, a sandbox not ready, restarted, not a native sidecar or of another image) and under three of the four mutations of the StatefulSet (the fourth, an automounted token, is step 4's own line). That is not a cluster. No container daemon, no kind and no network plugin exist where this was written, so the following were unverified until the job run-pods-e2e ran, and it has run green (run 40520862547, job run-pods-e2e 122249371008, at b8290bf, verified 2026-10-27 in its log): that a kubelet starts the sidecar from the pinned image and the coder container after its startup probe passes; every command of step 4b in the coder's image (awk, find, stat, curl, tr are used, and adam-git; adam-rs's script runs them in a test image, not in this one); the vector's marker; the shape of the sandbox's log lines ("subcommand":"add" is adam-rs's, as its script reads it); that run C's git worktree is among them; and that runs A, B and C, whose local git now runs in another container with the same volume, behave as before. A work volume mounted anywhere but /work (the sandbox's root, mount and probe follow the config; adam-rs's chart and tests have /work only) is shown by the parity test as a render and by nothing on a cluster.

Decisions this slice took, for the owner to confirm: (1) There is no switch while run pods are on (recommended, as the coder chart): runPods.gitSandbox has resources, tmpSize and maxCommands and no enabled, and a file or a values file that has one is refused. The sandbox is what makes a run pod's coder safe to run next to the repositories a run writes; a switch would be the way to run run pods without it. The alternative is a switch with a warning for a deployment whose image is older; it would be a second mode to test. (2) The agent's image must contain adam-git-sandbox (adam-rs 05cda7f or later), and the operator documents it and does not refuse an older one (the same answer as D15c's decision 2, for the same reason: an image is a tag with no order and a list of known tags would be a second copy of adam's history). The difference is how it fails: the proxy's pod not starting left the service Ready, but the sandbox is a native sidecar the coder container waits for, so an older image keeps the coder's pod from ever being ready (Init:0/2, the service not Ready, and, once the kubelet backs off, the service's status naming the container: CrashLoop, "container git-sandbox keeps exiting", which the observation reads from the init container statuses (status.rs, read, not seen on a cluster)). It is loud, and it is a coder that does not start where it started. defaultAgentImage is such an image: an agent with run pods that names no environment.image of its own does not start; the chart's README says so where defaultAgentImage is. The alternatives: a deployment setting for the sandbox's own image (runPods.gitSandbox.image; the only container of the pod whose image is not the agent's, and a deviation from the coder chart), refusing by a list of known tags, or moving defaultAgentImage, which the owner decided not to do until coder-vymalo and coder-me ask for run pods (D15a decision 7). (3) The pod never automounts a token, and Workload::service_account changes its meaning (recommended): until D15d it was "the account the pods run as, with its token mounted", and the provider set automountServiceAccountToken from it, which puts the token in every container of the pod, the sandbox's included; the token is now a volume (VolumeSource::AccountToken) that the agent container names, and check refuses a sidecar that mounts it. Cost: the neutral spec has two new variants of a closed enum and a new field, which broke every match and every Container { .. } literal (updated here), and a provider for another substrate must render the volume. A spec without run pods serialises as before, so no digest of an agent without them moved. (4) A size of zero for the sandbox's /tmp is refused here and not by the coder chart: a tmpfs mounted with size=0 has no limit at all, which is what the size is for. The cost is one difference from the coder chart, written in the goldens' README. (5) Turning this on rolls every coder that has run pods, once, and so does a change of the sandbox's settings: the pod template changes (a sidecar, three volumes, a variable, the token), and the digest has what a pod reads, as for the template and the variables of run pods. A coder without run pods does not move by one byte. The alternative, leaving the sandbox's settings out of the digest, would leave pods running the old limits after a change. (6) The sandbox's root, mount and probe follow the work volume's mount path (the coder chart writes /work three times; the operator's config lets the path be anything, and WORKSPACE_ROOT follows it), so that the paths the coder sends the sandbox are the paths the sandbox has. The probe is a shell command, so the path is quoted for it (the shell sees one word whatever the path holds). The cost is that a path other than /work is shown by no cluster. (7) The volumes and directories the sandbox uses are reserved only when run pods are on: kube-api-access, git-sandbox and git-sandbox-tmp as volume names and /run/git-sandbox and the credentials' directory as mount points, and /tmp as the work volume's (the sandbox mounts it beside a /tmp of its own; found in review), are refused for a coder with run pods, as D15a refused the template's; a coder without run pods may still name a volume git-sandbox, as it could before. (8) The chart's repeated seccomp profile on the sandbox is not repeated: the pod already has RuntimeDefault for every container, and a second statement is the same effect; the goldens' README lists it.

Unverified, still: a native sidecar on a cluster older than 1.29 (amended 2026-11-27, AD-067: such a cluster is below the floor of 1.37 and unsupported; the sidecar is GA there; the feature is beta and on by default from 1.29, GA in 1.33; run pods need 1.30 for the admission policy, and the GitHub server's sidecar already needed it, but an agent with githubMcp.sidecar: false did not; unverified on every version but 1.35.8); what the sandbox does not do, and adam-rs's ADR 0041 says it does not: a filter in the sandbox still sees the whole work volume, every run's files, as the coder's git did, and can write the shared mirrors (the coder puts a mirror's configuration back before a network command), the socket authenticates nobody (its mode and its directory decide), and the coder's other commands are no safer for it; and local mode (run pods off) stays unprotected, as before. D15 stays open until the job has run green with these checks.

The pin moves to adam-rs b5d1c7e (ANR-1200, 2026-11-27): ADR 0038's run pod. adam-rs's main of 2026-11-27 ports its ADR 0038 and the operator follows, because the goldens are what the chart renders: the coder no longer uses OpenCode (OPENCODE_MODEL is gone from its environment; coder.opencodeModel is still a field of the CRD and now renders no variable and changes no digest), a run pod reads no Secret at all (MODEL_API_KEY is out of the run pod template, and the admission policy refuses any secretKeyRef where it allowed that one key of the agent's Secret), the policy gains a rule that a run pod names no pull secret, the run container's image is the workspace image 1.98.1-8c297d3, the init container copies adam-exec alone, and a run waits 1020 s for a slot. aap-ports loses RunPodGuard::secret (a field, so every literal of the guard moves), aap-domain stops emitting the model key in the template and refuses MODEL_API_KEY in runPods.extraEnv for the reason ADR 0038 gives, and aap-runtime-kubernetes stops writing the guard's secretName and secretKey parameters. The operator chart's policy says the same, and its run image, its waitSecs and its defaultAgentImage move with the coder (sha-b5d1c7e); the coder pin of tests/e2e/run-pods.yaml moves too, and defaultAgentImage now has adam-egress and adam-git-sandbox, which supersedes D15c's and D15d's "it has neither". Verified 2026-11-27: tools/adam-parity/regen.sh --check at b5d1c7e with helm 4.3.2 (the goldens are what the chart renders; the diff from 4bc6742 is the revision and OPENCODE_MODEL alone in the five cases without run pods), the two pins by anonymous manifest requests to ghcr.io, and render-check.sh (743 checks; the twelve that hand the rendered file to operator run --check need the built binary and did not run). Unverified until CI has run it: run-pods-admission.sh's rewritten Secret cases and its pull-secret case on a real API server, and run-pods-e2e with the new pin. The crates/runtime-kubernetes goldens and crates/domain/tests/digest.rs's CODER_DIGEST are regenerated by cargo test (AAP_UPDATE_GOLDENS=1), which the slice did not run (the owner's rule of 2026-11-27 forbids a heavy job on the host where it was written), and they were regenerated (CODER_DIGEST is now sha256:8a1a9417…).

K14a built (2026-11-19): the half of K14 (AD-052) that needs no cluster: a sandboxed RuntimeClass for run pods and for the agents' own pods, named by the deployment, empty by default and then not a trace in any render. gVisor's handler is runsc, not runsc-kvm (AD-052 decision 5: the nodes are virtual machines), and the RuntimeClass object is the administrator's, never the operator's (decision 4): the chart names it and makes none.

WhatWhereProven by
agent.runtimeClassName (the agents' own pods) and runPods.runtimeClassName (run pods), both ""; the refusals (a name that is not a DNS subdomain, an unknown key, a null block)deploy/operator (values.yaml, _validate.tpl)render-check.sh (604 checks; the seven goldens byte for byte what they were, and a render that names neither value has no agentRuntimeClass, no runtimeClassName and no tenth rule)
defaults.agentRuntimeClass in the operator's configuration file (was AGENT_RUNTIME_CLASS), the class refused at start when it is not a namebin/operator, aap-controllertests/cli.rs (the settings), the render checks
Externals::agent_runtime_class, Workload::runtime_class_name and RunPods::runtime_class_name (skipped when None, so no digest moves)aap-domain, aap-portstests/digest.rs: the class reaches every workload of both harnesses (the a2a image's pod too), the digest moves with it, and it is the only difference; tests/run_pods.rs: the run pod template's runtimeClassName and the run pods' spec, absent when none; an empty value is none
The pod templates: runtimeClassName on the Deployment and the StatefulSet when the spec says so, nothing when it does not; the run pod template (a file set the domain makes)aap-runtime-kubernetestests/render.rs: every workload, and only them, for the coder, the chat agent and the a2a image; tests/run_pods.rs: the template and the guard's runtimeClassName parameter
The admission policy requires the class once it is named (decision 2): a tenth rule, object.spec.runtimeClassName == variables.runtimeClass, and the parameter runtimeClassName the operator writes into each agent's <service>-run-pods-policy (empty when none); the chart's value is the fallback, so an operator older than the policy refuses rather than admitsdeploy/operator (run-pods-admission.yaml), aap-runtime-kubernetesrender-check.sh (ten rules, the message, the parameter); run-pods-admission.sh gains the cases (unverified until a cluster has run it: with a class, another class and none are refused; without one, a pod that names a class is admitted, the control)

Decisions this slice took, for the owner to confirm: (1) The class is the deployment's, per value and not per agent: runPods.runtimeClassName and agent.runtimeClassName are separate so that run pods can be sandboxed before the agents are (AD-052's own words); a per-agent class would let whoever writes a config pick the node's runtime, which is the administrator's. (2) The egress proxy's pod is not under the agent's class: it is infrastructure of the deployment and not the agent's compute, and its CONNECT proxy has no untrusted code to contain; the alternative is one more setting. (3) AD-052 decision 3 — the image-build modes Build and Engine refused with a class — is not implemented: this platform has no build-mode field (coder.runPods is { sizeClass }, and the coder's build modes are adam-rs's, not this repository's), so there is nothing to refuse here; it becomes a ConfigInvalid the day the CRD reads one, and it is unverified whether adam-rs has such a field. (4) Naming a class rolls the agents once, as a new image does, because the class is in the digest: a pod's runtime is what it runs. (5) The policy reads the parameter and falls back to the chart's value: an upgrade of the chart before the operator's image would otherwise leave the class unrequired; the cost is one ternary in CEL.

What K14a does not prove, and K14b closed without proving (2026-11-20, the owner's decision): that a kubelet starts a pod under runsc at all — measured on a throwaway kind cluster, runsc's device cgroup is refused inside a kind node's cgroup namespace (configuring device cgroup: loading device filter: operation not permitted), so the sandbox start is unproven and K14c/K14d carry it (AD-052 has the mechanism); that the coder's pod works under the class with its git-sandbox (a process namespace of its own, a Unix socket on an emptyDir), its projected account token, its egress proxy and its store's connections; that hostUsers: false and a gVisor class coexist on containerd 2.2 and Kubernetes 1.36; and the cost of a build under it (system calls and file I/O go through gVisor). The owner's nodes with Talos's gVisor extension are unverified here too. Unverified where this was written: the admission cases (no cluster), and the whole under a real runsc. Update 2026-11-26 (ANR-404): the measure after this paragraph supersedes it for a container node only (a local k3d cluster on a rootless Docker): there a kubelet did start a run pod of the template under runsc with the policy admitting it, with the limits not enforced, and on that setup hostUsers: false beside the class did not start (the runc control also failed there, so a real node is untested); the coder's pod under the class, a real node and the cost of a real build stay unproven.

Measured 2026-11-26 in a local k3d cluster (ANR-404, deploy/operator/tests/e2e/gvisor-k3d.sh). Every number and every quoted message below is from the saved log of one end-to-end run of that script on that machine (exit status 0), verified 2026-11-26 there; the workflow gvisor-k3d.yml also ran on a hosted runner (PR #112, run 45889453084, verified 2026-11-26 with gh run view: success, kernel 7.0.0-1020-azure, gVisor 20261116, k3s v1.35.5+k3s1): the sandbox start, the admission cases and (b) verified, (a) and (c) as locally, (d) in its own setting (Podman 5.8.9 with --storage-driver vfs, nested rootless k3d, median of six: runsc 2705 ms, runc 880 ms), (e) as locally (limits not enforced under ignore-cgroups: runsc Completed with no memory.max, runc OOMKilled 137 with memory.max 67108864; CPU 100m against 2: runsc 3 s against 3 s, runc 31 s against 3 s). The numbers that follow are the local run's. The setup, as the log prints it: k3d v5.9.0 with k3s v1.35.5-k3s1 (containerd 2.2.3-k3s1, node kernel 7.0.0-43-generic, cgroup2fs) on a rootless Docker 29.9.3 (name=rootless, cgroup version 2, storage driver overlayfs: the node is a container in a user namespace), gVisor release-20261116.0 (the whole release archive, checked against its pinned SHA-512 before use), the operator image sha-dd8c474, the chart with runPods.runtimeClassName: runsc; the tools are BuildKit v0.30.0 (rootless) and Podman 6.2.0 and 5.8.9, each as the pod that ran it printed. The shim is told ignore-cgroups = "true" in a file containerd names in the runtime's options (ConfigPath); that is how runsc starts at all on this node (the script's header says why, from an earlier experiment; this log does not show a start without it, and K14b's kind result is not re-run or contradicted). (1) The sandbox starts. A run pod made from the operator's own template (gv-coder-run-pod), as the agent's service account, was admitted by the policy and ran: spec.runtimeClassName=runsc phase=Running; dmesg in it said [ 0.000000] Starting gVisor... and uname Linux 4.19.0-gvisor, where a plain pod beside it said dmesg: klogctl: Operation not permitted and Linux 7.0.0-43-generic; a pod with no class, made as the same account, was refused by the policy (a run pod runs under the RuntimeClass runsc ...), and run-pods-admission.sh ran against this API server with every case as expected. The script makes a RuntimeClass runc first because, on an earlier run (not shown in this log), the admission script's case "another runtime class", which names runc, was answered RuntimeClass runc not found by the API server's own admission and not by the policy: interpretation, and a proposed fix to that script, not made. The pod differs from the template in one jq program: the run container's image is a pinned alpine, its command sleep infinity, and the init container's command true; the coder itself is an alpine stand-in (its pod, git sandbox and egress proxy crash-loop), so the real coder's git sandbox, projected token, egress proxy and store connections under the class are unverified (K14d). (a) hostUsers: false with the class. On this setup, containerd 2.2.3-k3s1 refused it for the runsc handler: Failed to create pod sandbox: can't set spec.hostUsers: false, RuntimeClass handler "runsc" does not support user namespaces. The runc control also failed here, for an environmental reason (failed to create network namespace for sandbox ...: failed to start noop process for unshare: fork/exec /proc/self/exe: operation not permitted), so a real node is untested and no rule about hostUsers and the class follows from this run; which component produces the first message the log does not show. (b) The volume and exec. kubectl exec ran sh, id, mount, df, dmesg and uname in the run pod; a file written to the coder's claim (/work, none on /work type 9p in the sandbox) was read by the next run pod after the first was deleted. (c) The build tools. Rootless BuildKit with the template's security context (no privilege escalation, every capability dropped) failed under runsc (failed to setup UID/GID map: newuidmap 48 [0 1000 1 1 100000 65536] failed: : fork/exec /usr/bin/newuidmap: operation not permitted) and under runc (failed to start the child: fork/exec /proc/self/exe: operation not permitted); with allowPrivilegeEscalation: true and an Unconfined seccomp profile, which the policy refuses to the agent's account (the pod was made as the administrator), it built under runsc and failed under runc (newuidmap: write to uid_map failed: Operation not permitted). Podman 6.2.0 failed under runsc (level=fatal msg="Cgroups v1 not supported") and built under runc; Podman 5.8.9 built under runsc with the relaxed pod, but podman run --rm failed there (statfs /dev/mqueue: no such file or directory) and worked under runc; with the template's own security context Podman 5.8.9 failed under runsc (cannot set up namespace using "/usr/bin/newuidmap": fork/exec /usr/bin/newuidmap: operation not permitted). (d) One tiny build, in time. In this nested rootless k3d, Podman 5.8.9 with --storage-driver vfs, one build of a three-line Dockerfile (a rootfs ADD and one RUN that hashes 3000 files), six runs each in the same relaxed pod (two rounds of three): median 1214 ms under runsc and 512 ms under runc (2.37 times); rootless BuildKit under runsc alone: 564, 554 and 564 ms around the kubectl exec, with no control because it does not start under runc here. One machine, one setup, one tiny build: it says nothing about a real build. (e) Limits under ignore-cgroups: runsc did not enforce them here. A pod with limits.memory: 64Mi (requests the same) that holds 256 MiB (head -c 268435456 /dev/zero | tr "\0" a into a shell variable) completed under runsc (reason=Completed exitCode=0, held 268435456 bytes; the pod saw no /sys/fs/cgroup/memory.max), and was OOMKilled (exit 137) under runc, the control (memory.max seen: 67108864). A fixed shell loop with limits.cpu: 100m took 2 s under runsc, the same as with limits.cpu: 2, and 16 s under runc against 2 s with 2 CPUs (one-second clock). So a run pod's memory and CPU limits are not enforced under this runsc configuration, and the sandbox start on a container node is not production-equivalent; whether the limits are enforced on a node where runsc can use the cgroups (no ignore-cgroups) is unverified, and so is how the quota's limits.memory and the template's limits behave there. Not proven and not claimed: the owner's Talos nodes, the coder's own pods, a node that is not a container, and whether a run pod on this container node is the "real node" that AD-052's order (agent.runtimeClassName stays empty until then) asks for: that is the owner's to say, and the value stays empty.

The owner, 2026-10-05: "The MVP worked and now we need a dashboard for configuring all these. The same one actually."

"All these" is what is configured today in Helm values in the GitOps repository WhyThatFunction/home-os, in Keycloak and in AWS Secrets Manager:

  • the coders, which become one coder per GitHub owner (coder-vymalo, the renamed coder, and coder-me for stephane-segning, AD-033), each limited to its owners by GITHUB_APP_OWNERS (adam-rs ADR 0017) and each with its own GitHub App;
  • the folder agents (chat, researcher);
  • who may use which agent;
  • models, tool servers (web search, Context7), the size class of the per-run pod;
  • sharing, and the rest of the system chart's values.

This section is the §60 UI made concrete for the v0 operator (§59a): a dashboard that writes AgentService and AgentConfig objects through a Platform API, so administrators do not touch CRDs, and humans get no Kubernetes RBAC (§52).

The reading of "the same one" (confirmed) &ZeroWidthSpace;

"The same one" means one dashboard inside the existing chat web app (another-agentic-system web/, Next.js and assistant-ui), with the same sign-in and look: an /admin area of that app, not a second app. The owner confirmed it on 2026-10-05 (AD-026).

What the dashboard covers in v0 &ZeroWidthSpace;

ItemSet today inv0How
Coders, one per GitHub owner, each with its GitHub Apphome-os (adam-rs chart deploy/coder)Edited, including coder-vymalo (the renamed coder) after the cutoverAgentService + AgentConfig with binary: adam-coder (AD-033)
Folder agentsthe system chart (chat), dev/ (researcher)Edited, chat after the cutoverAgentService + AgentConfig with binary: adam-agent and inline files
The image of an agentthe adam-rs chart's image.tagOptional: empty is the operator's default coder image, a value of the operator chart (amended 2026-10-15, D2: the GitOps repository sets it, CI does not bump it: AD-029); an agent may pin its ownAgentConfig.spec.environment.image (AD-029)
Who may use which agentthe orchestrator's auth.roles.<role>.agents and Keycloak client rolesEdited, per agent: the audience names the agent's use permission (agent.use:<agent-name>); Keycloak composite roles grant it to peopleAgentService.spec.access.audience, published in the registry (AD-028, AD-032)
Modelseach chart's model valuesEditedModelEndpoint objects, referenced by name (AD-029)
Tool servers of an agentthe adam-rs chart's mcp valuesEditedToolProvider objects, referenced by name (AD-029)
Run-pod size classnot yet (adam-rs run pods are in progress, ADR 0019 there)Edited (D15a: agent.runPodSizeClass, one of GET /v1/info's runPodSizeClasses, absent: no run pods)coder.runPods.sizeClass, a name the operator's chart defines
Secret valuesAWS Secrets Manager, through ExternalSecretsReferenced only, never shown or writtena picker over offered Secret keys (AD-030)
The coder and chat that GitOps deploys todayhome-os and the system chartTaken over by the dashboard at the cutover (M3, M5, §59a); read-only with View YAML until then, and any other GitOps object stays read-onlyone owner per object (AD-031)
Sharing, the tool servers a person attaches in chat, the orchestrator's roles, its title and description modelsthe system chart (the orchestrator reads its file at startup)Read-only where the browser can already read them; otherwise not shownGET /api/me (sharing), GET /api/tool-servers, GET /api/registry, GET /api/config
People, their roles and the permissions' definitionsKeycloakOut: the dashboard never writes Keycloak; the client roles and composites of AD-032 are made there—
The operator, the CRDs, the system chart, oauth2-proxy, the edge, databases of the systemhome-osOutGitOps

Where it lives (AD-026) &ZeroWidthSpace;

An /admin area of the system web, with three gates:

  1. Capability-detected, in the style of another-agentic-system's ADR 0008: the area exists only when the deployment gives the web's server a Platform API URL (PLATFORM_API_URL), and only while GET /v1/info on that URL answers, read live on each page load and never cached. Without the URL, /admin is a 404 and no link to it is drawn; the chat works as it does today. A Platform API that does not answer is "The platform API cannot be reached", with nothing editable (fail closed).
  2. Shown to people who hold the dashboard's permissions: the link and the area are drawn when the Platform API's GET /v1/me, called with the person's bearer, lists at least platform:agents.read (below). This is a hint for the screen, never a check (the web's rule since ADR 0033 there). It is not the orchestrator's admin: the dashboard asks the permissions it needs, not a role.
  3. Enforced by the Platform API, which authorizes every request itself (below).

Agent configuration holds no thread, file, message or listing of anybody's, so the area reads nothing another-agentic-system's ADR 0039 protects. The dashboard does not read threads, and it never shows who used an agent. The orchestrator's admin permission stays operational and content-free there; the administrators' composite role (AD-032) holds it beside the dashboard's permissions, but the dashboard does not look at it.

The dashboard has the chat's look (its tokens, shadcn components, the panda), its sign-in (oauth2-proxy at the edge) and its roles. The web side is the system's decision, another-agentic-system ADR 0045 (accepted 2026-10-05).

Amended 2026-10-06: the three gates stay, but "the web's server" is "the client" and the sign-in is not only the edge's: Clients without a web server, below.

Clients without a web server (amends AD-026, AD-044, P-017) &ZeroWidthSpace;

Amended 2026-10-06. The owner: "we're packing the UI into tauri for building a desktop and a mobile application." Tauri cannot run a Node server, so the web becomes a static export (output: 'export' in Next.js, with no request-time server code and no API routes; verified 2026-10-06, https://nextjs.org/docs/app/guides/static-exports), one build for the browser, the desktop app and the mobile app. The decision of AD-026 that the web's server calls the Platform API with the person's token, not through the public edge cannot hold for desktop and mobile, and for the browser it would be the odd one out. What replaces it, for every client, whether the web as a single-page app, desktop or mobile:

  • The client calls the orchestrator and the Platform API directly with Authorization: Bearer <JWT>. The API validates it exactly as the orchestrator does (another-agentic-system ADR 0033: an OAuth 2 resource server; its oauth2-proxy runs with --skip-jwt-bearer-tokens, so a token that verifies goes through and the service checks it again; verified 2026-10-06, that repository's docs/decisions/0033-the-orchestrator-is-an-oauth2-resource-server.md and deploy/chart/templates/oauth2-proxy.yaml). Nothing in The Platform API below changes: the same token, the same permissions, the same routes.
  • The Platform API is on the edge, behind that JWT validation, at a path or host the deployment names. It gains CORS restricted to the deployment's origins (the web's origin, and whatever origin each native shell's webview sends, for example tauri://localhost; unverified, and it may differ per platform), no wildcard and no credentials mode, and rate limits per token at the edge, since a bearer API is open to any script that holds a token. The NetworkPolicy of D7, which let only the web's pods in, is replaced by the edge's.
  • PLATFORM_API_URL is a public base URL, not a server-side setting. A client learns it from a config endpoint (the orchestrator's GET /api/config gains an additive public setting, the system's side) or, for desktop and mobile, at build time. The two gates of Where it lives keep their meaning with the client in the web server's place: no URL, no /admin and no link; an API that does not answer, "The platform API cannot be reached", read live.
  • The sign-in is the client's own, and differs per platform: AD-044 and §52.
  • No token is stored by a server. The edge no longer puts the ID token on the web's requests for this purpose; the client holds its tokens (AD-044) and refreshes them itself.

The framework of /admin (P-017). Proposed: Refine, a headless React framework for CRUD and admin applications with an official shadcn/ui integration (the chat's components, so the look is kept), an access-control provider (which maps to our permissions, fed from GET /v1/me: a hint only, the API checks every request) and a Vite single-page-app preset, which suits a static export (verified 2026-10-06, https://refine.dev/core/docs/ui-integrations/shadcn/introduction/; that the access-control provider fits our permissions is a design intent, unverified until tried). The owner decides; the web is another-agentic-system's.

The Platform API (AD-025, AD-027) &ZeroWidthSpace;

A Rust (axum) service in this repository, its own binary bin/api, beside bin/operator in the same workspace and the same chart (deploy/operator, component api, off by default). Why not inside the operator binary:

  • Least privilege per process. The API writes the specs people edit and reads ExternalSecrets; the operator writes workloads, the status and the finalizer. One process with both sets of rights is the larger target, and it would take people's tokens.
  • Exposure. The API takes requests carrying people's tokens; the operator takes none. The operator is one replica with Recreate by default, and with replicas > 1 its replicas elect a leader (K7a, AD-057); the API is stateless and can run two replicas.
  • Failure. A bad request or a bug in the API never stops reconciliation.

The cost is a second image and a second Deployment. The registry stays in the operator binary for v0 (§59a); moving it behind the API is the open question of §93 Routing.

Crates (AD-020: traits with testkits, implementations apart, the binary composes):

PathCrateWhat
crates/formsaap-formsPure: the dashboard's forms to and from the custom resources, with the deployment's defaults filled in. A round trip of every form is a test. An object a form cannot represent (a GitOps object with fields the form lacks) is shown as YAML only
crates/portsaap-portsAdds AgentObjects (apply, get, list, delete the dashboard's kinds, list offered secret references) and Authenticator (a bearer token to a Principal with roles), with Memory implementations and conformance macros
crates/objects-kubernetesaap-objects-kubernetesAgentObjects on the API server: server-side apply, the ownership rules, ExternalSecrets read (built in D5)
crates/auth-oidcaap-auth-oidcAuthenticator for OIDC ID or access tokens checked against the issuer's JWKS (built in D6, README)
crates/platform-apiaap-platform-apiThe axum router, generic over the ports (built in D7a, README)
bin/apiaap-api-serverThe composition root, binary api; one YAML configuration file, secrets by reference (built in D7a, README)

Authorization. The request carries Authorization: Bearer <JWT>. The API checks it as another-agentic-system's orchestrator does (ADR 0033 there): signed by the configured issuer's keys (RS256, RS384, ES256 or EdDSA), iss equal to the issuer, one of the configured audiences in aud, exp, 60 seconds of leeway. The values of the configured claim (agentic_roles on netcup) are the person's permissions: Keycloak client roles of another-agentic, with the composites already expanded into the token (AD-032, Permissions and roles below). The API checks individual permissions, never a role name: each route needs the permission in the table below, a compile-time constant of aap-api, so no configuration lists roles. No token is 401, a token without the permission is 403 and says which one, keys that cannot be fetched are 503. The web's GET /v1/me hint and the API's check read the same token, so they agree; when a permission changed in Keycloak after the token was issued, the API's 403 is what the person sees until the next refresh.

How the web gets the token today (verified 2026-10-05, another-agentic-system deploy/chart/files/Caddyfile and dev/Caddyfile): every request to the web passes the edge's forward_auth to oauth2-proxy, which answers 202 with Authorization: Bearer <ID token> (--set-authorization-header=true, deploy/chart/templates/oauth2-proxy.yaml), and copy_headers Authorization puts it on the request that goes to the web, replacing what the browser sent. The ID token carries aud: another-agentic (the client id) and the roles claim agentic_roles (deploy/keycloak/README.md). So the web's server already receives the person's token on every request, and today ignores it. The dashboard's route handler, /admin/api/[...path], forwards that header, unchanged, to the Platform API, and nothing else: it stores no token and logs none. /admin/api/* is not under /api/*, so the edge routes it to the web, not to the orchestrator.

Amended 2026-10-16 (D6): the check is built (aap-auth-oidc) and differs from the orchestrator's in three places the D6 note lists for the owner: iat is not required, a token bound to a key (cnf) is accepted as a plain bearer (there is no DPoP), and a token whose key the cached JWKS lacks is 503 rather than 401 while the keys cannot be fetched. sub is required, nbf is honoured, and the claim is a dotted path.

Amended 2026-10-06: that is the flow of the first web, which has a server. Static clients (Clients without a web server) get their bearer from their own sign-in, and the route handler /admin/api/[...path] does not exist: they call /v1/... on the Platform API's public base URL. The edge's forward_auth stays for the chat's pages and for a web that is still served by a Next.js server.

Routes (problem details on error, RFC 9457):

RouteWhat
GET /v1/meThe person's dashboard permissions, from the token: the values of the roles claim that start with platform: (an empty list is a 200). The web draws /admin from it
GET /v1/infoThe capability document: version, namespace, the deployment's defaults as the forms show them (read-only), the run-pod size classes, the offer label
GET /v1/agentsEvery AgentService of the namespace with its config's kind, its state and conditions, and managedBy: dashboard or gitops
GET /v1/agents/{name}The form, the status, and the resourceVersion of both objects as an ETag
PUT /v1/agents/{name}Create (with If-None-Match: *) or replace (with If-Match) both objects
DELETE /v1/agents/{name}Delete the AgentService, then the AgentConfig; deletionPolicy decides what happens to data (§59a)
GET /v1/agents/{name}/yamlBoth objects as YAML, without status, managedFields and server-set metadata: View YAML and Export YAML
GET /v1/agents/{name}/eventsK8. The Kubernetes Events about the agent's objects, newest first, at most 100: { "events": [{ type, reason, message, object: { kind, name }, count, firstSeen, lastSeen }] }. Why an agent is not Ready (see Events and the OpenAPI document)
GET, PUT, DELETE /v1/models/{name}, GET /v1/modelsModelEndpoint objects; a delete of one still referenced is 409 with the agents that use it
GET, PUT, DELETE /v1/tool-servers/{name}, GET /v1/tool-serversToolProvider objects; the same 409 rule
GET /v1/owners/{owner}/agents, GET, PUT, DELETE /v1/owners/{owner}/agents/{name}ANR-661. The same agent operations, for the agents whose spec.owner is the owner in the path and no other (the orchestrator makes one coder per person). An agent with another owner, or none, is a 404, never a 403, so nothing of it is learned; a replace is also how such an agent is suspended; the form's owner is the path's or absent
GET /v1/secret-keysThe Secret keys an agent may reference (AD-030): Secret name, key, and the ExternalSecret that makes it. Never a value
GET /v1/openapi.jsonK8. The OpenAPI 3.1 document of this API, generated from the table of routes (see Events and the OpenAPI document)

The permission of each route (AD-032; names proposed):

PermissionRoutes
none beyond a valid tokenGET /v1/me
platform:agents.readevery GET of /v1/info, /v1/agents, /v1/models and /v1/tool-servers, GET /v1/agents/{name}/yaml, GET /v1/agents/{name}/events and GET /v1/openapi.json (K8)
platform:agents.writePUT and DELETE of /v1/agents/{name}, which includes spec.suspend and spec.access.audience
platform:agents.ownANR-661. The four routes under /v1/owners/{owner}/agents: read, create, replace (suspend and resume included) and delete the agents whose spec.owner is the owner in the path. It is scoped by data, not by route, so it is the orchestrator's alone and never a person's role
platform:models.writePUT and DELETE of /v1/models/{name}
platform:toolproviders.writePUT and DELETE of /v1/tool-servers/{name}
platform:secrets.pickGET /v1/secret-keys, and any write whose body names a secret key (a model's API key, a tool server's header, a coder's GitHub App key), in addition to the write's own permission

A write holds its own permission and, when it names a secret, platform:secrets.pick; a read of one object type needs only platform:agents.read, so a person who may edit tool servers reads agents too (the composites of AD-032 bundle them).

Status codes: 400 a body that is not a form, 401, 403, 404, 409 (exists, still referenced, owned by GitOps, or a server-side-apply conflict), 412 (If-Match is stale: somebody saved first), 422 (validation, each error with its form field), 503 (the API server or the issuer's keys cannot be reached). Each route's statuses, with the shape of every body, are in the OpenAPI document below.

Events and the OpenAPI document (K8, 2026-11-14, P-029). Two routes, both in the table (crates/platform-api/src/routes.rs) and so both authorized by the one layer over the router, and both needing platform:agents.read. The owner's rule for every API of the product: a second client (a Flutter app is planned, aapctl is one) must be able to use it from the contract alone; the server enforces, a client only offers.

The document. docs/api/platform-api-v1.openapi.json is OpenAPI 3.1, generated, not kept by hand, by aap_platform_api::openapi (api openapi prints it, as the operator's crdgen prints the CRDs). The paths, the methods and x-permission on each operation come from the table of routes, so they are typed once (x-permission: null is a route that needs only a token; x-secrets-pick is on a write whose body can name a secret key); the description of each route is an exhaustive match on the route's id, so a route added to the table without one does not compile. The schemas are written once, by hand, in the same module: aap-forms and aap-api derive no schema (only the CRD types do, and they are not the wire types), and a derive on the forms would be a change much larger than the document. What keeps a hand-written schema honest is crates/platform-api/tests/openapi.rs: the checked-in file must equal what the code generates (openapi_is_what_the_code_generates); every route of the table is in it and nothing else (openapi_lists_every_route), with the table's permission (openapi_permission_matches_the_table); one session over the Memory ports answers every route every way a test can make it (the successes, 401, 400, 403, 404, 409, 412, 413, 415, 422, 428, 503) and every answer, success and problem, is validated against the schema of its route and status (real_answers_validate_against_the_schemas, with a validator of the JSON Schema subset the document uses, written in the test so that no dependency is added, and itself tested to be able to fail); every status a route documents is answered and every answer is documented (every_documented_status_is_answered; the two it cannot make are a 500, which the memory ports have no way to cause, and the 503 keys-unavailable of a route that reads no store, which tests/oidc.rs makes for the real authenticator); and each request example is parsed by the real form type, each example by its schema (the_examples_in_the_document_are_valid). The conditional-request headers (If-Match, If-None-Match, ETag, and the 428, 412 and 409 answers), the problem shape with the field of a 422, the bearer scheme and what is deliberately absent (cookies, CORS credentials and a wildcard origin, an unconditional write, a secret value, DPoP) are in the document. Limits, said plainly: defaults and an agent's deployment are open objects (they are the deployment's and the CRDs', not the contract's), and the pattern of a name is in its description and not enforced by the test's validator.

GET /v1/openapi.json needs platform:agents.read, the stricter of the two precedents: GET /v1/info (a permission) against GET /v1/me (a token alone). The document is the same for everyone and holds nothing of a deployment, so a token alone would do; but nothing of this API is served to a caller that holds no right on it, and a person who holds no dashboard permission has nothing to do with the contract. Changing it is one line of the table, which the document, the matrix and the tests then follow.

Events. GET /v1/agents/{name}/events is { "events": [...], "incomplete": false } (an object, as every answer of the API is, and not a bare array), newest first by lastSeen (then firstSeen, kind, name, reason and message, so the order is the same on every call), at most 100, each { type: Normal|Warning, reason, message, object: { kind, name }, count, firstSeen, lastSeen, by: uid|name } (times in UTC to the second). It is a new method of the port, AgentObjects::agent_events(name) returning AgentEvents { events, incomplete } (AD-020: the router names no Kubernetes type; the order and the bound are made once, by aap_ports::newest_first, for every implementation; an agent with no AgentService is the port's NotFound, answered with the same problem as GET /v1/agents/{name}), and a new required method on a trait, which breaks every implementer (the repository has three, MemoryObjects, the Kubernetes one and the test doubles; its first version returned a bare Vec and AgentEvent had no by). The API group is core/v1 (events, group ""): it is what kubectl get events and describe read, and what the kubelet and the controllers write; events.k8s.io/v1 is the same store with the regarding spelling, and reading both would double the right and the code for the same rows.

How an event is attributed, said plainly: by the names the operator gives an agent's objects. The API's Role has no right on pods or workloads (P-029, open decision 2), so no owner reference can be read. The API server cannot select by a name prefix, so the implementation lists the namespace's Events (limit=500, at most 10 pages) and keeps those whose involvedObject has, exactly and with the - between the parts, a name and a shape this operator gives an agent's objects (crates/objects-kubernetes/src/events.rs has the table): AgentService and AgentConfig named <agent>, compared by uid with the objects the call just read when the event names one (by: uid; an agent deleted and made again under the name does not inherit the old one's events, and an event of the old uid is dropped); Deployment, StatefulSet, Service and PodDisruptionBudget named <agent>, <agent>-front or <agent>-egress; a ReplicaSet named W-<hash>; a Pod named W-<ordinal> or W-<hash>-<suffix>; and the store's, from aap-store-cnpg: the Cluster <agent>-db, its pods <agent>-db-<n>, its jobs and their pods, its services -rw, -r and -ro (by: name). A hash and a suffix use the alphabet of Kubernetes' generated names, bcdfghjklmnpqrstvwxz2456789, the hash 5 to 10 characters (the 1 to 10 decimal digits of a 32-bit hash, so below 5 has a probability of about 2e-6) and the suffix exactly 5: verified 2026-11-14 in the Kubernetes sources at master (k8s.io/apimachinery/pkg/util/rand/rand.go for the alphabet and SafeEncodeString, k8s.io/apiserver/pkg/storage/names/generate.go for randomLength = 5, ComputeHash in k8s.io/kubernetes/pkg/controller/controller_utils.go for the hash). CloudNativePG's names are unverified (from its documentation, from memory). An event is attributed to no agent when another agent of the namespace could own the same object by the same table, or when another agent's name is one of the bases this agent's names are built on (<agent>-front, <agent>-egress, <agent>-db): agents a and a-db both claim a-db-1, and a's own Cluster a-db is dropped while an agent a-db exists. What this guarantees and what it does not: an event of another agent's object never appears; an event whose object is not the agent's but has the same name and shape (a pod web-<hash>-<suffix> of something that is not web's Deployment) can appear, which is why every event says by; and an event the table does not know (a volume claim, the pods a coder makes for its runs) is missing. Incomplete is said, not hidden: a list is in key order, so past 10 pages of 500 what was not read is not "the oldest"; the answer is then the newest 100 of what was read with incomplete: true (a client tells the person that events may be missing), and a 410 on an expired continue token restarts the listing once and, if it expires again, answers what was read with incomplete: true and not a 503. No Secret is read. An Event's message is somebody else's text (an image name, a volume, a webhook's answer, and a careless cluster could have written a secret in one). The API shows messages as the cluster wrote them except that each control character (Unicode Cc, a newline and a tab included) becomes a space, the zero-width and bidirectional format characters U+200B to U+200F, U+202A to U+202E, U+2060, U+2066 to U+2069 and U+FEFF are removed, runs of spaces become one and the ends are trimmed, and a message longer than 1,024 characters (not bytes: up to 4 KiB) is cut to 1,023 and a …; a reason, a kind and a name are cut at 253 characters; a time that does not parse is the epoch, never a panic. The log never holds a message, a reason or an object name (it holds the route template, as for every route; tests/logs.rs plants a sentinel in each and finds it in the answer and not in the log). A client treats a message as untrusted text (renders it as text, never as markup), and an empty list is not a healthy agent: Kubernetes keeps events for a limited time (the API server's --event-ttl, one hour by default: verified 2026-11-14, EventTTL: 1 * time.Hour in k8s.io/kubernetes/pkg/controlplane/apiserver/options/options.go at master).

There is no lifecycle to draw: the route reads and keeps nothing. The Role of the API gains list on events of the core group, and nothing wider (no get, no watch, no write): in crates/objects-kubernetes/tests/rbac.yaml, held equal to the calls the crate makes by tests/rbac.rs and to the chart's api-role.yaml by render-check.sh; the goldens that render the API's Role (api.yaml and runpods.yaml) move by those four lines and the others do not. An API whose Role is older than the image answers 503 on this route alone (the objects' answer for a 403 is Unavailable): move the chart and the image together. Proven by the conformance cases of the port (the events of one agent only and never another's; newest first; the bound; texts cleaned and cut; an agent that is not there; an unreachable store), each broken on purpose in a faulty store; the Kubernetes backend's attribution on the fake API server (crates/objects-kubernetes/tests/events.rs); the matrix; tests/openapi.rs. Unverified without a cluster: that a real API server writes and serves Events as read here (the fixture tests/fixtures/events/event-list.json is hand-written from the Kubernetes API reference, not captured, and says so), that list on events is all the Role needs, and the step of api-e2e.sh that reads them (the first CI run is the proof).

Applying. The API validates the form with aap-forms and aap-domain::validate (the reconciler's rules of §59a, so the dashboard refuses what the operator would mark ConfigInvalid), then applies AgentConfig before AgentService by server-side apply, field manager agents.vymalo.com/dashboard, with force: false. The CRD's CEL rules run in the API server and come back as 422 on the field they name. Every object it writes carries the label app.kubernetes.io/managed-by: dashboard.agents.vymalo.com; the operator writes only status, so the two managers never share a field. Status and conditions are read back from the objects (§59a, Status); the dashboard asks again every 2 seconds while a page shows an agent that is not settled.

RBAC of the API in Kubernetes (a namespaced Role, not the permissions above): get, list, watch, create, patch, delete on agentservices, agentconfigs, modelendpoints, toolproviders; get, list on externalsecrets.external-secrets.io; and, since K8, list on events of the core group. No right on Secrets, like the operator (AD-024): list on Secrets would return their values (verified 2026-10-05, https://kubernetes.io/docs/concepts/security/rbac-good-practices/, "Listing secrets").

Amended 2026-10-16 (D5): the crate needs fewer: create, delete, get, list, patch on the four kinds (nothing watches, and a server-side apply that makes an object is authorized as a patch and as a create: verified 2026-10-16), and list only on externalsecrets.external-secrets.io. tests/rbac.yaml is that Role, held equal to the calls the crate makes; D7's chart grants exactly it.

Deployment defaults &ZeroWidthSpace;

The forms show what matters to an administrator; the rest comes from the API's configuration file (Helm values in home-os, so GitOps owns it), shown read-only on each form under Deployment defaults:

  • the store: an operator-owned CloudNativePG cluster per agent (store.postgres.cnpg, instances and size), or a secretRef pattern;
  • the A2A bearer: interfaces.a2a.bearerTokensSecretRef, a Secret key that must hold the orchestrator's AGENT_REGISTRY_AGENT_TOKEN (the agent token rule of §59a; without it the orchestrator lists the agent and cannot call it);
  • access.allowFrom (the orchestrator's namespace), gitAuthor, allowedRepoHosts, githubApiUrl, the coder's work volume, resources and security. Not the GitHub App: there is one App per coder (AD-033), so its id and its private-key reference are fields of each coder, the key picked from the offered Secret keys.

The image is not copied into each agent (AD-029). environment.image is optional and the operator takes its own default, the coder image (the file key defaults.agentImage, was --default-agent-image; a value of its chart that CI bumps by GitOps; amended 2026-10-15, D2: the chart ships a pin and the GitOps repository sets the value, and CI's bump moves the operator's own tag only), so a bump of that value rolls every agent that names none, through the config digest. The forms show the field Image under Advanced, empty by default, and an agent may still pin its own image there (a reference with a tag or a digest, an allow-list of registries being the deployment's default to set).

What the custom resources gain &ZeroWidthSpace;

All additive to v1alpha1 (§62), each a CEL rule or a reconciler rule as §59a sorts them, and none needed by an object written without the dashboard.

yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentService
metadata:
  name: coder-me
  namespace: another-agentic-system
  labels: { app.kubernetes.io/managed-by: dashboard.agents.vymalo.com }
spec:
  description: Coding task to verified pull request, for stephane-segning's repositories.
  configRef: { name: coder-me }
  access:
    allowFrom:                                   # §59a: the NetworkPolicy
      - namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: another-agentic-system } }
    audience: ["agent.use:coder-me"]             # AD-028: the agent's use permission, a Keycloak client role; ["*"]: everyone; absent or []: administrators only
  registry: { title: Coder (me), tags: [coding, git] }
  # interfaces, scaling, store: the deployment defaults
yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: AgentConfig
metadata: { name: coder-me, namespace: another-agentic-system }
spec:
  harness:
    type: adam-rs
    adam:
      binary: adam-coder
      agent: { embedded: {} }
      coder:
        workers: 2
        prDraft: true
        github:
          app:
            id: "<the id of the one GitHub App>"   # one App for every Adam (AD-033 amended 2026-10-06)
            owners: [stephane-segning]           # GITHUB_APP_OWNERS
            privateKeySecretRef: { name: github-app, key: private-key.pem }   # the one offered key, the AWS property github_app_private_key
        runPods: { sizeClass: standard }         # D15a: absent, no run pods; a class of the operator chart's runPodClasses
  model:
    endpointRef: { name: gateway }               # AD-029: exclusive with baseUrl and apiKeySecretRef
    model: coding-model
  tools:
    mcpServers:
      websearch: { providerRef: { name: websearch } }   # AD-029: exclusive with url and headers
    allowInsecureHttp: true                      # never automatic (§59a); the form asks
  # environment.image absent: the operator's default coder image (AD-029); an agent may pin its own
yaml
apiVersion: agents.vymalo.com/v1alpha1
kind: ModelEndpoint
metadata: { name: gateway, namespace: another-agentic-system }
spec:
  title: Gateway
  baseUrl: { secretRef: { name: agent-models, key: GATEWAY_BASE_URL } }   # or { value: https://…/v1 }
  apiKeySecretRef: { name: agent-models, key: GATEWAY_API_KEY }
  models: [coding-model, chat-model]             # the aliases the forms offer; informative
---
apiVersion: agents.vymalo.com/v1alpha1
kind: ToolProvider
metadata: { name: websearch, namespace: another-agentic-system }
spec:
  title: Web search
  mcp:                                           # v0 subset of §32: one remote MCP server
    url: http://another-agentic-websearch.another-agentic-system.svc:8080/mcp
    headers:
      Authorization: { prefix: "Bearer ", secretRef: { name: agent-tools, key: SEARCH_MCP_TOKEN } }
    tools: []                                    # empty: every tool of the server
    optional: true
  • Resolution is the operator's (built in D2). aap-domain::resolve reads the referenced ModelEndpoint and ToolProvider into the same RuntimeSpec the inline form gives, so the pod is unchanged and the digest moves when the referenced object changes: an edit of an endpoint rolls out every agent that uses it. A missing referent is ConfigResolved=False, reason ConfigInvalid, with a message that names it. The controller maps a change of either kind to the services whose config references it, as it does for AgentConfig.

  • audience is a list of at most 32 strings of 1 to 64 visible characters (visible ASCII, ^[!-~]+$: decided by the owner on 2026-10-15); "*" only alone. By convention a value is a use permission, agent.use:<agent-name> (at most 50 characters, since a name is at most 40). It reaches no pod: it goes to the registry item (below) and nowhere else.

  • runPods.sizeClass names a class of the operator chart's runPodClasses (standard: { requests: { cpu: 250m, memory: 512Mi, ephemeral-storage: 1Gi }, limits: { cpu: "2", memory: 2Gi, ephemeral-storage: 4Gi } } since AD-061, which makes the CPU and ephemeral-storage limits required of every class and of every container of a run pod), the seed of §65's ResourceClass. ANR-660 (AD-066): a class has a size weight (the larger of requests.cpu / 1 vCPU and requests.memory / 2 GiB, exactly one of 0.25, 0.5, 1, 2, 4, 8, else the operator refuses to start; requests.cpu and requests.memory are required), shown as the annotation agents.vymalo.com/size-weight on the template, and the deployment may pin run pods to admitted node types (runPods.nodeType, off by default, an eleventh rule of the policy); the premise and the limits are in AD-066. The operator turns it into the resources of the run-pod template adam-rs reads (RUN_POD_TEMPLATE_FILE, on adam-rs main since the revision D15a read, 3f714d0: verified 2026-10-26 by rendering its chart; it was unverified at ea570d6). This field is the last slice (D15), built in two parts (D15a built): the operator makes the template as a file set of the workers, reads the classes from the runPods block of the file its chart renders (was RUN_PODS_FILE), and refuses a class it does not have. With the run pool (§59b), the class is RunEnvironment.spec.sizeClass and the operator makes the pods, not a template adam-rs reads.

  • Status of the shared kinds (K2, 2026-11-14, P-023). Both kinds have a status subresource (SharedStatus in crates/api/src/status.rs) that the operator writes, so that someone running a cluster can see who uses an object and whether it is valid without reading every config:

    yaml
    status:
      observedGeneration: 2
      usedBy: [coder-me, coder-team]       # AgentServices of the namespace that run a config naming it, sorted, at most 64
      usedByMore: 3                         # how many users are not in usedBy; absent when there are at most 64
      conditions:
        - { type: Accepted,    status: "True",    reason: Valid }          # or "False", reason Invalid, the message naming each field
        - { type: InUse,       status: "True",    reason: Referenced }     # or "False", reason Unreferenced
        - { type: AgentsReady, status: "True",    reason: AllReady }       # "False": SomeNotReady, the message naming up to 5; "Unknown": NoAgents

    Accepted is aap_domain::validate_endpoint or validate_provider on the object alone, by the rules an inline model or MCP server meets inside an AgentConfig (the same code: the address, the headers, the Secret references, the allow-list of tools), each issue naming its field (ToolProvider websearch spec.mcp.tools[1]). What only a config can say stays with it: a plain http:// URL to another machine needs the config's tools.allowInsecureHttp, and a tool's name is checked against the name the config gives the server. AgentsReady counts Ready and Suspended as healthy and informs: nothing waits for a status, and the services' /readyz does not. A status never holds a secret, a header value, a URL's credentials or a token: names of AgentServices of the object's own namespace, reasons, and issues whose URLs are shown without credentials. The operator patches the status by server-side apply only when it differs from the one the object has. Two controllers (crates/controller/src/shared.rs) watch the kind, AgentConfig and AgentService, mapping a changed or deleted config or service to the objects its config names and those whose usedBy lists it, so a config that stops naming an endpoint updates the endpoint it left; a timer of ten minutes is the backstop (a user beyond the 64 listed is found by it when it leaves). The operator's Role gains patch on modelendpoints/status and toolproviders/status and nothing wider; the kinds themselves stay read-only and it still reads no Secret. The Platform API reads the status from the object it already gets: GET /v1/models and GET /v1/tool-servers (list and detail) carry it as status, filtered through the type (a member the type does not name is not passed on), beside usedBy, which stays the API's own count of every agent, GitOps's included.

  • K2 review (2026-11-14, P-023 amended). (1) The token of a shared object does not move with its status (see the D4 note on the ETag): a replace or a delete with the token read before the operator's status write is accepted, one read before a change of the spec is 412. (2) A person who may not read agents is told no agent's name by a success either, as a refusal does not (showing_agents): in the answer to a PUT (the GETs need platform:agents.read), usedBy is [], usedByCount says how many, the status's usedBy is [] and its usedByMore is 0, and the message of AgentsReady / SomeNotReady says that some agents are not ready and names none. (3) usedBy of the status and usedBy of the API answer the same question and may differ for a moment: both count the services of the namespace whose config exists and names the object, a service being deleted still counts (it runs the config and holds the reference until its finalizer has run, so the API refuses the delete of the object meanwhile), and one whose config is missing does not; the API reads the cluster at the moment of the request, GitOps's agents included, and the status is what the operator last observed, at most 64 names. (4) Triggers. The services' watches of the two shared kinds let a change through only when the generation moved (or it is a deletion, or the object has none): the operator's own status write must reconcile no service. The two status controllers share one reflector of AgentConfig and one of AgentService, fed by one watch each whose changes go to both controllers after the cache has them: two watches and two caches more than the services' own, which is the price of a status that is never one event behind. A controller that does not stop within five seconds of the shutdown is dropped with a warning that names it. (5) Accepted stands the object's own name for the server's name in a tool's <server>__<tool> (at most 64 characters), so a provider that cannot hold its tools is not accepted; an agent that names it under another key is judged again by validate, which the condition's message says (valid on its own; an agent that names it is validated again), and a plain http:// URL is still left to the config's tools.allowInsecureHttp. (6) A status write the API server answers with 404 (the operator rolled out before the CRDs chart, which gives these kinds their status subresource, or the object was just deleted) is a warning that says to install the CRDs first, retried with the back-off of an internal error (30 s, doubling, 10 minutes at most) and not every 5 s; the CRDs chart goes first (deploy/operator/README.md). (7) The kinds have a status subresource now, so a client that writes status through the main resource is ignored from here on; only …/status, which the operator alone may patch, takes it.

  • The MCP probe of a ToolProvider (K3b, 2026-11-18, AD-053). With the chart's toolProbe.to non-empty (the operator file's toolProbe.enabled, off by default), a pass over a ToolProvider probes its MCP server after judging it: initialize, notifications/initialized and tools/list over Streamable HTTP (aap-tool-probe), a JSON or SSE answer, at most 5 pages, 1 MiB of body, and at most 64 tool names. The status gains the Reachable condition and probe:

    yaml
    status:
      # ... observedGeneration, usedBy, usedByMore and the K2 conditions ...
      conditions:
        - { type: Reachable, status: "True", reason: Probed, message: "3 tools" }
      probe:
        tools: [get_pod, list_namespaces, list_pods]   # sorted, each once, at most 64
        toolsMore: 0                                    # absent at zero

    Reachable is Unknown (NeedsHeader) when the provider names a header — the operator reads no Secret (AD-024) — and Unknown (Invalid) for an object that is not accepted; False with Unreachable, NotMcp or Timeout when the server does not answer, answers something that is not MCP, or does not answer within the deployment's toolProbe.timeoutSecs (1 to 60 s, cut to five seconds under the pass's own deadline). probe.incomplete says the server still named a cursor after the operator's five pages, so the count is a lower bound. No message, reason or probe field holds a URL, a header name or value, a tool description or a schema. Off, or for an object that was not probed, both are absent and the status is exactly K2's. The probe is bounded by the operator's NetworkPolicy: toolProbe.to lists the peers and toolProbe.ports the ports (K3a); with networkPolicy.apiServer.cidrs empty, the API server's own egress rule already allows any address on 443 and 6443, so an https probe on 443 is bounded by toolProbe.to only once that list is set (the chart's NOTES say so). A probe is repeated on a later pass (the timer, or a change) and the status is written only when it changes.

  • A ToolProvider's header variable is named by its Secret key (§59a, What each field becomes); two providers of one agent whose keys have the same name are ConfigInvalid.

Who may use an agent (AD-028) &ZeroWidthSpace;

Today, another-agentic-system decides per role: auth.roles.<role>.agents in the orchestrator's configuration file lists agent ids or "*", and the roles come from Keycloak client roles in the token (verified 2026-10-05, docs/api/config.md "Roles and permissions", orchestrator/crates/app/src/authz.rs). Two ways to make it a dashboard setting:

(a) The dashboard edits Keycloak and the orchestrator's file(b) The access list is on the AgentService, published in the registry, enforced by the orchestrator
WritesKeycloak's admin API, and the system chart's values (a commit to home-os, or a ConfigMap)One field of a custom resource the API already writes
Takes effectAfter a restart of the orchestrator (it reads its file once)Within the registry's max-age (30 s in v0), no restart
Credentials the API needsA Keycloak admin client, and write access to GitOps or the system's namespaceNone more
Two writers of one fileGitOps and the dashboard on the orchestrator's configurationNo

Decided: (b) (the owner, 2026-10-05, adding that "RBAC should normally answer this"). It keeps the dashboard out of Keycloak and out of the orchestrator's file. RBAC answers it through use permissions: each agent has a Keycloak client role of another-agentic named agent.use:<agent-name>, its audience lists that name, and composite roles (Permissions and roles, below) grant it to people, so who may use coder-me is decided in Keycloak and not in git. The client's role mapper puts every client role, composites expanded, in agentic_roles (verified 2026-10-05 for the mapper: another-agentic-system deploy/keycloak/README.md; the expansion is unverified, below). The orchestrator's check stays what it was, "the audience intersects the person's roles": it needs no new code for composites. The orchestrator's own roles do not change per agent: a role with agent.read and agent.invoke over "*" (the netcup user) stays, and audience narrows it; the per-coder auth.roles[].agents entries of today's system chart become unnecessary for the agents the registry lists.

The registry attribute. The item of agent-registry/v1 gains an optional extension target attribute audience, an array of strings (as tags, RFC 9264 §4.2.4.3):

json
{ "href": "http://coder-me.another-agentic-system.svc:8080/.well-known/agent-card.json",
  "type": "application/json", "title": "Coder (me)", "service": ["coder-me"],
  "tags": ["coding", "git"], "audience": ["agent.use:coder-me"] }
  • The consumer's rule (in the contract since D3, Audience): a client that offers listed agents to people shows an item to a person, and lets them invoke it, only when audience holds "*" or one of the values of the person's roles claim; an item with no audience, an empty one or a malformed one is for the client's administrators only. Fail closed: an agent the dashboard has just made, with no audience yet, is seen by administrators, who can try it, and by nobody else. A client that offers nothing to people (a script) may ignore it.
  • Additive under the contract's Versioning: an optional item attribute, which clients that do not know it ignore. The risk is that such a client shows a restricted agent to everybody; the only consumer is another-agentic-system, which ships the rule (ADR 0045 there, slice D8) before any agent with an audience exists.
  • Listing is still not a grant (the contract's Serving): the agent itself checks only the orchestrator's bearer, so for people the orchestrator is the enforcement point, as it is today for auth.roles. The platform's own per-caller filtering (§12b, rule 1 of the contract) remains the target for clients that read the registry with a person's token.

Permissions and roles (AD-032) &ZeroWidthSpace;

The owner, 2026-10-05, asked "can we break down into permissions and let roles provide mappings?" and chose Keycloak composite roles. The names below are proposed, not final (§93); a name is in tokens and in every audience, so they are confirmed before anything is built.

  • Permissions are client roles of the client another-agentic: fine-grained, one thing each, named <area>:<noun>.<verb>, like the orchestrator's noun.verb names (agent.read, thread.delete; verified 2026-10-05, another-agentic-system docs/api/config.md, "Roles and permissions") with a prefix so that a dashboard permission never collides with an orchestrator role (user, admin).
Permission (proposed)Grants
platform:agents.readRead the dashboard: agents, models, tool servers, deployment defaults, View YAML. Draws /admin
platform:agents.writeCreate, edit, suspend, resume and delete agents, including their audience
platform:agents.ownRead, make, replace, suspend and delete the agents whose spec.owner is the owner named in the path of /v1/owners/{owner}/agents, and no other (ANR-661). The orchestrator's
platform:models.writeCreate, edit and delete ModelEndpoints
platform:toolproviders.writeCreate, edit and delete ToolProviders
platform:secrets.pickSee the offered Secret keys and name one in a write (AD-030)
agent.use:<agent-name>Use one agent in chat. Not a dashboard permission: it is what that agent's audience lists (AD-028), and the orchestrator reads it. One per agent, made in Keycloak

agent.use:<agent-name> keeps the orchestrator's agent.* family and the colon separates the instance. It is a role name in the token; the orchestrator's agent.read and agent.invoke permissions over the agent's id stay what auth.roles gives, and the audience narrows them.

  • Roles are composites that bundle permissions, made in Keycloak by an administrator of the realm. Proposed: platform-viewer (platform:agents.read), agent-editor (platform-viewer plus platform:agents.write and platform:secrets.pick) and admin, which becomes a composite that includes every dashboard permission beside what it grants the orchestrator today. The use permissions are bundled the same way: user or a group's role is a composite that includes agent.use:chat, agent.use:researcher; a coder's group role includes agent.use:coder-me. The composites are the deployment's to define, and the platform names none of them in code.
  • Keycloak expands composites into the token: the roles claim (agentic_roles on netcup) holds the permissions a person has through any composite. Unverified: that the User Client Role mapper of the client's configuration (system deploy/keycloak/README.md) includes composite-expanded client roles on the realm's Keycloak version. The Keycloak administration guide's section on composite roles does not say it (checked 2026-10-05, https://www.keycloak.org/docs/latest/server_admin/index.html); the owner's decision rests on it, so it is tried on the realm before the API is built (D6, D14). Amended 2026-10-16 (D6): D6 is built without that try (its tests use an issuer of their own, which puts the roles where they are told to), so the fact is still unverified; it is tried on the realm in D14, before the API is switched on in netcup, and the decision on composites rests on it until then.
  • Consequence for the system's repository: its deploy/keycloak/ exports (roles-and-groups.json, the client) gain these client roles and composites when the dashboard is built (D14). They are not edited by this decision.
  • No role name in code: aap-api knows the permission strings; it never compares a role name, and its configuration lists no role. A deployment that wants another bundle changes a composite in Keycloak and nothing else.

A change in Keycloak (a person added to a group, a permission added to a composite) reaches the API and the orchestrator at the person's next token, within the 15 minutes of the access token's lifetime (system deploy/keycloak/README.md, verified 2026-10-05). The lifecycle of a permission is Keycloak's, not the platform's, so no state diagram is drawn.

Secrets (AD-030) &ZeroWidthSpace;

The dashboard never shows, reads or writes a secret value (AD-024).

  • v0, decided: pick a reference. A field that needs a secret (an API key, a header token, a base URL kept out of git) offers the keys of GET /v1/secret-keys: the data[].secretKey of every ExternalSecret in the namespace that carries the label agents.vymalo.com/offer: "true", under its target.name. An ExternalSecret holds no value (verified 2026-10-05, https://external-secrets.io/latest/api/externalsecret/), so the API needs no right on Secrets. A key fetched with dataFrom is not listed and is typed by hand. The value is put in AWS Secrets Manager and the ExternalSecret in home-os, as today; the dashboard says where.
  • The offer label is the guard. A form may reference only an offered key; the API refuses anything else (422). Without it, anyone who may configure agents could point an agent's MODEL_API_KEY at the orchestrator's database Secret and a model URL of their own, and read it from the requests: the operator and the kubelet would mount any Secret of the namespace that a custom resource names.
  • v1, not now (the owner kept it out of v0): a write-only form that writes a Kubernetes Secret (the API then needs create and update on Secrets, which in Kubernetes come with nothing that stops it reading them back, and the value then lives outside AWS, where GitOps does not know it), or a write to AWS Secrets Manager through an IAM role scoped to one prefix (prod/another-agentic/agents/*) and to PutSecretValue, with an ExternalSecret made per secret. Either is a credential with write power held by a process that takes browser traffic, and needs its own decision.

GitOps and the dashboard (AD-031) &ZeroWidthSpace;

Argo CD in home-os owns the infrastructure: the CRDs, the operator and the system chart. §59a's rollout first puts coder (adam-rs deploy/coder-agent) and chat (the system chart) in charts, and the owner decided on 2026-10-05 that the dashboard then takes them over: their Argo applications are removed at the cutover (M3 and M5, §59a), and the dashboard owns them like the agents it makes. One owner per object:

  • Argo prunes only what it tracks. It tracks an object by its own annotation (argocd.argoproj.io/tracking-id, the default method; verified 2026-10-05, https://argo-cd.readthedocs.io/en/stable/user-guide/resource_tracking/), and an object of no Application is an orphan, which it can show and warn about but does not delete (https://argo-cd.readthedocs.io/en/stable/user-guide/orphaned-resources/). The another-agentic AppProject has orphanedResources: { }, so the dashboard's objects appear in Argo's orphan list; an ignore rule by kind can quiet that.
  • The dashboard writes only its own objects. It writes an object only when it carries its managed-by label and no Argo tracking annotation. Anything else is read-only in the dashboard, marked Managed by GitOps, with View YAML. A create whose name exists is 409.
  • An agent defined in both places. If a chart later renders an object with the name of a dashboard object, Argo applies over it and its tracking annotation appears: the dashboard sees the annotation, stops writing, and shows the object as GitOps's with a warning. The reverse, a dashboard save over a GitOps object, never happens (the rule above). With selfHeal on (home-os sets automated: { prune: true, selfHeal: true } for both another-agentic apps), a dashboard edit of a GitOps object would be undone within a sync, which is why it is refused.
  • Moving an agent between owners. Dashboard to GitOps: Export YAML, commit it, sync. GitOps to dashboard: mark the objects Prune=false, remove the Argo application without cascade, remove the tracking annotation, then an Adopt action adds the label. Adopt is in v0 for the takeover of coder and chat, and takes only an object that no Argo application tracks any more. Unverified: the exact sequence that keeps the objects, the volume and the database through it; it is rehearsed on the shadow (M2).
  • What the takeover costs. Once coder and chat leave git, their configuration lives only in the cluster: a lost cluster or a bad edit has no commit to go back to. v0 has Export YAML (manual) and the config digest; a backup or export of dashboard-owned objects is an open question (§93), not decided. Nothing of the fleet stays GitOps's afterwards, so Managed by GitOps appears only for an object somebody puts under Argo again.

Revisions &ZeroWidthSpace;

§61 (immutable revisions, channels, promotion) is out of dashboard v0: the operator has no revisions (AD-023) and nothing consumes them. An edit applies at once, as an edit of the custom resource does. What the dashboard gives instead: the config digest (status.config.digest) on each agent, View YAML and Export YAML for GitOps users, and an If-Match on every save so two administrators never overwrite each other silently.

Screens &ZeroWidthSpace;

Every screen lists what the API returns; a GitOps object is read-only everywhere. Every field error is the API's 422, shown on its field.

ScreenFields and validationWrites
Agents (/admin)One row per AgentService: name, title, kind (coder or folder), state (the lifecycle below), the first false condition's reason and message, owners (coders), audience, Managed by GitOps, In chat. Actions: New coder, New folder agent, Edit, Suspend or Resume, Delete (confirm by typing the name; says what deletionPolicy keeps)spec.suspend; delete
Coder (new, edit)Name: ^[a-z][a-z0-9-]{0,38}[a-z0-9]$, at most 40 characters so every derived name fits 63, unique, fixed after create. Title (1 to 80), description (at most 500). Tags (at most 16, each 1 to 64, lower-case words and dashes). GitHub App (one per coder, AD-033): its id, and its private key as an offered secret key (platform:secrets.pick). GitHub owners: at least one GitHub login (^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$), no *. Owners who may get new repositories: a subset of the owners, default none. Model: an endpoint and one of its aliases (or a typed alias); OpenCode's model, default the same. Run-pod size class: one of GET /v1/info's classes (D15a), hidden while there are none; absent means no run pods. Runs at once: 1 to 16. Pull requests as drafts. Tool servers: any ToolProviders; an http:// one to another host asks for Allow plain http, which covers every server of the agent. Image under Advanced: empty is the operator's default coder image (AD-029). Access: the audience, defaulting to agent.use:<name>AgentService: metadata.name, description, registry.title, registry.tags, access.audience. AgentConfig: environment.image, coder.github.app.id, coder.github.app.privateKeySecretRef, coder.github.app.owners, coder.createRepoOwners, model.endpointRef, model.model, coder.opencodeModel, coder.runPods.sizeClass, coder.workers, coder.prDraft, tools.mcpServers.<n>.providerRef, tools.allowInsecureHttp; the rest from the deployment defaults
Folder agent (new, edit)Name, title, description, tags, as above. Instructions: instructions.md in a text editor, with its front matter; more files by relative path (skills/…); the folder at most 1 MiB; no mcp.json (tools come from the Tool servers screen). Model, tool servers, access, as aboveAgentConfig: adam.binary: adam-agent, agent.folder.files, model, tools; AgentService as above
A2A image (new, edit; K11b)Name, title, description, tags, access, as above, and no model and no tool servers: the platform gives an A2A image neither (AD-054). Image: the image that serves A2A itself, with a tag or a digest and an allowed registry (the same rule as an agent's own image). Port (1 to 65535, 8080), card path and health path (absolute paths, /.well-known/agent-card.json and /healthz), prefilled with the CRD's defaults. Variables: rows of a name and a value or an offered secret key, never both, at most 64, each name once; the platform adds none but the service's A2A_BEARER_TOKENSAgentConfig: harness.type: a2a, harness.a2a.{image,port,cardPath,healthPath,env}, environment.resources from the deployment defaults; AgentService as above. A form that names a model, environment.image, a tool server or the plain-http allowance is refused with that field
ModelsName (^[a-z][a-z0-9-]{0,62}$), title, base URL as a value (http or https, a host, no user, password, query or fragment) or an offered secret key, the API key (an offered secret key), the aliases (at most 32). Used by: the agents that reference it. Delete is refused while it is usedModelEndpoint
Tool serversName (^[a-z][a-z0-9-]{0,30}$, the prefix of its tools as <name>__<tool>), title, URL (the same URL rules), headers (an HTTP token as name, a plain-text prefix, an offered secret key), tools allow-list, optional (default on). Used by. A second, read-only list: the tool servers a person can attach in chat, from the orchestrator's GET /api/tool-servers, marked set in the system chartToolProvider
AccessA table: agents by rows, the audience values in use by columns (the use permissions agent.use:<name>, and *). A cell toggles a value for one agent. A note says that the use permission and the composite roles that grant it are made in Keycloak, not here, and that the orchestrator's own roles are in the system chart. An object under GitOps is shown and not editableAgentService.spec.access.audience
DeploymentRead-only: the sharing cap (GET /api/me), the registry's state (GET /api/registry), the public ui settings (GET /api/config), the deployment defaults (GET /v1/info), and where each is changednothing

Create a coder &ZeroWidthSpace;

From the form to the person's agent picker. The Platform API, the client's /admin area (calling the API directly, Clients without a web server) and the registry's audience attribute: the custom resources of D1, the operator's references of D2, the registry's attribute of D3 and the forms and ports of D4 are built, D5 to D9 are planned; the operator, the registry, the orchestrator's registry reader and GET /api/agents are §59a's slices and another-agentic-system's built code.

The person sees the agent at most the registry's max-age plus the orchestrator's cap after it is listed (30 s and 60 s; verified 2026-10-05 for the orchestrator: orchestrator/crates/registry-platform/README.md and orchestrator/crates/app/src/app.rs, list_agents reads the registry on every call). No restart: dev/registry-e2e.sh (b) asserts that an agent added to a mock registry is listed within 10 seconds (the script exists; it was not run for this text).

An agent's lifecycle, as the dashboard shows it &ZeroWidthSpace;

Saving to Blocked, Degraded, Ready and Suspended are §59a's states once the operator has observed the generation; InChat is the page's own check, GET /api/agents read by the browser (an administrator sees every listed agent, AD-028). A GitOps object goes through the same states and is read-only.

Slices &ZeroWidthSpace;

After the operator slices they need (§59a, Slices): S5 (the controller), S7 (the registry) and S12 (the system reads the registry). Each slice is one pull request in one repository.

SliceRepositoryWhatTestsNeeds
D1platformaap-api: access.audience, ModelEndpoint, ToolProvider (v0 subset), model.endpointRef, mcpServers.<n>.providerRef, optional environment.image; CEL; crdgen; examplesthe CEL rules against a real API server, invalid examplesS1
D2platformaap-domain resolves the references and the default image; the controller watches the two new kindstable tests, parity goldens unchanged for inline objects, reconciler tests on the Memory portsS5, D1
D3platformThe registry item's audience; the contract's Item table and consumer rule editedthe contract tests, the consumer test with the system's parserS7, D1
D4platformaap-forms; AgentObjects and Authenticator in aap-ports with testkitsform round trips, property tests (no secret value in a form, a CR or a YAML export)D1
D5platformobjects-kubernetes: server-side apply, the ownership rules, ExternalSecrets readthe envtest-like harness: apply, conflict, the Argo annotation, a GitOps object refusedS4, D4
D6platformauth-oidcthe conformance suite against an in-process issuer: algorithms, aud, expiry, unknown kid, roles claimD4
D7platformplatform-api and bin/api; the chart's api component (Role without Secrets, NetworkPolicy from the web's pods only); GET /v1/inforouter tests on the Memory ports; kind end-to-end: create a folder agent through the API, see it Ready and listedS8, D2, D5, D6
D8systemThe orchestrator enforces audience (ADR 0045): the reader parses it, every agent check applies it; the mock registry's items get oneunit and property tests of the predicate, conformance, dev/registry-e2e.sh extended (a person without the role does not see the agent; an administrator does)D3
D9systemWeb: the /admin area, PLATFORM_API_URL, the route handler, the gates, the Agents screen read-only; a mock Platform API in web/mockPlaywright with axe on the mock: hidden without the URL, hidden without platform:agents.read, unreachable API, a 403 from the API, the header forwarded and never loggedD7
D10systemWeb: the coder and folder-agent forms, Suspend, Delete, View and Export YAMLPlaywright: create, a 422 on its field, a 412 on a stale save, a GitOps agent read-onlyD9
D11systemWeb: Models, Tool servers, Access, DeploymentPlaywright, as D10; pnpm screensD10
D12systemThe chart: web.platformApiUrl, the web's egress to the APIdeploy/chart/tests/render-check.shD9
D13platformkind end-to-end of the whole chain: the API creates a coder with an audience, the operator runs it, a pinned orchestrator image lists it for a person who holds the role and not for one who does notthe job chain-e2e of operator-image.yml (built 2026-10-17, the D13 built note above; passed on its first run, run 38994193619 at 4929e3c, verified 2026-10-17, and the review's changes passed too, run 38996503582 at 8d45dab, verified 2026-10-17; it does not gate push)D7, D8
D14home-os and systemThe api component on, its configuration, the offer label on the agents' ExternalSecrets, web.platformApiUrl; in the system's deploy/keycloak/ exports, the client roles of AD-032 (the dashboard's permissions, one agent.use:<name> per agent) and the composite roles that bundle them, admin among themthe first agent made on netcupS10, S12, D12, D13
D16home-osThe takeover (AD-031): the Argo applications of coder and chat removed without cascade, the objects adopted by the dashboard; coder renamed coder-vymalo with its alias, coder-me made (AD-033)the dashboard edits coder-vymalo and chat; an old thread of coder continuesS14, S15, D14
D15platform and adam-rsrunPods.sizeClass and the chart's runPodClasses, once adam-rs's run pods (ADR 0019 there) are mergedgoldens of the run-pod templateD2, adam-rs ADR 0019
D15a / D15b / D15c / D15dplatformD15a (built, the D15a built note above): the operator sets up run pods (the template, the quota, the network policy, the account and its binding, the admission policy), the chart's runPods and runPodClasses, the form field and runPodSizeClasses in GET /v1/info; D15b (built, the D15b built note above; its job has run green, run 40435825771): the kind end-to-end of the coder with run pods; D15c (built, the D15c built note above; its job has run green, run 40484065490): the egress proxy, run pods' network deny by default, parity at adam-rs 7598255; D15d (built, the D15d built note above; its job has run green, run 40520862547): the coder's local git in a sidecar with no secret, the token as a volume of the coder container alone, parity at adam-rs 581aeedD15a: the parity goldens at adam-rs 3f714d0 (since D15c 7598255, since D15d 581aeed), render-check.sh, run-pods-admission.sh on a real API server, mutation of each guarantee; D15b: run-pods-e2e.sh, the job run-pods-e2e of operator-image.yml, walked against a real API server and the real operator and coder with a stand-in for the kubeletD2, D5, D7, D15 (adam-rs #131)

Amended 2026-10-06 (clients without a web server): D7 gains the edge route to the API, CORS for the deployment's origins and a rate limit, and its NetworkPolicy lets the edge in, not only the web's pods; D9 becomes the /admin area of the static export, with the API's public base URL (a config endpoint or build time) and no route handler (and, if P-017 is taken, Refine); D12 becomes the chart's edge route and the public setting, not web.platformApiUrl for a server. The desktop and mobile shells, and their sign-in, are the system's (its ADR 0047, to be added) and are not slices of this repository.

Amended 2026-10-16 (D7a): D7 is two pull requests. D7a (built) is crates/platform-api and bin/api: the router, the table of routes to permissions with its matrix test, GET /v1/info, CORS, and the binary with its configuration file, health and shutdown (the D7a built note above). D7b is the rest of the row: the image and its CI build, the chart's api component (the Role of crates/objects-kubernetes/tests/rbac.yaml, no Secrets; the Service; the edge route, with its NetworkPolicy and rate limit) and the kind end-to-end, which is also the first time the binary runs against a real API server and a real issuer.

Amended 2026-10-16 (D7b1): D7b is two pull requests. D7b1 (built, the D7b1 built note above) is the image, its CI build, push and bump, and the chart's api component: the Role (the objects crate's rbac.yaml, held equal by a check), the Service, the NetworkPolicy whose ingress is the edge's peers, the optional Ingress and the ConfigMap. The rate limit stays the edge's: the chart passes the Ingress annotations through and does not implement one. D7b2 is the kind end-to-end through the API, the first time the pod runs against a real API server and issuer.

Amended 2026-10-16 (D7b2): D7b2 (built, the D7b2 built note above) is the kind end-to-end: deploy/operator/tests/e2e/api-e2e.sh and the job api-e2e, which push needs, with the testkit's issuer as a program on the runner. D7's last column is met by the job once CI has run it; D13 (the whole chain, with an orchestrator that lists the agent) is still to come.

Amended 2026-10-17 (D13): D13 (built, the D13 built note above) is a job of operator-image.yml, chain-e2e, and not of operator.yml as this row said: both images are artifacts of that workflow, which is where the API's end-to-end already is; and it does not gate push (an owner decision, below the note), because it runs another repository's image, pinned in one file of this one. It needs D7 (the API, the registry on) and D8 (the orchestrator that enforces the audience: the pin is its main at 8df44c6). D14, which turns the api component on in the deployment, is still to come, and the wiring of the two deployments (the system's chart reading the registry through the operator's Service, the one shared token) is its.

Amended 2026-10-26 (D15a): D15 is two pull requests. D15a (built, the D15a built note above) is everything that needs no cluster: the field, the neutral spec, the settings, the objects and their order, the chart (the Role, the PriorityClass, the admission policy and its parameters), the form and GET /v1/info, parity with the coder chart at adam-rs 3f714d0 and the admission test against a real API server. D15b is the kind end-to-end: the operator chart installed in kind with runPods.enabled, a coder with run pods running the real image, a command run in a pod by exec, the quota, the network policy and run-pods-admission.sh run in the cluster, and the deletion of everything. The row's dependency on adam-rs's ADR 0019 is met by adam-rs main (#131, 3f714d0); the Risks row below is amended. The run pool of §59b (the operator making and leasing the pods) is unchanged by this: D15 is the per-run pods of adam-rs's chart, which AD-039 keeps as the default.

Amended 2026-10-27 (D15c): D15c is built (the D15c built note above): adam-rs closed the network of a run pod (its ADR 0042, ff10395 and 7598255: deny by default, an egress proxy of its own, the template's proxy variables) and the operator makes the same per agent; the parity goldens move to 7598255; run-pods-e2e.sh asks the cluster what adam-rs's script asks of its own. D15b's job has run green (run 40435825771). D15 stays open until the job has run green with D15c's checks.

Amended 2026-10-27 (D15d): D15c's job has run green (run 40484065490, job 122121514621, verified 2026-10-27). D15d is built (the D15d built note above): adam-rs closed #118 (05cda7f, 581aeed) and the operator puts the coder's local git in a sidecar that holds no secret, the account's token in a volume of the coder container alone, and GIT_SANDBOX_SOCKET in its environment; the parity goldens move to 581aeed; run-pods-e2e.sh asks the cluster what adam-rs's script asks of its own, of the pod the operator made (step 4b). D15d's job has run green (run 40520862547, job run-pods-e2e 122249371008, at b8290bf, verified 2026-10-27 in its log), and review refused a work volume mounted over /tmp (the sandbox mounts its own there).

Amended 2026-10-27 (D15b): D15b is built (the D15b built note above): the script, its fixtures and its job exist and were walked against a real API server, the real operator running as its own service account and the real coder, with a stand-in for the kubelet and no network plugin. D15 stays open until the job run-pods-e2e has run green in CI. Amended 2026-10-27: the job has run once (run 40432460348) and found a fault of the provider in step 9, fixed in the Amended 2026-10-27 note after the D15b built note; D15 stays open until it has run green.

Amended 2026-11-19 (K11b): D4's agent form has three kinds. An image that serves A2A itself (AD-054, K11a) was YAML only in the dashboard; since K11b AgentKindForm::A2a(A2aSettings) is the third arm, with its image, port, card and health paths and its variables (each a plain value or a SecretPick), and AgentForm.model is Option<ModelChoice> — required of a coder and of a folder agent, absent on an A2A image, and refused on one that carries it. The deployment's defaults gain a2a.resources (what the image gets and nothing else: the platform gives it no model and no tools), Defaults::check() makes an A2A sample too, and GET /v1/agents' kind is a2a. examples/a2a.yaml is a form (it lost a publicUrl: "" that said the same as absent), aapctl apply sends it as one, and the OpenAPI document's AgentForm says it: model nullable, A2aSettings and A2aEnvForm in the agent union. Its one decision, accepted by the owner on 2026-11-19: the A2A image's resources come from a block of its own, defaults.a2a.resources, and not from defaults.folder.resources (an A2A image is not a folder agent); the block is optional and additive, so every configuration file that has none is read as before. There is no AD of its own: it is a shape of the dashboard's configuration, recorded here.

Risks &ZeroWidthSpace;

RiskHandling
Whoever may configure agents can make a pod read any Secret its custom resource namesThe offer label (AD-030) and the permission platform:secrets.pick that every secret reference needs: only keys of labelled ExternalSecrets are accepted. A namespace of their own for agents is the stronger fence, later (owner question in §93)
The web gains its first server-side call and setting; another-agentic-system says the web has noneADR 0045 there: one route handler, one URL, the header forwarded as received, nothing stored or logged
Amended 2026-10-06: the Platform API is now reachable by any holder of a token, from any clientJWT validated at the edge and again in the API; CORS limited to the deployment's origins; rate limits; the permission checks of AD-032 are unchanged, and they, not the network, were always the guard
A native client's tokens leave the browser's cookie jarOS keychain or keystore, public clients with PKCE, one Keycloak client per platform (AD-044)
The registry's audience is ignored by a client that does not know it, which then shows a restricted agent to everybodyThe only consumer ships the rule (D8) before D14; the contract states the rule (D3, done 2026-10-15); D13 runs the pinned consumer against the registry the operator serves, in kind (verified 2026-10-17: the job passed on its first run, run 38994193619)
A permission or composite changed in Keycloak is not in a token yetTokens live 15 minutes and are refreshed by oauth2-proxy (system deploy/keycloak/README.md), so a change reaches the API and the orchestrator within that; the API's 403 names the permission it needed
Many agent.use:<name> roles make the roles claim, and so the ID token, largeOne role per agent is a handful at v0; unverified where a header limit bites (oauth2-proxy, Caddy, Next.js), to be tried with a realistic token in D9
After the takeover the configuration of coder and chat is only in the clusterExport YAML by hand and the config digest in v0; a backup or export is an open question (§93)
GitOps and the dashboard fight over an objectOne owner per object, the label and the tracking annotation checked on every write (AD-031)
A broken edit takes an agent down at once (no revisions)aap-domain::validate before the apply; Blocked leaves what runs untouched (§59a); Export YAML before risky edits
Two administrators edit the same agentIf-Match on every save, 412 for the second
The ID token expires during a long editThe web's session refresh (another-agentic-system ADR 0033 amendment of 2026-10-04) retries the call; the form keeps its fields
adam-rs's run-pod settings change before they mergeD15 is last and starts from adam-rs main (met: D15a read 3f714d0, and a later change of the coder chart is a diff of the parity goldens, tools/adam-parity/regen.sh --check; it happened once, D15c: adam-rs closed the network of a run pod at ff10395 and 7598255 and the goldens moved)
An agent's image has no adam-git-sandbox (older than adam-rs 05cda7f; defaultAgentImage is one)the git-sandbox sidecar cannot start and the coder container, which waits for its startup probe, never does: the pod is Init:0/2 and the service is never Ready; loud, and the operator cannot tell beforehand (§60a, D15d, decision 2); the chart's README says so where defaultAgentImage is, and the end-to-end's fixture names an image that has it
A filter in the git sandbox reads the whole work volume, and the sandbox's socket authenticates nobodyadam-rs's own limits (ADR 0041, "Known limits"), all of which apply: what the sandbox protects is the coder's secrets, not the other runs' files, which the coder's git could read before; the coder puts a mirror's configuration back before a network command; the socket's mode and directory decide who may use it
An agent's image has no adam-egress (older than adam-rs ff10395; defaultAgentImage is one)the proxy of its run pods cannot start and its run pods reach nothing; the operator cannot tell and the service stays Ready (§60a, D15c, decisions 2 and 3); the chart's README says so where defaultAgentImage is, and the end-to-end's fixture names an image that has it
A person who deletes the policy's parameter ConfigMap, or the operator that fails between two writes, leaves an account that can make pods without the guardThe binding must allow a namespace with no parameters, or it would deny every pod there; the operator makes the parameters before the binding of the account to the Role and removes the binding first; the account's Role has no right on ConfigMaps; the README says it. Not closed: a person with delete on ConfigMaps in the namespace can still open it (D15a built, 2)
The operator can bind the Role of run pods to any account of its namespaceIt already makes workloads that run any pod; the right is bind on that one Role by name (not escalate, not create on roles, not pods); render-check.sh holds the Role rule by rule

Facts checked &ZeroWidthSpace;

  • Verified 2026-10-05, another-agentic-system at e5da0a4: the orchestrator reads the registry on every list_agents (orchestrator/crates/app/src/app.rs) through CompositeRegistry<FixedRegistry, Option<Platform>>, static agents first (orchestrator/bin/orchestrator/src/boot.rs); a copy lives at most max-age, capped at 60 s (orchestrator/crates/registry-platform/README.md); the roles filter agent ids (orchestrator/crates/app/src/authz.rs), and a credential's roles are its claim's values as spelled; admin is content-free (ADR 0039, docs/api/config.md).
  • Verified 2026-10-05, the same revision: the edge copies Authorization: Bearer <ID token> onto every request to the web (deploy/chart/files/Caddyfile, dev/Caddyfile), oauth2-proxy runs with --set-authorization-header=true, the roles claim is agentic_roles and the client id another-agentic (deploy/chart/values.yaml, deploy/keycloak/README.md); the web makes no server-side call today (docs/architecture.md).
  • Verified 2026-10-05, home-os at 12bb11d: both another-agentic Applications sync with ServerSideApply=true and automated: { prune: true, selfHeal: true } (charts/apps/values.yaml); the AppProject has orphanedResources: { } (charts/cd/values.yaml); no application.resourceTrackingMethod is set (charts/argocd/values.yaml).
  • Verified 2026-10-05, documentation: Argo CD's default tracking method is the annotation, and orphaned resources are reported, not deleted (the two Argo CD pages above); an ExternalSecret holds no value (external-secrets.io); list on Secrets returns their contents (kubernetes.io).
  • Verified 2026-10-05, adam-rs at ea570d6: deploy/coder/values.yaml has github.app.owners (GITHUB_APP_OWNERS) and the mcp.websearch and mcp.context7 servers the forms replace; no run-pod setting is on main.
  • Verified 2026-10-06: a Next.js static export has no request-time server code or API routes (https://nextjs.org/docs/app/guides/static-exports); another-agentic-system runs oauth2-proxy with --skip-jwt-bearer-tokens=true (deploy/chart/templates/oauth2-proxy.yaml, ADR 0033); Refine's shadcn/ui integration (https://refine.dev/core/docs/ui-integrations/shadcn/introduction/).
  • Verified 2026-10-16: OpenID Connect Discovery 1.0, 4.3 (the issuer of the document must be identical to the issuer URL used as the prefix of /.well-known/openid-configuration) and 4.1 (a terminating / of the issuer is removed before the well-known path is appended), https://openid.net/specs/openid-connect-discovery-1_0.html; jsonwebtoken 11.1.0 (features aws_lc_rs and rust_crypto, no ring; the signature is verified before the claims; iat is not validated), read from the crates.io download; reqwest 0.12.28 (rustls-tls-native-roots is rustls with ring), from the crates.io index; Google's issuer fetched over TLS by aap-auth-oidc through HTTPS_PROXY (D6 note). Unverified: a Keycloak's JWKS and discovery document, and the composite-expanded roles in agentic_roles.
  • Verified 2026-10-16, kubernetes-sigs/kind at v0.33.0, pkg/build/nodeimage/const_cni.go: the default CNI is kindnetd (image kindest/kindnetd:v20260820-69b56db7) and its ClusterRole may list and watch networkpolicies, pods, namespaces and nodes. Verified 2026-10-16, CI run 38892472909 on main (job operator-coder-e2e, kind v0.33.0, node image v1.35.8): kindnetd enforces NetworkPolicies, since ok a pod the registry's NetworkPolicy does not name cannot read it (status 000) was printed by coder-e2e.sh, which prints a warning instead when the pod got through; and the operator's pods are Ready under a policy that admits ingress only to the registry's and metrics' ports (the kubelet's probes of the health port pass).
  • Amended 2026-10-26 (D15a): what was unverified in the next line is verified 2026-10-26 at adam-rs 3f714d0 by rendering its chart (tools/adam-parity/regen.sh): RUN_POD_TEMPLATE_FILE, the template, a 2Gi limit in the chart's default class, the quota, the policy and the Role. Not verified: that the coder reads what the operator mounts (D15b). Amended 2026-10-27 (D15b): the real coder, at adam-rs main (the code of 3f714d0), reads the template the operator made and makes a pod from it, in the walk of run-pods-e2e.sh against a real API server; with a real kubelet it is CI's (unverified until the job has run).
  • Unverified: adam-rs ADR 0019 and its settings (RUN_POD_TEMPLATE_FILE, a 2Gi limit), seen only as uncommitted work in a local working copy; the Argo CD version on netcup (installed by hand, unpinned) and so its tracking method; that dev/registry-e2e.sh passes today (not run); that a StatefulSet name over 52 characters fails (the reason for the 40-character cap). Unverified, 2026-10-06: the origins each Tauri platform's webview uses (CORS), and Refine's Vite preset and access-control provider beyond the page above.

60b. CLI &ZeroWidthSpace;

(2026-11-14, slice K9; P-028; the implementer's, for the owner to confirm. Phase 1 is built. Phase 2 is built without the browser sign-in (K9b-1, 2026-11-15, P-030 to P-035); the browser sign-in is K9b-2, planned.)

People write AgentService and AgentConfig files and want to know, before an API server or a pull request sees them, whether the operator would accept them and what it would make. aapctl (bin/cli, package aap-cli; README) answers that offline, and, in phase 2, applies them through the Platform API. It is the increments K9 and K9b of §59c.

Phase 1: validate and render, offline (built) &ZeroWidthSpace;

aapctl validate -f <file|dir|->... and aapctl render -f ... read documents of the four kinds of agents.vymalo.com/v1alpha1 and judge each AgentService as the controller does: with the config its configRef names and the ModelEndpoint and ToolProvider objects that config names, taken from the documents given instead of from a cluster, by aap_domain::resolve and the deployment's settings (--default-agent-image, --run-pods-file, --activity-file (ANR-1030b: the operator's activity block, so a service that may sleep renders with the listener it would get), --max-access-tier, --cache-allowed-claims: the operator's own names and defaults, from flags alone). render then prints what aap_runtime_kubernetes::render makes of each resolved service: the function the provider applies from and its goldens are made with, so there is no second renderer to drift. Nothing reaches a cluster or a network and no Secret is read: an object names a Secret by reference (AD-024), and so does what is printed.

ExitMeans
0Valid; for render, the objects were printed
1An issue: one line each, naming the file, the object (Kind/name) and the field as aap-domain words it
2A usage or read error: no issue can be told because nothing could be read

What it cannot tell (the README's Limits): the CEL rules of the CRDs and the bounds of their schema are the API server's and are not re-implemented, so fifteen of examples/invalid/ (the audience, the lengths and counts of the shared kinds, extraBody's size, the number of MCP servers) are accepted offline; a referent that lives only in the cluster is missing; the types accept unknown fields, so aapctl finds them by writing an object back through its type (an issue: unknown field), which is weaker than the structural schema. The store (a CloudNativePG Cluster) is not rendered; the runtime's objects are.

Proof. 30 tests of the built binary (bin/cli/tests/cli.rs and review.rs), among them render_matches_runtime_golden (byte for byte against crates/runtime-kubernetes/tests/golden/, after the comment), validate_accepts_every_example, validate_refuses_every_invalid_example (every example aap-domain refuses is refused, and the fifteen it cannot are accepted, by name), exit_codes, the whole-document unknown fields, nulls, duplicate keys, directories, the shape of the issue line, namespaces, and that neither command prints a secret-looking value. No cluster is needed or run.

Phase 2: over the Platform API (K9b-1 and K9b-2 built, 2026-11-15) &ZeroWidthSpace;

Built (K9b-1). aapctl get agents|models|tool-servers [name] (-o table|json|yaml|etag), apply -f, delete agent|model|tool-server <name> (--wait), export agent <name>, whoami, logout and login --token-stdin, over the Platform API (§60a) through a new crate, aap-platform-client (crates/platform-client): a concrete reqwest 0.12 client (rustls with ring, never 0.13: crates/auth-oidc/README.md), whose table of calls is held to docs/api/platform-api-v1.openapi.json by a test (client_calls_are_documented: every method and path is an operation of the document and every status the client acts on is listed for it, and it caught a 202 the client expected of a model's delete). The CLI holds no right the API does not give the person: the server enforces and the CLI only offers, so a 403 names the permission, a stale write is 412, and a second create is 409.

Built (K9b-2). aapctl login with a browser and the refresh token, described below (The browser sign-in and the refresh token). Not built. Export of models and tool servers (P-033). A keyring (P-031). A device flow (P-032). A real Keycloak and a real browser were not used: everything is proven against the testkit's issuer.

The token. From AAPCTL_TOKEN, else from a file that login (either form) wrote: $XDG_CONFIG_HOME/aapctl/config.yaml, else $HOME/.config/aapctl/config.yaml, or --config. The file is written whole or not at all (a temporary file made with create_new, so that a link left at its name is not followed, and mode 0600, flushed, then renamed over the old one; one that cannot be renamed is removed) in a directory that is 0700 when it had to be made (the mode of a directory that already exists is not checked); a file that group or others can read is refused (exit 2), as ssh refuses a private key. It is read safely (P-031): opened once with O_NOFOLLOW (a link at the last component is refused), and the open descriptor is checked and read: a regular file, owned by the effective user, no group or other bit, at most 64 KiB; rustix does the geteuid and the flags with no unsafe; O_NONBLOCK keeps a FIFO from blocking the open, and it is refused as not a regular file. Newly refused by this read, each with the same way out (AAPCTL_TOKEN and --server, which do not read the file): sudo -E aapctl (effective uid 0, the file is the person's), a 0600 file mounted into a container under another uid, and a config file that is a symbolic link (a dotfile manager, a Kubernetes Secret mount). The file is not read at all when the person gives both AAPCTL_TOKEN and --server, so a file that leaks does not stop a command that does not use it (login and logout still need it). The saved token goes only to the server it was saved with: with --server naming another one (compared by scheme, host, port and path, not by spelling) and the token coming from the file, the command is exit 2 and says so; AAPCTL_TOKEN is the person's own and goes wherever they point it. A plain http:// loopback server is never reached through a proxy, whatever the environment says (the bearer token would be handed to a third party in the clear); an https server and an http address allowed with --insecure-http keep the system proxy. login --token-stdin keeps the token exactly (no line break), and refuses an empty one or one longer than 64 KiB instead of cutting it. A 401 says the token was refused or has expired. What the server says is never printed as a control: -o json prints the answer parsed and written back with every control and bidirectional control (C0, DEL, C1, U+061C, U+200E, U+200F, U+202A to U+202E, U+2066 to U+2069) as a \uXXXX escape, the same JSON value; the other outputs and every message replace them with a space; the marks LRM, RLM and ALM (U+200E, U+200F, U+061C) and U+2028 and U+2029 are replaced in one-line text and escaped by -o json, but a file keeps the marks (Arabic and Hebrew text holds them) and U+200C and U+200D are never touched; export refuses (exit 1: the content, not the server, is the fault; nothing printed; the message says which kind of character and names get agent <name> -o json) a text that holds a control character other than a line feed or a tab, or an embedding, override or isolate. Timeouts (10 s to connect, 60 s a request) are options of the client's builder; delete --wait cuts each read to the time left, so the wait ends within --timeout and a read that fails for a reason waiting can change (unreachable, 5xx) does not end it early. There is no --token flag: an argument is shown by ps. No token is in any stdout, stderr, --verbose line or error: the client holds it in a Token whose Debug shows nothing, marks the header sensitive and makes no message from a transport error (a reqwest error can carry the URL it was sent to); --verbose prints the method, the path, the If-Match or If-None-Match and the status, never a header that holds a credential. The environment is read by the network commands only, and only for the token, the config home and the home: validate and render still read none (decision (3) of K9, which stands).

apply in words. The API takes forms, not custom resources, and fills what no form says (the store, the security context, the network peers: the deployment's part) from its own defaults on a create and keeps what the object holds on a replace. So a file is read as the dashboard reads an object: each document becomes an aap_ports::Stored, and aap_forms::load_agent and the load of the model and tool server forms say whether a form holds all of it. An object a form cannot say is refused with one line per field (AgentService spec.scaling.workers: …), never sent; a label other than the dashboard's, any annotation (the API writes none), a metadata member the API does not write, a namespace that is not /v1/info's (every document of an agent, the service and its config alike, must say the API's namespace or none, and agree) and a config that two services name are refused too (exit 2: the file says what the API cannot keep), since the API would drop them without a word. A file is judged whole before the first request, so a bad object writes nothing, and the objects are written in the order that lets each referent exist first. Then, per object, it reads first: a 404 is a create (for an agent, after comparing the file's deployment part with defaults.deployment_for(kind, name) of /v1/info, because the server would write its defaults and not the file's), a 200 that is the file's form writes nothing (so apply is idempotent and causes no status churn), and one that differs is a replace with If-Match set to the tag just read, after refusing a GitOps-owned, deleting or YAML-only object and a deployment part that differs (a replace never moves it). Before it compares anything it checks that it reads what the server sent whole (P-034): the server's form is parsed into this binary's type, written back and compared with what the server sent (key order and null against absent aside); a member it does not know, or one an older server did not send, is exit 5 naming the member and never its value, "use the aapctl of the server's release", and nothing of that object is written. /v1/info's defaults get the same check. An agent's tag moves whenever the operator writes its status, so a 412 is not a person's edit: it reads again, and retries only if the form and the deployment are what it read (at most three writes); otherwise exit 3, "changed on the server since it was read". --if-match <etag> (one object) changes only the tag the write carries: the object is still read and every check above is still made (a deployment part that differs is still refused, an unchanged object is still not written), and a stale tag is a plain 412, never retried. The first object the API refuses stops the apply and nothing after it is sent; the failure says how many objects were applied before it and names them. A 202 on an agent's delete says that the operator is still releasing it and what an orphan is (below). --dry-run is offline and makes no request at all (a test counts the router's requests): it prints the forms as JSON. export agent <name> prints what the API serves (GET /v1/agents/{name}/yaml), and apply reads it back as unchanged: the export is a whitelist that keeps the dashboard's label.

ExitMeans
0Success (unchanged is a success)
1The API or a local check refused the content: 422, 409 yaml-only, breaks-agents, referenced, a file the forms cannot represent, an export that holds a character a file of YAML must not print, and also a 404 (the name asked for is not there) and any other 4xx
2Usage or read error (phase 1's meaning): a bad flag, a file that cannot be read, a service with no config or two services for one, a label, an annotation or a namespace the API cannot keep, no server, a config file others can read (or a link, or not yours), a saved token for another server, a token that is empty, too long or has white space in it, an address that is not usable
3Stale or conflict: 412, 409 already-exists, managed-by-gitops, deleting, conflict
4Not allowed: no token, 401, 403 (the message names the permission). The sign-in: the person did not sign in (no browser answer within --timeout, the issuer sent error=, more than 64 requests on the loopback port that were not the issuer's answer, the sign-in link opened twice), the token endpoint refused the code (invalid_grant, invalid_client…), the Platform API refused the access token the issuer gave, or the saved refresh token is no longer good
5Unreachable, 5xx, an answer that is not the API's or that this release of aapctl does not read whole (version skew), or a --wait that ran out. The sign-in: the issuer cannot be reached or answers 5xx, its discovery document names another issuer, lists PKCE methods without S256 or names an endpoint that is not on its own terms (https for an https issuer, a loopback address for a loopback http one), its token answer is not a Bearer token with a bounded expires_in or holds a token over 16 KiB, or the token has expired and the refresh failed for any reason but invalid_grant; a command that waited 2 s for another aapctl's lock on the file and did not get it (login, logout) is 5 too

A 401 also says that the token was refused or has expired and how to sign in again. Every error is one line, aapctl: <what>: <status> <problem type>: <detail>, and one indented line per field of errors or reasons.

Proof. bin/cli/tests/remote.rs runs the built binary against the real router (aap_platform_api::router) over the Memory ports on 127.0.0.1:0, with the child's HTTPS_PROXY, HTTP_PROXY and ALL_PROXY removed and NO_PROXY set (reqwest 0.12 sends a loopback request through the environment's proxy unless NO_PROXY names the host, which is why the client now never does for plain-http loopback: a_loopback_server_is_reached_even_when_the_proxy_the_environment_names_is_down): 29 tests, among them get_lists_and_reads, apply_creates_then_unchanged (the order of the writes, no PUT the second time), apply_replaces, apply_stale_if_match, apply_retry_on_status_only_change and apply_does_not_retry_when_the_object_changed (a store that runs a closure between the client's read and its write), apply_yaml_only_refused, apply_deployment_differs, apply_gitops_refused, create_race_already_exists, forbidden_named, secret_needs_pick, delete_if_match, delete_wait_*, export_apply_round_trip, dry_run_offline and no_token_anywhere (every command's stdout, stderr and --verbose output holds no 16-character window of the token; the file is 0600, a 0644 one is exit 2). After the review of 2026-11-15 (a blind read of the diff and 59 hand mutations, 18 of which survived), bin/cli/tests/hardening.rs adds 31 tests with the same harness plus a scripted server (remote/stub.rs) for the answers the router never gives (a 503, a form with a member of a later release, a body with an escape sequence, a server that never answers), and config.rs has unit tests of the safe read and of the temporary file: if_match_changes_only_the_tag_the_write_carries, every_document_says_the_apis_namespace_or_none_and_a_service_agrees_with_its_config, the four version-skew tests (a_form_this_binary_does_not_read_whole_is_not_written_from among them, and a_coder_agent_reads_back_as_the_server_sent_it, which holds that no real answer is a false alarm), the_saved_token_goes_only_to_the_server_it_was_saved_for, a_plain_http_loopback_server_is_never_reached_through_a_proxy (a listener named by HTTP_PROXY counts its connections: none), the two metadata tests (an_export_is_read_back_unchanged_even_when_the_agent_holds_labels_and_annotations_the_api_does_not_write through the real router), the two terminal tests, a_refused_object_stops_the_apply_and_says_what_was_applied_before_it, a_dry_run_makes_no_request_at_all (the router counts its requests), the_retry_of_a_moving_object_is_bounded, the three delete --wait tests against the scripted server, and validate_and_render_never_touch_a_proxy_or_the_token. crates/platform-client has its own 16, client_calls_are_documented (which now reads the parameters of each operation and no count of calls) and the timeout test among them. Two rules a coder gets wrong most were broken on purpose: turning 409 already-exists into a replace fails create_race_already_exists, and removing the comparison of the deployment part (so that the file's is silently replaced by the server's defaults) fails apply_deployment_differs. Phase 1's 30 tests pass untouched. api-e2e.sh has a new step, 6b, that drives the deployed API with aapctl; it passed in CI (run 43706119020, job api-e2e 132788532913, at 970afa0, verified 2026-11-15 in the job's log); its first run (run 43700696421) failed at the login sub-step for a fault of the script, a pipeline that ran the check in a subshell, fixed in 77d8e72 (no container daemon and no kind exist where it was written). Also unverified: a real Keycloak, and the browser sign-in, which is not built.

Decisions of K9 for the owner to confirm (P-028) &ZeroWidthSpace;

(1) A binary of this repository, aapctl, and not a subcommand of operator (an image that runs a controller should not carry a tool for people). (2) It ships in no image and no chart in this slice: CI builds it with the workspace and nothing publishes it. (3) The settings are flags alone and the environment is not read, so a render does not depend on the shell it runs in. (4) A field the CRD's types lack is an issue and not a warning, because an API server that prunes drops it without a word, and a typo (wokers) is then an agent that quietly runs with the default. (5) render takes a placeholder owner uid (--owner-uid overrides it): the owner reference of an object that is not applied cannot name a real service, and an empty one is refused. (6) A directory skips the documents of other groups with one note per file (a kustomization.yaml beside the agents is common), while a file named with -f or standard input holds exactly what the person pointed at, so a foreign document there is exit 2 and says what it was; a document of our group with another version or kind is exit 2 everywhere. (7) One line shape, <file>: <Kind>/<name>: <field>: <message>, with the namespace in the object only when the documents hold several; serde gives a type error no path, so that line has none. A null is absent and a key given twice is exit 2, as an API server reads them (README, What is read).

The browser sign-in and the refresh token (K9b-2, built 2026-11-15, reviewed twice) &ZeroWidthSpace;

aapctl login --server <url> --issuer <url> (flags: --client-id default aapctl, --scope repeatable default openid, --no-browser, --timeout default 300 s and 1 to 3600) is OAuth 2.0 authorization code with PKCE for a public client on a loopback redirect (RFC 8252 §7.3 and §8.3, RFC 7636, RFC 6749). The protocol is aap_platform_client::oidc (concrete code over the client's HTTP rules, no OIDC crate, no new package in the lockfile); the loopback listener, the browser, the refresh and the lock are bin/cli/src/signin.rs and bin/cli/src/config.rs.

What it does, step by step. Discovery is GET {issuer}/.well-known/openid-configuration with the client's rules (no redirect followed, 10 s to connect and 30 s a request, 1 MiB at most, https unless the host is a loopback address, and never a proxy for a plain-http loopback host); an --issuer with a query or a fragment is exit 2; the document's issuer must equal the flag exactly (OpenID Connect Discovery 1.0 §4.3: a parent, a child and a trailing slash are other issuers, and the message says when the slash is all that differs), it must have authorization_endpoint and token_endpoint, and each endpoint follows the issuer's scheme: an https issuer's endpoints are https (never http, loopback or not), a loopback http issuer's are on a loopback host, none has a user name or a fragment. A code_challenge_methods_supported that does not list S256 is refused; one that is absent is a note on standard error (the issuer does not say it supports PKCE; the sign-in goes on, protected only if it does). A revocation_endpoint that fails the same rules is not used, and logout says so. PKCE: the verifier is 32 bytes of operating-system randomness, base64url without padding (43 characters, RFC 7636 §4.1); the challenge is base64url of its SHA-256 with method S256 (§4.2), checked against the RFC's own vector in a test; the state is 32 random bytes, compared whole and in constant time (subtle). The listener binds 127.0.0.1 on a free port before the URL is built (never localhost, never a wider address: a test reads the kernel's table of listeners and requires 0100007F) and answers GET /callback whose state it knows, and, when a browser is opened, GET /start/<ticket>. Every other request is a 400 and the wait goes on. What counts toward the bound of 64: a request whose head was read (at most 8 KiB, no body, within two seconds), whatever it asked; the 65th ends the sign-in with exit 4 and is not answered. A connection that sends nothing is closed after two seconds and counts for nothing; at most 64 are served at once and the next waits for a free place (it may be the person's own callback), the wait ending with the sign-in; an accept that fails is waited out with a pause of 50 ms doubling to 1 s. The listener is stopped, and its port closed, before the code is exchanged. The callback is refused (400, the wait goes on) when state, code, error or iss is given twice, when iss is there and is not the discovered issuer (RFC 9207 §2.4 "Validating the Issuer Identifier": simple string comparison, verified 2026-11-15 at https://www.rfc-editor.org/rfc/rfc9207.txt), when the issuer said authorization_response_iss_parameter_supported: true and iss is missing, and when the code holds a space (a + the provider did not encode: a note on standard error says so; the code is never printed). An error with the right state ends the wait (exit 4); an error wins over a code. The page is text/plain; charset=utf-8 with Cache-Control: no-store, Referrer-Policy: no-referrer and X-Content-Type-Options: nosniff, built from fixed words and the issuer's error code cut to the characters RFC 6749 §5.2 allows and 64 of them; it never holds the code, the state or a token.

Only the person's own processes are served (Linux), and the browser is given a ticket. An argument of a process is readable by every user of the machine (ps, /proc/<pid>/cmdline), and the authorization URL holds the state and the challenge, so the opener (xdg-open, open or rundll32 url.dll,FileProtocolHandler, never through a shell) is given http://127.0.0.1:<port>/start/<ticket>, 32 random bytes in base64url, and the listener answers a request for it (the ticket compared in constant time) with 302 to the authorization URL, Cache-Control: no-store and Referrer-Policy: no-referrer. The ticket alone protects only by timing. Another local user who reads the link from the process list can request it first (the 302 gives them the state and the challenge), sign in at the issuer in their own browser (an SSO session answers at once), and have the issuer's redirect reach the person's listener with the right state before the person's browser has started; the code would be exchanged with the person's own verifier (the challenge is the same, so PKCE does not stop it) and the person would be signed in as the other, their next apply running under another account. So on Linux the listener checks who owns the client socket of every connection it accepts and serves only the effective uid of aapctl. A loopback TCP connection has no SO_PEERCRED, so bin/cli/src/peer.rs reads /proc/net/tcp (the listener is IPv4 127.0.0.1 only): the client's row is the one whose local_address is the peer's address and port and whose rem_address is the listener's, and its uid column is compared with geteuid(). The parser is a pure function over the file's text (a hex little-endian address and a hex port; a row that does not parse, or an IPv4-mapped one with a longer address, matches nothing). Another uid gets a 403 ("this sign-in belongs to another user of this machine"), on every route, and the connection counts for nothing: not toward the bound of 64, and it does not use the ticket; one note on standard error says "a connection from another user of this machine was refused", at most once per sign-in. A row that is not found is looked for once more after 20 ms and then refused the same way (fail closed). Decided once, at the start: if /proc/net/tcp cannot be read (not Linux, a restricted /proc) the check is off for the whole sign-in, and login says so when a browser is opened ("this system does not let aapctl check who connects to the sign-in listener: on a machine shared with other users, use --no-browser"). AAPCTL_PEER_CHECK=off in the environment forces the check off, for the tests; it is read in every build and behaves exactly like a system that cannot check, notes included, so it weakens nothing silently. With the check on, every connection that reaches the ticket is the person's own (a prefetch, a second click) and a second request for it is answered with the same 302 and ends nothing. With the check off, the ticket is the only protection and it only wins a race against the person's own browser: a second request for it ends the sign-in at once (exit 4, "the sign-in link was opened twice: something else on this machine used it; sign in again, or use --no-browser"), and the link is not printed when a browser is opened (clicking a printed link after the opener used it would be the second use; the person is told "Opening the browser. If no browser opens, run again with --no-browser"). A wrong ticket is a 404 and counts toward the bound. With --no-browser there is no /start route, nothing is opened, and the authorization URL is printed on standard error, the person's own terminal; it is the safe way on a machine shared with other users where the check is off. What is left, plainly: a process that runs as the person is not defended against (it can read the token file anyway), and a web page in the person's browser can reach 127.0.0.1:<port> too, which is the person's own uid: it can make requests (a cross-origin GET is allowed to be sent, though its answer is not readable) and use up the bound, or use the ticket where the check is off if it learns it (it cannot: the ticket is never in a page): a denial, nothing more. The Keycloak client should still require PKCE S256 (P-030): it protects the code if it leaks on its way to the listener, but it does not stop the injection of a code bound to a leaked challenge: the injector's code is bound to the challenge they read, which is the person's own. The uid check, and --no-browser where it is off, are what stop that. Verified 2026-11-15 on the kernel of this session (Linux 6.18, a container): /proc/net/tcp lists the client's row with the owner's uid (the new tests make a connection as uid 65534 and the listener refuses it); other kernels, containers with user namespaces (the table is per network namespace and shows the uid in the reader's namespace), macOS and Windows are unverified.

The token request is POST of grant_type=authorization_code, code, redirect_uri, client_id and code_verifier, from a public client with no secret; the access token must be a token that can be sent in a header and at most 16 KiB (the authenticator's own limit, crates/auth-oidc/src/config.rs, enforced wherever a token enters: Token::new, so AAPCTL_TOKEN and --token-stdin too), a refresh token at most 16 KiB, token_type must be Bearer (any case) and expires_in, if present, a whole number between 1 and a year. An OAuth error with status 400 or 401 is a refusal (invalid_client is a Refused, not a server error), and its code is cut to the characters RFC 6749 §5.2 allows. The ID token is not read and no nonce is sent: the Platform API is the one that decides whether the access token is good. Then, as --token-stdin does, GET /v1/me decides: a token the API refuses is not kept, and the message points at the audience (P-030). Who it is: GET /v1/me answers permissions only (the Me schema has no subject), so login and whoami print the token's sub claim, read and not checked (the API has just accepted the token), cleaned and cut at 128 characters: Signed in to <server> as <subject>; permissions: …. A swap of accounts is then visible.

What is saved (the same 0600 file, written the same way): server, issuer, clientId, scopes (at most 32), accessToken, expiresAt (from expires_in when the issuer says it, else from the token's own exp), refreshToken when the issuer gave one, and tokenSource (signed-in or pasted). What save accepts, load reads: the file is at most 64 KiB and save refuses to write more (so a refresh cannot make a file the next command refuses, which was a lockout until the file was deleted by hand); a file that is ours (the owner, the mode, the link and the type are checked) but too large, not YAML or a mapping with keys that are not aapctl's (Config refuses unknown fields: a kubeconfig, a private key that parses, someone's notes) is unusable, and is never deleted and never overwritten without --force: every command exits 2 and says what it looks like in one clause (never its content), login and logout say that --force moves it aside, and with --force they rename it to <config>.unusable-<unix seconds> (same directory, same mode, refused if that name exists) and go on; nothing is ever unlinked (logout used to delete such a file, and login wrote over any YAML mapping). logout reads the file again after it has the lock and acts on what it reads then (a good configuration made meanwhile is signed out and revoked, not moved aside). A file that fails the owner, mode, link or type checks is refused by all, --force included. The refresh token is bound to its issuer: it is sent to the token_endpoint discovered from the saved issuer (discovery is fetched again on every refresh, so the issuer decides where the refresh token goes, and nothing a stale copy remembers) and as the saved clientId, and after the check that the saved token is for the server. login --token-stdin forgets the refresh token of an earlier sign-in: it belonged to another token.

The lock. Every write that reads first is under an advisory flock on <config>.lock (mode 0600, never removed, opened without following a link and checked on the descriptor), waited for 2 s (an async sleep where the code is on the runtime): a refresh, logout and both logins. The refresh holds the lock while the issuer is asked, on purpose: a rotating refresh token must be spent once, so a second process waits and then uses what the first saved. The cost: while one command refreshes against a slow issuer, login and logout in another terminal stop after 2 s with exit 5 and "try again", and change nothing. Refresh. Before a command that uses the file's token, if expiresAt is within 30 s (or past) and a refresh token is held, the lock is taken, the file is read again under it, and then: another aapctl that refreshed meanwhile has its token used and no second grant is spent on a rotating refresh token; one that logged out means exit 4; otherwise grant_type=refresh_token is used once and the answer saved. A rotated refresh token replaces the old one, and an answer without one keeps the old. invalid_grant forgets the refresh token and the spent access token and is exit 4 (sign in again). Any other failure (the issuer or its token endpoint cannot be reached or answers wrongly, the token is over the cap, the lock is not released in 2 s) leaves the file byte for byte, and a command whose saved token has not expired goes on with it and prints a note (the 401 path then does what it does, once); one whose token has expired is exit 5. One refresh attempt per command, whatever its outcome: a refresh that timed out may have been processed (the issuer may have rotated the token), so a 401 after a failed attempt is the answer and the old refresh token is not spent a second time. A 401 from the API on a file token whose refresh has not been attempted in this command is answered with one refresh and one retry of that request; a 403 is never answered with a refresh, and a request that wrote is never repeated: a 401 is the API refusing to know who is asking, in the layer that wraps every route and before any handler, so the request that got one changed nothing. AAPCTL_TOKEN is never refreshed and never written to the file, whatever flags are given. On a platform with no flock (not Unix) nothing is locked and save_if_unchanged alone keeps a newer token from being destroyed (the check and the rename are two steps: the loss is one sign-in).

Tokens that are dropped are revoked, best effort. After a successful exchange, if the API refuses the access token or the file cannot be written, the refresh token that came with it is revoked once (5 s to connect, 10 s in all) and a failure is a note. A second login, or login --token-stdin, does not revoke the earlier refresh token (changed by the round two of the review of PR 51): RFC 7009 §2.1 lets a server invalidate every token of the same grant, and a second sign-in in a browser that still has its session at the issuer may share that session, so revoking the old token could end the new one (unverified against Keycloak: not guessed, the risk is removed). A replaced refresh token lives until it expires or the session ends; revocation stays on logout and for a fresh token the API refused. logout takes the lock, forgets both tokens (the server, issuer and client stay; a file that holds only a refresh token is signed out too) and releases it, then tries one revocation of the refresh token (RFC 7009 §2.1, verified 2026-11-15): a failure is a note on standard error and exit 0; a revocation_endpoint that cannot be used is the note "not revoked: the issuer's revocation endpoint cannot be used". The access token is not revoked: it stays valid until it expires. A K9b-1 binary that reads this file drops refreshToken on logout along with the other tokens (it does not know the field) without revoking it: use the binary that wrote the file. whoami says who the token is, how it was obtained (AAPCTL_TOKEN, signed in, pasted) and whether a refresh token is held, never any part of one.

Nothing secret is printed: not the code, the verifier, the access token or the refresh token, in any stdout, stderr, --verbose line or error; the state is in the authorization URL printed under --no-browser and in no argument, and the ticket is the one thing in an argument (it keeps the authorization URL, and so the state, out of the process list; it is not on standard output or in any error, and on standard error only as the link line, where that is printed). --verbose prints the issuer's host and the status of each request, never a path, a query or a body. A refresh token is a Secret whose Debug shows nothing, no error of oidc holds a URL, a header, a code or the text of the transport's error, and a BadAnswer never quotes the body it was given.

Proof. bin/cli/tests/signin.rs: 68 tests of the built binary against the real router over the Memory ports, with the testkit's TestIdp as the issuer (/authorize, /token, /revoke) and the test as the browser (it reads the link from standard error, asks the listener for it, follows the issuer's redirect without a browser, asks the listener for the callback; a fake xdg-open first on PATH records its argument): login_pkce (the URL, the file's mode and content, whoami); the ticket (the_browser_is_given_a_ticket_link_and_never_the_authorization_url, where_the_uid_check_is_off_a_second_use_of_the_ticket_ends_the_sign_in_with_exit_4, with_the_uid_check_on_a_second_use_of_the_ticket_is_the_same_302_and_the_sign_in_goes_on, a_wrong_ticket_is_a_404_that_counts_toward_the_bound, with_no_browser_nothing_is_opened_and_there_is_no_start_route); another user of the machine (another_user_can_neither_use_the_link_nor_inject_a_callback, the reviewer's attack with a real code of the attacker's own sign-in, and what_another_user_sends_counts_for_nothing_and_every_route_is_refused: 74 foreign requests, then the person's own sign-in completes; both connect as uid 65534 with setpriv and curl, need root, and print skipped otherwise; the parser of peer.rs has six unit tests on real-looking tables); who it is; sizes (a refresh that answers with a token too large to keep, a 17 KB token on stdin and in AAPCTL_TOKEN, a file that is not aapctl's never deleted or overwritten without --force and moved aside with it: a_file_that_is_not_aapctls_is_never_deleted_or_overwritten_and_force_moves_it_aside, login_does_not_overwrite_a_file_that_is_not_its_own_without_force, a_config_made_good_between_the_first_read_and_the_lock_is_signed_out_and_not_moved_aside); the PKCE note and iss; endpoints that do not follow the issuer, a redirect that is never followed (a second listener counts 0 connections), an issuer with a query, a fragment or a trailing slash, the flag over the file's issuer; revocation (unusable endpoint, a file with only a refresh token, a dropped token, and no revocation of a replaced or a pasted-over one); the refresh in every case above (a soft failure, an expired token, a token endpoint that is down or answers 503, invalid_grant for a good token, one refresh per command, whatever its outcome (one_refresh_attempt_per_command_whatever_its_outcome: a token endpoint that answers 503, then a 401, one request at the issuer), AAPCTL_TOKEN with no --server, the saved client id, a 403); the lock (two processes and one grant, a logout against a refresh that the issuer holds, which gives up after 2 s with the file untouched until the refresh finishes, a lock held for more than 2 s, the file's mode and a link in its place); the listener (the state whole, every parameter twice, an error over a code, a +, a silent connection closed in about 2 s, 70 connections that sent nothing, and 64 held connections that must not make the 65th, the person's callback, be dropped). Unit tests: signin.rs (the verdicts, iss, the ticket, the backoff, the listener gone when stop returns, expiry_of), config.rs (what save accepts load reads, the replaceable file, the lock), oidc.rs (the discovery rules over a local server, the scheme rule, the token answer). 20 of the 28 new black-box tests failed on 54199b1 (the first review's head) and pass now; the other eight pin behaviour the first review's mutations showed was untested. The issuer's endpoints have 13 tests of their own (crates/auth-oidc/tests/login_endpoints.rs). Run as uid 65534 (setpriv --reuid=65534 --regid=65534 --clear-groups, the test binaries copied to a 755 directory) the suites of the binary pass too, a normal sign-in with the uid check on among them (it proves the check does not refuse the person's own connections), and the tests that need root to be another user print skipped. Unverified: a real Keycloak (that it matches any loopback port against http://127.0.0.1/*, that its access token carries the API's audience and its composite roles, that it gives a refresh token for offline_access, that the client can be made to require PKCE), a real browser, and the opener on each OS (the tests use a fake xdg-open on Linux; open and rundll32 were never run).

Decisions of K9b-1 for the owner to confirm (P-030 to P-035) &ZeroWidthSpace;

(1) The token is in AAPCTL_TOKEN or in a 0600 file, never in an argument (P-031). There is no keyring (none is in the lockfile) and no --token flag. This differs from AD-044's "OS keychain" for the desktop app; alternative: a keyring crate when one without native libraries is found. (2) AAPCTL_TOKEN is read by the network commands only, which is not decision (3) of K9: that decision keeps a render independent of the shell, and a credential belongs in the environment or on stdin and nowhere else. (3) Headless sign-in is --token-stdin or AAPCTL_TOKEN and no device flow (P-032); login --token-stdin asks the server (GET /v1/me) before it keeps the token, and a token the server refuses is not stored (exit 4). (4) Only agents are exported (P-033), because the API has no YAML route for models and tool servers; alternative: to_resource on the client. (5) apply means this (P-034): read first, write nothing when unchanged, refuse a deployment part that differs (a create writes the server's defaults and a replace never moves the part), retry a 412 only when the form and the deployment are what was read, --if-match for the strict behaviour. A label or an annotation the API would drop is refused, every annotation and every label but the dashboard's (exit 2); amended 2026-11-15: the platform's own prefix no longer passes, and export leaves out exactly what apply refuses (it says so on stderr, by key), so that an export is read back unchanged. A namespace that is not the API's is exit 2, and a form of another release is exit 5. (6) The exit codes 3, 4 and 5 (P-035); the plan left two cases open and this slice chose: a 404 and every other 4xx the API answers (400, 413, 415, 428) are exit 1, "the API refused the request". (7) http:// is accepted for a loopback address only, unless --insecure-http: a token must not cross a network in the clear. This is not in the plan; alternative: accept any http. A plain-http loopback server is never reached through a proxy (added by the review of 2026-11-15; the environment's HTTP_PROXY would be handed the bearer token in the clear for a server on the same machine; alternative: honour NO_PROXY only, which a machine that sets none gets wrong). (8) A file is judged whole before the first request, and apply stops at the first object the API refuses, so what came before it stays written (the output says which); alternative: all or nothing, which the API cannot give across objects. (9) The Keycloak client of the browser sign-in is recorded (P-030); the sign-in itself is K9b-2, below. (10) No transport trait and no credential-store trait: the Platform API is the platform's own contract and its conformance is the OpenAPI document (a test holds the client's table of calls to it), and there is one implementation of a token store; the seam appears when a second does. Added by the review of 2026-11-15, for the owner to confirm: (11) the saved token is bound to its server and --server naming another is exit 2 (P-031; alternative: send it anyway, which hands a credential to a server the person typed by mistake); (12) a server whose form this release does not read whole is exit 5 before any write of that object (P-034; alternative: write from the form and let the API's own validation catch what it can, which resets a member it does not know); (13) the file is read through its descriptor and not followed through a link (P-031; alternative: follow a link, which a dotfiles repository wants and an attacker with write access to the directory also wants); (14) -o json is the answer re-written with escapes, not the server's bytes (P-035; alternative: the bytes, which can carry an escape sequence to a terminal); (15) --if-match still reads the object (P-034; alternative: a blind write with a tag, which skipped the deployment comparison); (16) a 401 keeps exit 4 and says to sign in again (P-035). Not decided and not built: the mode of the directories above the file is not checked; an export of an agent that carries labels the API does not write prints less than the API serves (it says which).

Decisions of K9b-2 for the owner to confirm (P-030 to P-032 built, P-036) &ZeroWidthSpace;

(1) The sign-in is the authorization code with PKCE on a loopback redirect, for a public client (P-030). The realm needs a client aapctl, public, standard flow only, PKCE S256 required (it protects the code if it leaks; it does not stop the injection of a code bound to a leaked challenge, which the listener's uid check does: see above), the redirect http://127.0.0.1/*, and an audience mapper that puts the Platform API's audience in its access tokens (or the API's audiences gains aapctl); that Keycloak matches any loopback port is unverified (RFC 8252 §7.3 says an authorization server MUST allow any port, verified 2026-11-15). Alternative: a redirect on the desktop app's client. (2) The tokens are in the 0600 file (P-031): the refresh token beside the access token, bound to its issuer; no keyring. (3) No device flow (P-032): a machine with no browser uses --token-stdin or AAPCTL_TOKEN, and has no refresh. (4) offline_access is not asked unless the person passes --scope offline_access (P-036): a refresh token that outlives the session is a larger credential, and the person should choose it; the cost is that a default sign-in lasts as long as the access token unless the issuer gives a refresh token for openid alone (whether Keycloak does is unverified). Alternative: ask for it always. (5) The ID token is not read and no nonce is sent (P-036). Alternative: ask for it and check nonce, which is a second check of what the Platform API already checks. (6) A 401 triggers one refresh and one retry (P-036), never a second refresh in the same command (one before the call counts), never for a request that already wrote (a 401 writes nothing) and never for a 403. (7) logout revokes the refresh token once when the issuer lists a usable revocation_endpoint (P-036); a failure is a note and exit 0; a token that a sign-in drops is revoked the same way, best effort, and one that a new sign-in replaces is not (round two of the review of PR 51); the access token is never revoked. (8) The listener stops after 64 requests that were read and were not the answer (exit 4), reads no body and at most 8 KiB of a head, serves 64 connections at once; alternative: no bound, which lets a local process hold the sign-in for ever. (9) The browser is opened with rundll32 url.dll,FileProtocolHandler on Windows, not cmd /c start: a shell would run what follows an &. (10) A discovery document for another issuer is exit 5, not 2, with a hint when a trailing slash is all that differs. (11) Every write that reads first is under an advisory lock, waited for 2 s; a refresh that cannot get it leaves the file and goes on with a token that has not expired; login and logout that cannot get it fail with exit 5, because going on "without the write" would print "signed out" over a token that is still there (the review's list said to go on without the write; this is the one place it was read the other way: alternative: print a note and exit 0). (12) --client-id, --scope and --issuer default to the file's, and --issuer wins over it. (13) The testkit's issuer for a pod mounts no sign-in route at all (TestIdp::try_start_without_login, used by examples/test-issuer.rs and so api-e2e.sh): /authorize, /token and /revoke are 404 and discovery names none, which also means the lists the sign-in endpoints keep (grants, seen_verifiers, revoked) cannot grow from what a pod asks; the unit tests keep the endpoints, which TestIdp::start still mounts (an_issuer_started_without_login_mounts_no_sign_in_route_and_names_none). (14) The browser is given a ticket link and not the authorization URL (second review), and on Linux the listener serves only the person's own uid (round two): the ticket alone protects only by timing, so the listener reads /proc/net/tcp for the owner of every client socket and refuses another uid with a 403 that counts for nothing; where it cannot, the ticket is single use and --no-browser is the safe way. Alternative: a file the opener reads, which the opener of each OS does not do; a Unix socket, which a browser cannot reach. (15) GET /v1/me has no subject, so login and whoami print the token's own sub (unchecked, cleaned) (second review). Alternative: add subject to the Me schema, which is a change of the API's contract and its OpenAPI document for what the token already says. (16) A file that is ours and unusable is never deleted or overwritten without --force, and --force renames it to <file>.unusable-<unix seconds> (round two: the second review made it replaceable, which let logout --config ~/.ssh/id_ed25519 delete a key and login overwrite a kubeconfig); alternative: refuse and leave the person to move it, which is what every other command does. (17) The lock is held while the issuer is asked (a rotating token is spent once), at the cost of a 2 s wait that login and logout give up on with exit 5. (18) One refresh attempt per command, whatever its outcome. (19) AAPCTL_PEER_CHECK=off exists, in every build, for the tests; it prints the note a system that cannot check prints. Alternative: a hidden flag in debug builds only, which would leave the off mode untestable in cargo test --release. Not decided and not built: a Keycloak realm export for the client (deploy/keycloak/ holds none for aapctl), a keyring, a device flow, an IPv6 loopback listener (RFC 8252 recommends trying both; IPv4 is what the redirect names), a lock on a platform with no flock.


61. Draft → Revision → Promotion UX &ZeroWidthSpace;

Recommended workflow:

The UI can display:

text
Coder

Production      r47
Staging         r51
Latest          r53

Revision    Status      Created
r53         Ready       5m ago
r52         Ready       1d ago
r51         Staging     2d ago
r47         Production  8d ago

Editing production in-place is impossible because revisions are immutable.

Note (2026-10-05): out of the dashboard's v0 (§60a): the operator has no revisions yet (AD-023). The dashboard offers the config digest, View YAML and Export YAML instead (owner question in §93, Dashboard v0).


62. API / CRD Versioning &ZeroWidthSpace;

Initial resources should use:

text
agents.vymalo.com/v1alpha1

Evolution path:

text
v1alpha1
   ↓
v1beta1
   ↓
v1

Resources should follow Kubernetes conventions:

text
spec
status
conditions
observedGeneration

Where conversion becomes necessary, conversion webhooks can support multiple served versions.


63. Provider Interfaces &ZeroWidthSpace;

The architecture should prefer a small number of meaningful provider boundaries.

Per AD-020, each is a Rust trait with a conformance testkit, implemented by separate crates and selected at build time (Cargo features + configuration, or a developer's own composition root). Nothing outside the trait's crate may depend on an implementation's types.

Possible interfaces:

text
RuntimeProvider
WorkflowProvider
RouteProvider
IdentityProvider
SecretProvider
ArtifactProvider
AdmissionProvider

Each provider can advertise capabilities.

Example:

text
scale-to-zero
persistent-volumes
volume-snapshot
shared-rwx-storage
gpu
runtime-class
direct-exec
multi-container
spiffe

An AgentEnvironment may require capabilities.

If the selected provider does not support them, validation should fail clearly.


87. Suggested CRD Status Pattern &ZeroWidthSpace;

Example:

yaml
status:
  observedGeneration: 12

  conditions:
    - type: Ready
      status: "True"
      reason: Reconciled

    - type: RuntimeAvailable
      status: "False"
      reason: ScaledToZero

  currentRevision:
    name: coder-r53

  productionRevision:
    name: coder-r47

Conditions should describe state rather than burying errors in arbitrary text fields.


88. Possible AgentService State &ZeroWidthSpace;

Logical service state may include:

text
Ready
Degraded
Suspended
Blocked

This is distinct from runtime state.

An agent can be:

text
AgentService: Ready
Runtime: Suspended

because scale-to-zero is healthy.


89. Possible AgentRun State Machine &ZeroWidthSpace;

Application-specific workflow state remains in Restate.


90. Naming &ZeroWidthSpace;

Suggested API group:

text
agents.vymalo.com

Potential resource names:

text
AgentService
AgentConfig
AgentRevision
AgentEnvironment
ToolUniverse
ToolProvider
SecurityProfile
AgentRun
AgentLease
AgentRoute

Resource naming should avoid tying the project to a specific underlying agent framework.


← Index · ← Previous · Next →