本文へ移動
cccskills
無料GitHub で公開

spark-test-behavior

Use when adding or repairing Spark regression tests for asynchronous ownership, cancellation, persistence, restart recovery, or cross-surface projections. Not a coverage campaign, performance benchmark, source-text policy check, or full delivery review.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md3.9 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Spark behavior tests

Turn a concrete failure into a test that distinguishes the intended contract from the faulty behavior. Use the existing owner and test lane rather than adding another harness or copying repository policy.

Choose the observation and owner

Identify the triggering input or event order, the expected observable result, and the production path that must enforce it. Consult the package inventory and test architecture to locate the owner, nearest tests, and appropriate lane.

Keep package behavior in its package. Root integration tests are for behavior that crosses owners; source-process, browser, and packed-product tests prove different boundaries. Read the owning manifest and Vitest configuration before choosing a command. A green root suite does not establish that a package-local, process, or browser test was discovered.

Where a contract suite already exists, bind the affected implementation to it. For example, Loop store contracts exercise store semantics; they do not replace daemon startup or drain tests. Do not move a case to the root suite just to reuse setup.

Make the bad ordering observable

For a stale result, cancellation, or replacement defect, identify the exact suspension boundary. Hold the dependency there with a controllable fake or barrier, wait until it is entered, cause the competing event, then release it. Assert the observable result and the remaining tasks, resources, or committed state. When the real dependency can finish after cancellation, the fake must allow that completion too.

For retry delay policy, follow the contract's fake-timer guidance. Retain real timers and the necessary scheduler or process boundary when testing actual deadlines, cancellation, or drain. Bound waits and release resources even if an assertion fails; do not repair ordering by adding sleeps or blind retries.

Distinguish accepted, committed, projected, and drained work. Hold persistence at the relevant boundary when verifying publication order. Observe projections through the owner API or real adapter; prompt text, transcript wording, and frontend timers cannot serve as execution-state oracles.

Keep the boundary that can fail

Use real temporary files, SQLite reopen, sockets, or child processes when that is the contract being changed. Reuse the existing isolated test environment instead of pointing at the user's Spark state. Check failures after partial effects and reconnect or restart only when relevant to the reported defect.

For transport or schema changes, exercise the consumer's acceptance, rejection, or normalization. For UI interaction, use the browser lane when focus or DOM events matter. An in-memory store, mock process, SSR render, or snapshot proves only its own boundary.

Try the regression against the faulty behavior in an isolated reproduction, then against the repair. If a red run is unavailable, explain which assertion would detect the defect and mark the result as unverified rather than inventing a red/green history. Do not test source, prompt, or documentation fragments to prove runtime behavior.

Run and report

Select the focused command from CONTRIBUTING.md, confirm it discovered and executed the intended case, then run the relevant broader gate. Preserve explicit skips and missing native prerequisites in the result.

Report the contract, owner, controlled ordering, observed outcome, exact commands and limitations. Performance conclusions belong to benchmarks; publication readiness belongs to the existing delivery workflow.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Use when Spark engineering knowledge must be placed, deduplicated, migrated, or validated across AGENTS, Notes, Roles, Skills, and Workflows.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

Use when adding or updating Spark AI provider models or their compact and preflight metrics, especially baidu-oneapi, Grok, Claude, GPT, DeepSeek, OneAPI, context windows, output budgets, prices, thinking maps, or transports.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

Use when a Spark change needs its authoritative owner, affected boundaries, risks, acceptance criteria, and smallest verifiable slice established before implementation or review.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

Use when a Spark implementation needs an evidence-based review for correctness, ownership, compatibility, failure handling, maintainability, and unnecessary complexity.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

Use when a Spark feature needs repository-first research, explicit option selection, and an owner-aligned implementation plan before code changes.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

Use when a working Spark implementation should be simplified without changing its observed behavior, ownership, compatibility, or public contract.

日本語の概要は準備中です。原文の説明を表示しています。

zendev-lab/spark22026年10月11日 更新

zendev-lab のスキルをすべて見る

このスキルの問題を報告する