Files
Open_Ultra_SAST/docs/plane.md
T
Marius Ciepluch 3a34929c55 docs(plane-on-kubernetes): the docs say the local kind cluster is stopped and its code stays
The maintainer decided on 2026-11-24: "The local kind cluster is stopped and the
code stays. Whether the executor code is deleted is decided at the plane
re-plan." d45fc98 recorded the decision in the spec's tasks. The documentation
went on calling the cluster the development default, or saying that it runs
today. This is step 3 of the handover: one documentation commit for that
decision, with the two records the same step names.

What changes, by file:

- README.md, tier 3: the cluster is stopped since 2026-11-24, the code stays,
  ops/ax/up.sh recreates the cluster, and the deletion of the executor code is
  decided at the plane re-plan. Tier 4 names the stop where it says that no
  other cluster has received a deployment.
- docs/plane.md: the same under "ax is the only executor"; the Deployment link
  and the profile list no longer say "today".
- docs/deployment.md: a dated paragraph at the top carries the record's own
  facts: the decision, the teardown with ops/ax/down.sh, ops/ax/up.sh, a cold
  bring-up that has not been timed, and that nothing on the product's main line
  used the cluster. The frame sentence, two headings, one table header and the
  sentences that said "today" or "runs" are dated or put in the past.
- .kiro/steering/overview.md, the Engine bullet of the dated section of
  2026-10-04; .kiro/steering/roadmap.md, the Destination list, the
  Infrastructure row and the plane-on-kubernetes row. Each keeps the earlier
  target and adds the dated fact, the form roadmap.md already uses for the
  decisions of 2026-11-24.
- ops/k8s/profiles/kind.toml: the leading comment only. No value changes.
- .kiro/specs/ir-consolidation/brief.md: a dated note. Question 2 is overtaken
  by the maintainer's decision on contributor-scan task 4.1: "C memory-safety
  beyond string-function misuse is out of scope. Record that, and say so per
  corpus slice." Question 1 is not affected.
- .kiro/specs/reachability-flow-model/design.md, Data Models: the run directory
  of a scan since 6edae3a, where the line named the location that ended then.

The roadmap's Position is refreshed (verified 2026-11-25). An open subtask is
an open checkbox whose first token is a task number without a trailing dot;
the group headers end with a dot. valid-detection-benchmark 2 (11.6, 11.7);
contributor-scan 18; plane-on-kubernetes 22; reachability-flow-model 16;
authorization-obligations 18; pre-push-safety-net 4 (8.3, 11.3, 13.2, 13.3);
hunter-learning-loop 1; detection-core 0 (11.4 closed under R0). The new
bullet says what the task boxes show for R1 to R5 and records the stop.

Beyond the handover's line numbers, in files it names: README tier 4 (one
clause), two sentences of docs/plane.md, and in docs/deployment.md the frame
sentence, two headings, one table header and three sentences that said "today"
or "runs". Also roadmap.md's Destination bullet (line 239 before this commit):
the same claim 21 lines above the row the handover names, in steering that
every run loads.

Left as they are and reported, on the maintainer's rule that a fault outside
the chosen tasks is reported and not fixed in passing: docs/ops/ax/README.md:3,
ops/ax/README.md:3 and :20, and docs/where-we-stand.md:184-185, which still say
that the plane runs in the cluster; README.md:270-271, ops/README.md:388 and
docs/index.md:56, "where the plane runs today"; roadmap.md:317, "proof on
kind"; search-with-proof/tasks.md:27; the requirements and design of
plane-on-kubernetes, where a change is a spec amendment; and README tier 4 and
docs/deployment.md naming k3s as production, where the roadmap's spec map says
that the production path was re-scoped to kube-ax.

Evidence:
- tests/test_docs_site.py (the strict site build), test_removed_plane_references.py,
  test_plane_literals.py, test_plane_profile.py and test_obligation_siblings.py:
  exit=0, 40 passed, on the committed tree.
- git diff --check: exit 0. The added lines are ASCII.
- The reviewer counted the open work by a method of its own and found the same
  numbers. It built the site strict into scratch, and measured the host: no
  kind cluster and no kube context.

