docs: explain test routing model · openclaw/openclaw@95ae3c0
steipete
·
2026-04-27
·
via Recent Commits to openclaw:main
File tree
.agents/skills/openclaw-testing
| Original file line number | Diff line number | Diff line change |
|---|
@@ -67,6 +67,21 @@ Use targeted file paths whenever possible. Avoid raw `vitest`; use the repo
|
67 | 67 | - The test wrapper prints a short `[test] passed|failed|skipped ... in ...` |
68 | 68 | line. Vitest's own duration is still the per-shard detail. |
69 | 69 | |
| 70 | +## Routing Model |
| 71 | + |
| 72 | +- `pnpm changed:lanes --json` answers "which check lanes does this diff touch?" |
| 73 | + It is used by `pnpm check:changed` for typecheck/lint/guard selection. |
| 74 | +- `pnpm test:changed` answers "which Vitest targets are worth running now?" It |
| 75 | + uses the same changed path list, but applies a cheaper test-target resolver. |
| 76 | +- Direct test edits run themselves. Source edits prefer explicit mappings, |
| 77 | + sibling `*.test.ts`, then import-graph dependents. Shared harness/config/root |
| 78 | + edits are skipped by default unless they have precise mapped tests. |
| 79 | +- Public SDK or contract edits do not automatically run every plugin test. |
| 80 | +`check:changed` proves extension type contracts; the agent chooses the |
| 81 | + smallest plugin/contract Vitest proof that matches the actual risk. |
| 82 | +- Use `OPENCLAW_TEST_CHANGED_BROAD=1 pnpm test:changed` only when a harness, |
| 83 | + config, package, or unknown-root edit really needs the broad Vitest fallback. |
| 84 | + |
70 | 85 | ## CI Debugging |
71 | 86 | |
72 | 87 | Start with current run state, not logs for everything: |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。