Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Test Data Generation & Validation

БесплатноБез исполняемых скриптовНе проверен

Generate real Cassandra 5.0 test data using Docker containers, export SSTables with proper directory structure, validate parsing against sstabledump, and…

pmcfadinот pmcfadin★ 22 звезды на GitHub7 установок в других каталогах

Об этом скилле

Test Data Generation & Validation

This skill provides guidance on generating real Cassandra 5.0 test data and validating parsing correctness.

When to Use This Skill

  • Generating test data with specific schemas
  • Creating test fixtures for property tests
  • Exporting SSTables from Cassandra
  • Validating parsed data against sstabledump
  • Managing test datasets
  • Creating reproducible test scenarios

Overview

CQLite uses real Cassandra 5.0 instances to generate test data, ensuring:

  • Format correctness (real Cassandra writes)
  • Edge case coverage (nulls, empty values, large values)
  • Compression validation (actual compressed SSTables)
  • Schema variety (all CQL types)

A fixture proves nothing about a property it does not VARY (issue #3042)

Before choosing or generating a fixture, name the property under test and ask whether this fixture varies it. If it does not, the fixture cannot validate it — the property is UNTESTED, not proven, and the resulting green is meaningless. This is a selection-time check: once the fixture is in place the test passes and nothing flags the gap.

  • A single-component clustering key cannot validate a multi-component invariant. Component separators, NEXT_COMPONENT framing between components, and mixed ASC/DESC inversion all need arity ≥ 2 to be exercised at all.
  • Values that happen to share a first byte cannot validate byte-discriminated trie/index logic. BTI partition/row tries branch on transition bytes; keys with an identical leading byte never force the discriminating branch.
  • Correctness resting on an incidental property of one fixture is untested. Real instance: the pre-fix BTI root-delta base was 2 bytes low, and the wrong root pointed straight at the root's only child purely because that fixture's child node happened to be 2 bytes wide — the defect was invisible until a fixture varied the node width (issue #3002, pinned in cqlite-core/tests/issue_3002_bti_rows_root_base.rs).

So: vary the arity, vary the leading bytes, vary the widths and the orders. A corpus of one shape is a corpus of one datapoint. See also the self-round-trip blind spot in CLAUDE.md §Testing — a fixture you generated with CQLite cannot be the oracle for CQLite.

Test Data Workflow

See dataset-generation.md for complete workflow details.

Quick Start

Full corpus regeneration (recommended):

# Regenerates nb + oa + da keyspaces in one command
bash test-data/scripts/regenerate-datasets.sh

# With custom row count
bash test-data/scripts/regenerate-datasets.sh --rows 200

Compose-stack workflow (interactive / partial): All paths below are repo-root-relative; run via bash (regenerate-datasets.sh is not committed executable, so ./ invocation fails on it):

# 1. Start clean Cassandra 5 with schemas (container: cqlite-cassandra-5-0)
bash test-data/scripts/start-clean.sh

# 2. (Optional) run CQL inserts manually via cqlsh
docker exec -it cqlite-cassandra-5-0 cqlsh

# 3. Export SSTables + generate JSONL goldens
bash test-data/scripts/export.sh

# 4. Shutdown and clean volumes
bash test-data/scripts/shutdown-clean.sh

Generation Scripts

regenerate-datasets.sh (primary entrypoint)

Full corpus regeneration: nb + oa + da keyspaces, single Docker container.

What it does:

  1. Starts the pinned Cassandra container (cassandra:5.0.8, see test-data/scripts/lib/cassandra-image.sh) (cqlite-regen)
  2. Applies schemas and inserts rows for nb keyspaces (CASSANDRA_4 compat mode)
  3. Restarts with storage_compatibility_mode: NONE, creates oa keyspace
  4. Restarts with sstable.selected_format: bti, creates da keyspace
  5. Exports SSTables via tar stream + generates sstabledump JSONL goldens
  6. Writes metadata.yml

Options:

  • --rows N - Rows per nb table (default: 50)
  • --out <dir> - Output directory (default: test-data/datasets)
  • --dry-run - Print commands without executing

Example:

bash test-data/scripts/regenerate-datasets.sh
bash test-data/scripts/regenerate-datasets.sh --rows 200 --out /tmp/ds
bash test-data/scripts/regenerate-datasets.sh --dry-run

start-clean.sh

Starts Cassandra 5.0 container (via compose) and applies schemas.

What it does:

  1. Starts the cqlite-cassandra-5-0 container via test-data/docker/docker-compose-cassandra5.yml
  2. Waits for Cassandra to be healthy
  3. Applies schemas from schemas/core.list

Environment variables:

  • SCHEMA_SET=core - Use curated schema list (default)
  • SCHEMA_SET=all - Use all *.cql files

Example:

bash test-data/scripts/start-clean.sh
SCHEMA_SET=all bash test-data/scripts/start-clean.sh

export.sh

Exports SSTables from the running Cassandra container and generates reference files.

What it does:

  1. Runs nodetool flush to write all memtables to disk
  2. Streams SSTables from container to datasets/sstables/ via tar
  3. Generates sstabledump JSONL golden files and
Полный SKILL.md на GitHub

Установить Test Data Generation & Validation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

dataset-generation.mdvalidation-workflow.md

FAQ

Что делает скилл Test Data Generation & Validation?

Generate real Cassandra 5.0 test data using Docker containers, export SSTables with proper directory structure, validate parsing against sstabledump, and manage test datasets. Use when working with test data generation, dataset creation, SSTable export, validation, fixture management, or sstabledump comparison.

Как установить скилл Test Data Generation & Validation?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Test Data Generation & Validation запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Test Data Generation & Validation с