Introduction to DSH Plugin: @goodandready/dsh-test-pilot (Automated Boundary Test Run)

When modifying code in DSH, AI agents often need a clear execution signal before completion. The Test Pilot plugin is designed to address this issue. It observes successful file writes, runs relevant tests in the background, and feeds the test results back to the agent, thereby providing automated boundary test feedback within the same DSH turn.

Plugin Introduction

Maintained by GooDAnDReaREADY, the core value of this plugin lies in enabling “automatic boundary test runs with persisted recent results.” It is a verifier tool, not an autonomous repair agent.

Core Features

  1. Automatic Triggering and Execution
    The plugin observes successful file write results, waits for a two-second quiet period to merge edits, and then runs tests in the background via the DSH subprocess service. If it can be completed within the same turn, it returns the completed test results; if the turn ends, it flushes pending work as a safety net. Read-only turns will not initiate test processes.

  2. Test Matching and Execution
    Supports various test runners and commands: pytest, Jest, Vitest, Go, Rust/Cargo, TAP, and TypeScript compiler commands.

    • When the mapping is complete, the plugin runs tests matched to the changed source file conventions.
    • When the mapping is incomplete, it runs the configured full suite and reports the reason.
    • The plugin rejects shell operators and command substitution to ensure safe execution.
  3. Management and Tools
    Provides two tools:

    • test_pilot_status: Returns active run counts and the latest results. An optional parameter can limit the inclusion to the most recent 20 boundary summaries.
    • test_pilot_run: Launches configured full commands in the current workspace or a specified cwd.
  4. Result Persistence
    Test results are retained for 30 days. Terminal summaries are stored atomically in $DSH_HOME/data/dsh-test-pilot/state.json. Workspace paths are represented using SHA-256 keys, and persisted rows contain only status, runner, counts, timestamps/durations, and failed test identifiers, never commands or full output. A maximum of 50 workspaces and 50 history records are retained.

Installation and Activation

Install the plugin to the DSH web configuration profile using the official command:

dsh plugin --profile web add @goodandready/dsh-test-pilot

After installation, go to Settings -> Plugins -> Plugin Settings, expand the Test Pilot panel to edit auto-run and configuration.

Typical Usage

  1. In Settings, expand Test Pilot to edit auto-run configuration and runner defaults.
  2. During development, use the test_pilot_run tool to manually launch configured full commands for testing.

Notes

  • The plugin is currently in the MVP stage and is positioned as a verifier; it does not possess the ability to edit files, initiate repair turns, commit/push, block approvals, or send telemetry.
  • If the state is corrupted or of an unknown version, the plugin will start from an empty state.
  • Concurrent requests cannot test the same mutable directory simultaneously; the plugin serializes auto and manual runs.

Summary

Test Pilot provides the necessary executable signal for AI code changes in DSH, enhancing the development workflow through background execution and result persistence.

  • GitHub: https://github.com/GooDAnDReaDY/dsh-test-pilot
  • Plugin Directory: https://www.skillhub.cn/plugins/GooDAnDReaDY/dsh-test-pilot
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye