plugins/omo/**,.agents/plugins/marketplace.json,marketplace.jsonand.github/workflows/pr-source-guidance.ymlare synced from the oh-my-openagent repository and are rewritten on every sync. Never hand-edit them: change their source in oh-my-openagent (the plugin's test rules live inpackages/omo-codex/plugin/test/AGENTS.mdthere).src/is a git submodule of oh-my-openagent.- The hand-owned parts are the root
test/,bin/andpackages/web/.
- Root:
npm test, which runsnode --test test/*.test.mjs. - Plugin:
npm testfrom the plugin directory (the suite is owned upstream, see above). - Web:
pnpm run lint,pnpm run type-checkand the Playwright suite (seepackages/web/AGENTS.md).
Before adding or changing a test, answer all four; a missing answer means do not add it yet:
- What observable behavior, invariant, or independent contract does it protect?
- What credible regression makes it fail?
- Why does existing coverage not already catch that failure? Each contract has one primary test owner at the strongest boundary; extend a table case or shared fixture instead of adding a near-duplicate.
- Does it need a production seam (export, flag, wrapper, injection hook) no production caller needs? If yes, test at the real boundary instead. Junk patterns (reject unless the retention bar below applies): assertion-free probes; self-comparisons and identity copiers; copied fixtures, inventories, manifests or export lists; exact source, import or string greps; private call-shape tests duplicated at a real boundary; duplicate invocations of one contract; replays of a shared helper through a wrapper; tests that exist to keep a test-only export or wrapper alive; production code whose only callers are tests; expected values produced by the code under test; mocks that implement the asserted behavior; fixture-supplied receipts or postconditions the code under test should produce; assertions against a store nothing writes; capability or flag restatements without a delivery proof; negative controls that pass for an unrelated reason; names that promise more than the input exercises. Retention bar: keep a pattern match only when it independently guards a public API, protocol, config, migration, storage, security, platform, default, prompt-byte, generated or cross-language, package, release, or architecture contract, and say which one in the test. Static or slow is never a deletion reason. A retained test that fails on the base is a product bug to fix at its owner, never a test to delete. A bug regression test must fail on the pre-fix code for the intended reason; an existing owner test that already fails may serve as that proof. Method source: openclaw test-audit skill.