# Small `.tet` fixtures (verify / repair / query)

Tracked binaries for **manual** CLI checks and `src/tests/small_tet_fixtures.rs`.

| File                 | Role                                                                     |
| -------------------- | ------------------------------------------------------------------------ |
| `sample.tet`         | Multichunk `f32` `[2,3]` / tiles `[2,2]` (values 1..6)                   |
| `large.tet`          | `f32` `[34,64]` / `[4,4]` → **144** chunks (quick verify samples 128)    |
| `plan.tet`           | Same as `sample` + **invalid** history footer (`tet repair` plan target) |
| `multichunk_u8.tet`  | Multichunk `u8`, values 1..6                                             |
| `multichunk_u32.tet` | Multichunk `u32`, values 1..6                                            |
| `multichunk_f16.tet` | Multichunk `f16`, values 1..6                                            |

**Dataset names:** `sample.tet` → **`temperature`**; `multichunk_*.tet` → **`a`**.

Example query profiles (JSON + TOML): [`fixtures/queries/`](../../queries/README.md). C ABI smoke: [`examples/ffi_query.c`](../../../examples/ffi_query.c) or `./.github/scripts/build-ffi-example.sh`.

## Manual (from repo root)

```bash
cargo build --release
BIN=./target/release/tet
SAMPLE=fixtures/small/tet/sample.tet
U8=fixtures/small/tet/multichunk_u8.tet

$BIN info $SAMPLE
$BIN verify $SAMPLE -q
$BIN verify fixtures/small/tet/large.tet          # ok; warns about skipped decode past chunk 128
$BIN verify --deep fixtures/small/tet/large.tet -q
$BIN repair fixtures/small/tet/plan.tet            # plan (footer_invalid)
$BIN repair fixtures/small/tet/plan.tet --apply footer_invalid

Q=fixtures/queries

# sample.tet — dataset "temperature" (mean of 1..6 = 3.5)
$BIN query $Q/mean_temperature.toml -t $SAMPLE -x -q

# slice value grid (2×3 tensor, values 1..6)
$BIN query $Q/slice_full_temperature.toml -t $SAMPLE -x --preview 6 --format table

# 2×2 sub-slice (values 1, 2, 4, 5)
$BIN query $Q/slice_2x2_temperature.toml -t $SAMPLE -x --preview 4 --format table

# multichunk_u8.tet — dataset "a" (sum of 1..6 = 21)
$BIN query $Q/sum_a.toml -t $U8 -x -q
$BIN query $Q/var_a.json -t $U8 -x -q
$BIN query '{"dataset":"a","sum":[]}' -t fixtures/small/tet/multichunk_u32.tet -x -q
$BIN query '{"dataset":"a","var":[]}' -t fixtures/small/tet/multichunk_f16.tet -x -q
```

Expected aggregates on 1..6: **sum=21**, **var≈2.916667** (population, `ddof=0`).

## Regenerate

```bash
UPDATE_SMALL_TET=1 cargo test --lib regenerate_tracked_small_tet_fixtures -- --ignored --nocapture
```

Then commit `fixtures/small/tet/*.tet`.
