Architecture

How a Stageproof check actually executes.

Every check runs locally on your laptop or CI runner with no cluster credentials and no external backend. Below is the exact sequence stageproof check runs on a Helm chart, Argo CD Application, Flux HelmRelease, or rendered manifest pair.

Execution path

Files and a local API server first; a kind cluster only on request.

The steps of stageproof check and the result each branch ends in Inputs go through Render, Values proof, Image tags, the local API server, Impact and CRDs, and Policy. If a blocker remains, the result is BLOCKED, exit 1. Without --live the result is PASSED, exit 0, or NOT CHECKED, exit 2, with --require-rehearsal. With --live a kind cluster on this machine installs the current chart, upgrades, runs smoke commands, rolls back, and is deleted. A failed step is BLOCKED, exit 1. A rehearsal that could not start is NOT CHECKED, exit 2. Success is PROVEN, exit 0. --before / --after skip the Helm steps · --offline skips image tags · --api-server off uses the built-in table Inputs chart · Application HelmRelease · YAML Render helm template current and new Values proof template AST, then render proof Image tags HTTP HEAD on changed images API server apply current, dry-run new Impact & CRDs deletes · restarts CRD schema diff Policy .stageproof.yaml from the base ref Blocker remains? yes no BLOCKED exit 1 --live set? no yes PASSED exit 0 · NOT TESTED LIVE NOT CHECKED, exit 2, when --require-rehearsal is set kind cluster on this machine install current → upgrade → smoke → roll back → delete cluster PROVENexit 0 every step succeeded BLOCKEDexit 1 upgrade/smoke/rollback failed NOT CHECKEDexit 2 rehearsal could not start
Same flow as text
chart directories, Argo CD Application, Flux HelmRelease, or rendered manifests
        |
        v
helm template  (current and new at --current-k8s; optional --helm-compare; skipped for --before/--after)
        |
        v
values proof   (template AST + render proof for uncertain keys, renames, changed defaults)
        |
        v
image tags     (HTTP HEAD + platform check for changed images; skipped with --offline)
        |
        v
API server     (local kube-apiserver at --current-k8s: apply current, upgrade CRDs, dry-run new, check stored CRs)
        |
        v
impact & CRDs  (deletes, crds/ vs templates/, crdify schema diff, restarts, privilege, exposure, capacity, API table)
        |
        v
policy/ignores (.stageproof.yaml from base ref applied before exit code or --live)
        |
        +-- blocker remains -------------> BLOCKED          exit 1
        |
        +-- --live not set --------------> PASSED           exit 0
        |                                  checked: files, API server <patch>
        |                                  (NOT CHECKED, exit 2, if --require-rehearsal)
        |
        v
kind cluster on this machine
  install current -> upgrade to new -> smoke commands -> roll back -> delete cluster
        |
        +-- upgrade, smoke, or rollback failed --> BLOCKED  exit 1
        |                                  checked: files, API server <patch>, live cluster
        +-- rehearsal could not start ---> NOT CHECKED      exit 2
        +-- upgrade, smoke, rollback ok -> PROVEN           exit 0
                                           checked: files, API server <patch>, live cluster

stageproof check-pr runs that path once per changed chart. A file the pull request deleted is still a change when it sat inside a chart. The pull request result is the worst of those results: BLOCKED, then NOT CHECKED, then PASSED, then PROVEN. Rendered manifests skip the Helm steps. The API server, the impact check, and the API table still run. --live is not available for that mode.

Step by step

What is computed, and where the limits sit.

