testing_skill

This skill ensures testing and validation before commit by running format, lint, and tests with mandatory async safeguards.
  • Rust

3

GitHub Stars

1

Bundled Files

3 weeks ago

Catalog Refreshed

2 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstart where the catalogue uses aiagentskills.

npx veilstart add skill zuytan/rustrade --skill testing

  • SKILL.md2.5 KB

Overview

This skill provides a strict pre-commit testing and validation workflow for a Rust algorithmic trading bot. It enforces formatting, linting with zero warnings, comprehensive tests (including async safeguards), and optional release verification to catch regressions early. The goal is to ensure code quality, prevent hangs in async tests, and keep CI green before any commit.

How this skill works

Run the validation steps locally before committing: format the code, run clippy with warnings treated as errors, execute the full test suite, and optionally build in release mode. Async tests must include timeouts and avoid unbounded loops to prevent CI hangs. A short checklist and quick commands make the workflow easy to follow and repeatable.

When to use it

  • Before every commit (mandatory)
  • After implementing a new feature
  • When validating a refactor or bug fix
  • When tests or CI are failing intermittently
  • Before preparing a release candidate

Best practices

  • Run formatting and linting locally and fix all issues; no clippy warnings allowed
  • Add or update tests to cover edge cases and behavior changes
  • In async tests, always use timeouts for channel operations and avoid infinite loops
  • Justify any lint allow attributes with clear comments; prefer fixing the cause
  • Perform an optional release build to verify optimizations before publishing

Example use cases

  • You added a new trading strategy—format, lint, and run tests before committing
  • You refactored a concurrency module—validate async tests with timeouts to avoid hangs
  • You fixed a bug uncovered by CI—run full validation locally to reproduce and confirm
  • You prepared a release—run a release build to ensure the optimized binary compiles
  • You wrote integration tests for exchange adapters—run targeted integration test commands

FAQ

Apply the suggestion when possible; if not applicable, add a concise comment explaining why an allow is necessary and only use it sparingly.

How do I prevent async tests from hanging?

Wrap await points like channel recv() in a timeout, and avoid unbounded loops by adding exit conditions or timeouts.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational