# Twin Datasets

`rho-dataset` creates a linked mock/real dataset pair with one UUID.

The intent is:

- mock data is safe to share with the other side
- real data stays local/private
- both variants are tied together by one manifest id
- everything is staged under `./users/<owner>/...` first
- you explicitly copy only the shareable subtree into shared space later

## Command

```bash
./rho-dataset \
  --name customer-orders \
  --real ./incoming/real/orders.csv \
  --mock ./incoming/mock/orders.csv \
  --owner user1 \
  --description "Orders export with mock twin for development"
```

Defaults:

- shareable root: `./users/<owner>/datasets/share`
- private root: `./users/<owner>/datasets/private`

## Output Layout

```text
users/user1/datasets/share/<uuid>/
  dataset.yaml
  mock/
    orders.csv

users/user1/datasets/private/<uuid>/
  dataset.yaml
  real/
    orders.csv
```

## Shared Manifest

The share manifest includes:

- dataset UUID
- logical dataset name
- metadata
- mock file path and hash
- a declaration that the real variant exists but is private and still local

## Private Manifest

The private manifest includes:

- the same UUID
- a pointer back to the share manifest
- the real file path and hash

## Why This Shape

This lets the remote side:

- inspect the share manifest once you copy it out
- use the mock file for local development and sandbox testing
- produce a computation request against the dataset UUID

Then the private side can:

- review the request
- run against mock
- run against real
- release only approved results

## Sharing

When you are ready to expose the mock twin, copy the share subtree into shared space:

```bash
cp -R ./users/user1/datasets/share/<uuid> ./shared/datasets/
```

For the sandboxed two-console demo, publish into the sandbox instead:

```bash
./publish user1 <dataset-uuid> \
  --source-root ./sandbox/two-console-demo/users \
  --target-root ./sandbox/two-console-demo/shared/datasets
```
