# ocx_sdk

*module*

Python SDK for [OCX](https://github.com/ocx-sh/ocx).

`ocx-sdk` drives the ocx binary rather than reimplementing it: ocx owns
resolution, verification, and the identifier grammar, and this package gives
you typed, CWD-independent handles over the commands it exposes.

```python
from ocx_sdk import Ocx, bootstrap

ocx = Ocx(exe=bootstrap.ensure())
project = ocx.project("/srv/build")
project.pull()
project.exec(["task", "verify"])
```

**This module is the API.** Everything listed in `__all__` is the stable
surface; every other module is underscored and package-private, and the one
public submodule is `ocx_sdk.bootstrap`. Reaching into an underscored path
means the next release may move it without notice — pre-1.0, breaking
changes ship without shims.

Start at `Ocx` for the runtime API and `bootstrap.ensure` for provisioning.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/__init__.py#L1-L1)

## ocx_sdk.CascadeReport

*class* · *dataclass*

```python
class CascadeReport
```

Re-exported from: `ocx_sdk._results`

One package's rolling-tag audit — the `check` document, and the `report` inside a `repair` entry.

First-cut depth: the rows, the index findings and the tag lists are
typed; `aliases` and `unrepairable` are carried as opaque mappings
(`Integration.payload`'s precedent) until a consumer needs their fields.

**Attributes**

- `identifier` (`str`) — The physical repository the graph was read from.
- `logical` (`str | None`) — The logical name the caller gave, when it differed.
- `aliases` (`Mapping[str, Mapping[str, Any]]`) — Rolling tag to its alias state (`{"state": "present"}`, `{"state": "absent"}`, or `{"state": "not-an-index", "digest": ...}`), untyped.
- `rows` (`tuple[SlotRow, ...]`) — One slot per (rolling tag, platform).
- `index_findings` (`tuple[IndexFinding, ...]`) — Public-index disagreements; empty off `ocx.sh`.
- `ignored_tags` (`tuple[str, ...]`) — Tags the audit skipped — the keep tags among them.
- `unrepairable` (`tuple[Mapping[str, Any], ...]`) — Findings `repair` refuses to fix, each `{tag, reason, digest?}`, untyped.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2608-L2659)

### ocx_sdk.CascadeReport.aliases

*attribute* · *instance attribute*

```python
aliases: Mapping[str, Mapping[str, Any]]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2631-L2631)

### ocx_sdk.CascadeReport.identifier

*attribute* · *instance attribute*

```python
identifier: str
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2629-L2629)

### ocx_sdk.CascadeReport.ignored_tags

*attribute* · *instance attribute*

```python
ignored_tags: tuple[str, ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2634-L2634)

### ocx_sdk.CascadeReport.index_findings

*attribute* · *instance attribute*

```python
index_findings: tuple[IndexFinding, ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2633-L2633)

### ocx_sdk.CascadeReport.logical

*attribute* · *instance attribute*

```python
logical: str | None
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2630-L2630)

### ocx_sdk.CascadeReport.rows

*attribute* · *instance attribute*

```python
rows: tuple[SlotRow, ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2632-L2632)

### ocx_sdk.CascadeReport.unrepairable

*attribute* · *instance attribute*

```python
unrepairable: tuple[Mapping[str, Any], ...]
```

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2635-L2635)

### ocx_sdk.CascadeReport.clean

*property*

```python
clean: bool
```

Whether nothing disagrees: every row `ok`, no index finding, nothing unrepairable.

[View source](https://github.com/ocx-sh/ocx-sdk-python/blob/main/src/ocx_sdk/_results.py#L2643-L2645)
