home / skills / redisearch / redisearch / verify

verify skill

/.skills/verify

This skill runs formatting, linting, build, and test checks to verify changes before commits or PRs.

npx playbooks add skill redisearch/redisearch --skill verify

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
1.0 KB
---
name: verify
description: Run full verification before committing or creating a PR
---

# Verify Skill

Run full verification before committing or creating a PR.

## Usage
Use this skill to run comprehensive checks before finalizing changes.

## Instructions

Run the following checks in order:

### 1. Format Check
```bash
make fmt CHECK=1
```
If it fails, run `make fmt` to fix formatting.

### 2. Lint Check
```bash
make lint
```
Fix any clippy warnings or errors.

### 3. Build
```bash
./build.sh
```
Ensure the full project compiles.

### 4. Rust Tests
```bash
cd src/redisearch_rs && cargo nextest run
```
All Rust tests must pass.

### 5. Unit Tests (if C code was modified)
```bash
./build.sh RUN_UNIT_TESTS ENABLE_ASSERT=1
```

### 6. Behavioral Tests (optional, for significant changes)
```bash
./build.sh RUN_PYTEST ENABLE_ASSERT=1
```

## Quick Verification
For minor Rust changes, this minimal check is often sufficient:
```bash
cd src/redisearch_rs && cargo fmt --check && cargo clippy --all-targets && cargo nextest run
```

Overview

This skill runs a full verification workflow before committing code or opening a pull request. It sequences formatting, linting, building, and test steps to catch style, compilation, and regression issues early. Use it to reduce CI failures and maintain code quality across C and Rust components.

How this skill works

The skill executes a set of checks in a defined order: format validation, linting, building the native project, running Rust test suites, and running C unit or behavioral tests when relevant. It offers a minimal fast path for small Rust-only changes and can run optional behavioral tests for larger or cross-language changes.

When to use it

  • Before committing significant changes that touch C or Rust code.
  • Prior to opening a pull request to ensure CI will likely pass.
  • When merging feature branches that affect core indexing, search, or query logic.
  • After fixing compiler or test failures locally to verify full project health.
  • For release candidates or major refactors that require broad validation.

Best practices

  • Run the full sequence locally on a clean checkout to mirror CI conditions.
  • If format check fails, fix formatting immediately rather than bypassing it.
  • Address lint warnings as errors to avoid future regressions.
  • Use the quick Rust-only path for small changes touching only Rust code.
  • Only run behavioral tests when changes affect runtime behavior or integrations.

Example use cases

  • A developer modifies the query planner in C and runs the full workflow to ensure no regressions in compilation or unit tests.
  • A contributor updates a Rust crate for vector search and uses the minimal Rust check to validate style, lints, and tests before pushing.
  • A team prepares a release candidate and runs full verification, including behavioral tests, to validate end-to-end behavior.
  • A CI job mirrors this sequence to gate merges and reduce post-merge build failures.

FAQ

Can I skip behavioral tests for small fixes?

Yes. Behavioral tests are optional and intended for significant changes; skip them for minor, isolated fixes to save time.

What if the format check fails?

Run the formatting command to apply fixes locally, then re-run the verification sequence before committing.