Review: an independent reviewer approved the change in round 1 (no REQUIRED
finding, two SHOULD FIX) and again in round 2, after those were folded in.
After round 2 its round-2 wordings were applied as proposed: one sentence, one
clause and two table labels. No test pins these sentences. The cluster was not
recreated and ops/ax/up.sh was not run.
2026-11-25 19:19:46 +01:00

8.4 KiB

The plane on ax

Model-driven work over whole repositories runs on a separate agentic plane. The plane has these parts:

  • A Run (plane/runs/*.yaml, kind openultrasast.io/v1alpha1 Run) is a DAG (a graph of steps with no cycles).
  • Each step is an ax Task (plane/tasks/).
  • A Task binds its Workspaces (plane/workspaces/).
  • A Task binds at most one ax Model (plane/models/). deepseek-flash serves chat. openrouter-embedding serves embeddings.
  • A Task carries its own budget: {usd, calls}.

ax is the only executor. It is google/ax, Google's controller that runs agent tasks, over Agent Substrate (its sandboxed actor runtime). It runs in a single-node kind cluster (Kubernetes in Docker) on the maintainer's host. That cluster is stopped since 2026-11-24: the code stays, ops/ax/up.sh recreates the cluster, and whether the executor code is deleted is decided at the plane re-plan. There is no local subprocess path.

Where to read more:

  • Bring-up and the host's lessons are in ax on this host.
  • Deployment shows where each part ran before the cluster was stopped. The reconciler and the receiver run on the host. The tasks run in gVisor (a sandboxing kernel) on Agent Substrate. It also covers what a separate Kubernetes cluster would take (planned).
  • This page draws the flow.

Sources: src/openultrasast/plane/reconciler.py, router.py, egress.py, runner.py, generate.py, memory.py, and src/openultrasast/plane/tasks/.

One task, end to end

ousast plane run RUN.yaml (the reconciler) does this for every ready task. --workers bounds the tasks in flight. A rerun skips tasks already done.

sequenceDiagram
    autonumber
    participant R as Reconciler (ousast plane run)
    participant AX as ax control plane
    participant EG as Egress gateway (atenet-egress)
    participant RT as Substrate router (atenet-router)
    participant RN as Runner (actor in gVisor)
    participant RC as Artifact receiver (host)
    R->>R: render Model, Workspaces, Task to task.yaml, read the Model's key from env or .env
    R->>AX: ax apply -f task.yaml (creates the actor, egress denied)
    R->>EG: EgressPolicy for this actor only
    R->>AX: ax resume task (retried while the golden snapshot builds)
    loop until phase Running
        R->>AX: ax get task
    end
    R->>RT: POST /ousast/v1/start {run, task, credentials}
    RT->>RN: forwarded to this task's actor only
    RN->>RN: materialise Workspaces (git at pinned commits), after the start
    RN->>RC: GET /inputs/producer/artifact (through the gateway)
    RN->>RN: python -m openultrasast.plane.tasks.MODULE (key in its env only, metered budget)
    RN->>RC: POST tar of OUSAST_OUTPUT_DIR (through the gateway) = completion
    RN->>RN: write the completion marker
    R->>AX: ax delete task, then delete the EgressPolicy
    R->>R: summary.json into state.json, plane status writes attribution.json

What each step guarantees:

  • Credentials (router.py, runner.py).
    • The reconciler reads the variable that the Model's secretKey.key names.
    • It reads it from the operator's environment or .env. .env never overrides an exported variable.
    • The key exists only in the start request.
    • The runner keeps it in memory and passes it to the command's environment.
    • The runner redacts it from echoed stderr and never writes it.
  • Egress (egress.py). Egress means outbound network traffic.
    • Each actor gets one EgressPolicy. It denies by default and names hostnames only.
    • It allows plain HTTP to the artifact receiver.
    • It allows TLS passthrough to the source hosts of the bound Workspaces.
    • It allows TLS passthrough to the hosts the bound Model declares (openultrasast.io/egress-hosts).
    • The reconciler writes it between ax apply and the resume. It is deleted with the actor.
  • Inputs (reconciler.py).
    • Artifacts that other tasks produced are never rendered into the manifest.
    • The runner fetches them from the receiver after the start.
    • The receiver serves a running task its declared inputs only.
  • Completion (runner.py).
    • ax has no Completed phase. The runner's delivery of the output tar is the task's completion.
    • A completion marker stops a resumed actor from repeating billed work.
    • If the marker says the delivery failed, a later boot retries only the delivery.
  • Budgets (plane/budget.py).
    • The metered client refuses the next call once a task reaches its usd or calls ceiling.
    • The task then ends unfinished. It resumes on a rerun with a larger budget.
    • Model-free tasks run with {usd: 0, calls: 0}, so a stray call fails loudly.
  • Attribution.
    • ousast plane status RUN prints these per task: status, calls, prompt, cache_hit and output tokens, and usd. It reads them from the tasks' summary.json.
    • It writes attribution.json in the run directory ($OUSAST_RESULTS/plane/RUN/, default ~/ousast-results/plane/).

!!! note "The golden snapshot" Agent Substrate boots every new actor template once as a golden actor and snapshots it. That boot uses the same image, Task and environment. Inside the sandbox, nothing tells that boot from the real one.

So the runner's command never starts by itself. It waits for the start request. The reconciler sends
that request through `atenet-router` to the task's actor, never to the golden one.

Workspaces are prepared only after the start. So the golden boot touches no network. A started actor
already runs under its egress policy. A clone at boot once failed on the live cluster while the actor
was being restored (2026-09-29; `runner.py`, `_run_once`).

The first resume of a new image can time out while the snapshot is built. So the reconciler retries it
for up to `OUSAST_RESUME_TIMEOUT` seconds (900).

Validation Runs

ousast plane workspaces POPULATION --validation-set ... (generate.py) writes one chain per case. Every step is model-free except the verify passes (and roles in harvest Runs).

Per case

flowchart LR
    facts["facts: repo-facts"] --> va["va: verify pass a"]
    facts --> vb["vb: verify pass b"]
    va --> agree["agree: a vs b"]
    vb --> agree
    agree -- "disputed only" --> vc["vc: verify pass c"]
    va --> final["final: 2-of-3"]
    vb --> final
    vc --> final
    final --> features["features: one record per candidate"]
    features --> remember["remember: memory.jsonl"]
    final --> remember
  • Before the Run, ousast plane run seeds from the store (memory.seed).
    • Each task has an openultrasast.io/memory-key: repository, pin, candidates digest and runner image digest.
    • If the store has facts for that key, the task gets them and is marked done.
  • After the Run, it ingests every delivered memory.jsonl. ousast plane remember RUN repeats this by hand. See Memory.
  • ousast plane harvest writes the decision engine's harvest Runs (verify a/b with agree, and model roles).
  • ousast plane alerts-engine produces a Run's alerts from the Joern engine image on the host. It covers PHP and other languages that quick mode does not cover.

Where this runs in production

ax is a Kubernetes application over Agent Substrate. Every Task runs the one runner image as an actor. Each actor occupies a whole worker. This code base targets two profiles:

  • kind on a server VM. Its cluster on the maintainer's host is stopped since 2026-11-24; the code stays.
  • k3s in production (planned). There the same CLI submits Runs remotely, and the tasks deliver to the S3 store.

Production topology: ax on a Kubernetes cluster draws it and sizes the pre-push hook at scale.

Tasks

Task Model Does
repo-facts none functions per product file, and each candidate's call sites in other files
verify (passes a, b, c) deepseek-flash batched tool hunt per file over the candidates, with their known callers
agree none a and b agreed or disputed; after pass c on the disputed, 2-of-3 (the step final)
features none one feature record per candidate for the decision engine
remember none the case's artifacts as memory rows
alerts none the quick scan on the vulnerable and fixed pins
roles deepseek-flash per-repository source, sink and sanitizer roles without a vocabulary

Source: ax on this host.