StepHowLimit
Render Stageproof calls helm template with your values and the Kubernetes version you named. A chart that does not render is BLOCKED for the new chart, and NOT CHECKED for the current chart.
Values It walks the Go templates. An exact path stays "proof": "templates". A key the reader cannot decide is rendered with the value, without it, and with another value of the same type when yours matches the default. A key with an effect in the current chart and none in the new chart is helm.values.silently_dropped with "proof": "render". The report does not print your values. A probe that values.schema.json rejects is not a finding. --values-proof full render-tests every key. The default mode does not.
Helm 4 --helm-compare renders with a second helm binary and compares the parsed objects. A Chart.yaml apiVersion of v3 is a warning. A post-renderer, a registry login, and a renamed Helm flag are not in the chart. A new Helm 4 install uses server-side apply. An upgrade of a Helm 3 release stays client-side unless --server-side-apply is set.
Image tags A new or changed image is asked of the registry named in that reference, with HTTP HEAD. A manifest list is read only to see whether linux/amd64 is present. Layers are not downloaded. An unchanged tag is not asked. A 401, a 403, a timeout, or a rate limit is not a block. --offline sends nothing and does not change --api-server.
Kubernetes APIs A local API server of the minor you named applies the current objects and dry-runs the new ones. Pre-existing invalid defaults on the current chart do not block upgrades that fix them, and identical pre-existing field rejections downgrade to a warning. Deprecations, label selectors, and the CRD size check still come from the built-in table. The server is not your cluster. The patch it ran is named in the report. --api-server off uses only the table. Webhook configurations are not sent.
Impact It compares the two sets of objects. A delete of a PersistentVolumeClaim, a Namespace, or a templated CRD is BLOCKED. A CRD schema break that an existing object uses is BLOCKED. A restart is named and does not block. When the API server did not run, the check says it compared the rendered objects. The comparison does not print values. A CRD under crds/ is judged as plain Helm, which does not upgrade that directory. An Argo CD check warns when skipCrds is false or absent, and uses the Helm rule when skipCrds is true. A Flux check reads spec.upgrade.crds. Omitted and Skip block an incompatible change. Create warns. CreateReplace is info. Rendered manifests have no chart crds/ directory.
Argo CD An Application is parsed. A remote chart is pulled. A Git path in this checkout is read at the revision being compared. valueFiles, values, valuesObject, parameters, and releaseName follow Argo CD's order. valuesObject replaces values. ${...} placeholders in a .yaml.tmpl are replaced with fixed samples so the file parses. Another Git repository is not cloned. An ApplicationSet is NOT CHECKED. A missing values file is NOT CHECKED unless ignoreMissingValueFiles is true.
Flux A HelmRelease is parsed. A Helm repository or an OCI chart is pulled. A GitRepository in this checkout is read at the revision being compared. valuesFrom and spec.values follow Flux order. A targetPath entry overwrites earlier values, including inline values. Another Git repository is not cloned. A missing valuesFrom object is a warning and the result stays PASSED. A missing chart valuesFiles entry is NOT CHECKED unless ignoreMissingValuesFiles is true. Secret values are not printed. An encrypted Secret is not decrypted.
Pull request git diff base...head lists changed files. Stageproof walks up to Chart.yaml, or recognizes an Application or a HelmRelease. One comment and one JSON report cover every chart. Kustomize and loose manifests are ignored. A deleted file inside a chart is still that chart. A deleted HelmRelease is NOT CHECKED.
Brief The terminal report and the Markdown comment list Deletes, CRDs, Privilege, Exposure, Values, Restarts, and Not checked before the check list. An empty section is left out. The lines are the finding messages and the reasons a check did not finish. It does not call a model. The result line still says 0 AI calls.
SARIF --format sarif prints one SARIF 2.1.0 log. A pull request check puts every chart in that log. --out stays the JSON report, and that JSON matches docs/report.schema.json. A blocker is error, a warning is warning, and info is note. The message is the finding message. The exit code is unchanged.
Ignores and policy .stageproof.yaml can ignore a rule until a date, or map a rule id or a prefix to block, warn, or info. check-pr reads that file from the base ref. An ignored finding stays in the report with the reason and the date. It does not make the result BLOCKED. An expired entry does not match. A change to the file in the pull request is config.changed_in_pr and does not change the check.
Cluster facts stageproof facts export reads the kubeconfig kubectl uses, or the file and context you pass. --cluster-facts with no file does that read during check and check-pr. A path is a facts file. The calls are get and list. The facts set the Kubernetes version when --current-k8s is absent, preload those custom resource definitions on the local API server, and pass stored versions and node architectures into the check. Values and Secret contents are not written. Helm release Secrets are read only with --helm-releases, and only the chart name, version, appVersion, release, and namespace are kept. The file is not read from git.
Explain stageproof explain prints the level, the meaning, and what to do for one rule id. The findings page is the same text. It does not run a check and it does not use the network. An unknown id exits 2.
Live rehearsal kind starts a cluster on the requested minor version when Docker Hub has a node image. Helm installs and upgrades, any smoke commands from the base .stageproof.yaml run, and Helm rolls back. Pods that crash stop the wait early. kind starts a real node container. An unprivileged CI job cannot do that, and the check stays on the files. The cluster is empty. A private image, a missing Secret, or a missing CRD stops the rehearsal. That is PASSED with a reason, or NOT CHECKED when --require-rehearsal is set. It is not BLOCKED.