> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hex65.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-test report

> What proving self-test `--json` prints: each check's result and its control.

Schema: `urn:hex65:schema:selftest:v1`. Every field below comes from the schema; the schema decides.

hex65.selftest/v1 (plan 9.7, F-CON-01 AC-4, WP-148): what the command line's `self-test` prints with `--json`, one JSON document: whether the product measured known truths correctly on this machine. Each check runs its real case and a control (a known-bad input sent through the same code, which must fail): a check passes only when its real case passed, its control failed, and it did at least the work it needs (`work`, never zero for a pass). `control` is `pass` when the control failed as it must, `fail` when it did not (the check could not have failed), `n/a` for a skipped check or one without a control (its detail says why). A skipped check names its reason from a closed list. `ok` is true exactly when no check failed. `root_removed` says whether the folder the self-test wrote everything in was removed; `root` is that folder, present only when the run was asked to keep it. Strings are short (a reader may refuse a report over 1 MiB). The report holds no secret, path of the user's (other than `root`), recording content or account data.

## Fields

| Field | Type | Required | Meaning |
| - | - | - | - |
| `format` | `"hex65.selftest/v1"` | yes | |
| `version` | string | yes | The command line's version. |
| `platform` | string | yes | `<operating system>-<architecture>`, as Node names them (for example `darwin-arm64`, `linux-x64`). |
| `tier` | one of `"binary"`, `"quick"`, `"full"` | yes | `binary`: the install check; `quick`: the default of `self-test`; `full`: `self-test` with `--full`, which adds what takes minutes. |
| `ok` | boolean | yes | |
| `checks` | list of see CheckResult | yes | The checks that ran or were skipped, in the order they ran; each id once. |
| `containment_level` | one of `"enforced_os"`, `"enforced_container"`, `"observed"`, `"none"` | yes | The containment the run reached on this machine (plan 3.6): an enforced driver, the operating system's or a container's; `observed` when none works and the run watches instead; `none` when no lap ran under containment. |
| `root_removed` | boolean | yes | |
| `root` | string | no | With `-`-keep\`\`: the folder the self-test left, for a person to look at. |
| `duration_ms` | integer | yes | |

## CheckResult

| Field | Type | Required | Meaning |
| - | - | - | - |
| `id` | string | yes | The check's id, `C-01` to `C-99`; ids are stable across versions (a retired id is never reused). |
| `title` | string | yes | |
| `status` | one of `"pass"`, `"fail"`, `"skip"` | yes | |
| `control` | one of `"pass"`, `"fail"`, `"n/a"` | yes | |
| `detail` | string | yes | What the check measured, or why it failed or was skipped, in words for a person. |
| `work` | integer | yes | How much the check did (laps, files, probes, vectors). |
| `skip` | see SkipReason | no | |
| `ms` | integer | yes | |

## SkipReason

Why a check did not run: `driver`, no enforced containment driver works here; `platform`, not on this operating system; `full_only`, in `-`-full\`\` only; `log_store`, the machine's log store did not deliver a denial in time (macOS); `source`, no embedded assets (running from source, development only). A failed check may name one too: it skipped where the run said it may not (`SELFTEST_NO_SKIP`), so it failed.

A value of type one of `"driver"`, `"platform"`, `"full_only"`, `"log_store"`, `"source"`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.