optimizetests
Optimize OpenClaw slow tests, imports, misplaced coverage, and CI wall time without dropping coverage.
- License 许可
- Apache-2.0
- 最近更新
- 2026-04-25
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- optimizetests
- description
- Optimize OpenClaw slow tests, imports, misplaced coverage, and CI wall time without dropping coverage.
02 资源文件 2
- 参考文档.skillfish.json227 B
- 参考文档agents/openai.yaml409 B
03 SKILL.md 正文
Optimize Tests
Goal: real OpenClaw test/runtime speedups with coverage intact. Do not add shards, skip assertions, weaken gates, or tune runner flags as the main fix.
Runbook
- Read
docs/help/testing.md,docs/ci.md, and the scopedAGENTS.mdfiles for any subtree you will edit. - Establish evidence before edits:
- Full ranking:
pnpm test:perf:groups --full-suite --allow-failures --output .artifacts/test-perf/<name>.json - Targeted file:
timeout 240 /usr/bin/time -l pnpm test <file> --maxWorkers=1 --reporter=verbose - Import suspicion: add
OPENCLAW_VITEST_IMPORT_DURATIONS=1 OPENCLAW_VITEST_PRINT_IMPORT_BREAKDOWN=1
- Full ranking:
- Attack highest-return hotspots first:
- broad barrels or
importActual()in hot tests - per-test
vi.resetModules()plus fresh imports - expensive gateway/server/client setup where reset/reuse proves same behavior
- core tests asserting extension-owned behavior
- duplicated fixture construction or contract assertions
- broad barrels or
- Prefer production-quality fixes:
- narrow runtime seams over broad mocks
- pure helpers for static parsing/metadata
- injected deps over module resets
- extension-owned tests for bundled plugin/provider/channel behavior
- After each change, rerun the same benchmark and the proving test lane. Record before/after wall time, Vitest duration, and max RSS when available.
- Run
pnpm check:changed; run broader gates (pnpm check,pnpm test,pnpm build) when touched surfaces require them. - Commit scoped changes with
scripts/committer "<conventional message>" <paths...>. Push when requested. If CI is red, inspect withgh run list/view, fix, push, repeat until current CI is green or a blocker is proven unrelated.
Output
End with the pushed commit(s), before/after timings, gates run, current CI state, and any remaining tail lanes that need separate optimization.
04 同仓库更多 Skills
zyte-api-automation
Automate Zyte API tasks via Rube MCP (Composio). Always search tools first for current schemas.
zylvie-automation
Automate Zylvie tasks via Rube MCP (Composio). Always search tools first for current schemas.
zoominfo-automation
Automate Zoominfo tasks via Rube MCP (Composio). Always search tools first for current schemas.
zoho_mail-automation
Automate Zoho Mail tasks via Rube MCP (Composio): email sending, folders, labels, and mailbox management. Always search tools first for current schemas.
zoho_invoice-automation
Automate Zoho Invoice tasks via Rube MCP (Composio): invoices, estimates, expenses, clients, and payment tracking. Always search tools first for current schemas.
zoho_inventory-automation
Automate Zoho Inventory tasks via Rube MCP (Composio): items, orders, warehouses, shipments, and stock management. Always search tools first for current schemas.