> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.harness_capabilities.reader

Streaming native Gym reader with explicit, loss-detecting payload joins.

## Module Contents

### Functions

| Name                                                                         | Description                                                             |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| [`_reject_constant`](#nemo_gym-harness_capabilities-reader-_reject_constant) | -                                                                       |
| [`digest_file`](#nemo_gym-harness_capabilities-reader-digest_file)           | -                                                                       |
| [`hydrate_record`](#nemo_gym-harness_capabilities-reader-hydrate_record)     | Restore payloads by exact model\_call\_id, never order or content hash. |
| [`json_rows`](#nemo_gym-harness_capabilities-reader-json_rows)               | Read JSONL strictly; malformed/truncated rows are checker errors.       |

### Data

[`PAYLOADS`](#nemo_gym-harness_capabilities-reader-PAYLOADS)

### API

```python
nemo_gym.harness_capabilities.reader._reject_constant(
    value: str
) -> None
```

```python
nemo_gym.harness_capabilities.reader.digest_file(
    path: pathlib.Path
) -> str
```

```python
nemo_gym.harness_capabilities.reader.hydrate_record(
    record: dict,
    capture_dir: pathlib.Path | None = None
) -> dict
```

Restore payloads by exact model\_call\_id, never order or content hash.

The native collector moves bodies from capture.calls into ng\_trajectory.
An optional capture directory cross-checks the retained transport exchanges.
It never repairs payloads missing from the delivered JSONL.
Conflicts are preserved as reader failures instead of being overwritten.

```python
nemo_gym.harness_capabilities.reader.json_rows(
    path: pathlib.Path
) -> typing.Iterator[tuple[int, dict]]
```

Read JSONL strictly; malformed/truncated rows are checker errors.

```python
nemo_gym.harness_capabilities.reader.PAYLOADS = ('request', 'response', 'request_raw', 'response_raw')
```