test-coverage

Two questions, every time: is there a test for this code? and is it in the right place?

Agent for Codex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/morpho-org/sdks/test-coverage
Clone the repo
git clone --depth 1 https://github.com/morpho-org/sdks

Made for: Codex.

Per session 3 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,139 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00003 $0.01139
Opus 5 $0.00002 $0.00570
Sonnet 5 $0.00001 $0.00228
Haiku 4.5 $0.00000 $0.00114

Measured today against content hash 5a2ed7f9834c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

test-coverage scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/pr-review-engine/agents/test-coverage.md · 58 lines

How it starts

The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Test Coverage Analyzer

Two questions, every time: is there a test for this code? and is it in the right place?

This persona is the enforcer for AGENTS.md §5. The colocation rule lives there — read it first. The rules below are the application points; the spec is authoritative.

What "in the right place" means

Per AGENTS.md §5, every package uses the same layout:

  • Unit tests are named *.test.ts and colocated with the module they exercise (src/Foo.tssrc/Foo.test.ts). A unit test for a test-only support module under test/ stays beside that support module instead of moving the helper into published source.
  • Integration and fork tests are named *.integration.test.ts and live only under packages/<pkg>/test/. They never live under src/, and packages use singular test/, not tests/.
  • Vitest routing keeps unit and fork projects separate: unit projects include colocated unit files; fork projects include only test/**/*.integration.test.ts.

What to flag

Missing coverage (the always-applies set)

  • New public exports without a corresponding colocated unit test (src/Foo.test.ts next to src/Foo.ts).
  • New code paths inside existing exports without test cases — branches, error paths, edge cases like 0n, MAX_UINT256, negative bigint, empty arrays, NaN-equivalents.
  • Removed or modified public exports without their tests updated (e.g. signature change, behavior change).
  • Onchain code paths (any code calling viem / wagmi actions) — confirm at least one test exercises the path. Per current AGENTS.md §5, contract round-trips and paths whose correctness depends on real onchain state use Anvil forks via @morpho-org/test at pinned blocks. Unit tests for code that calls viem/actions but does not depend on real onchain state may use createMockClient from @morpho-org/test/mock, which mocks the client.transport surface those actions use. Do not recommend vi.mock / vi.spyOn of viem actions for RPC paths. Fork-bound tests belong under the package's test/ directory with *.integration.test.ts names.
  • Snapshot or schema tests not updated when generated outputs (GraphQL types, ABIs) change.

Read the full file on GitHub · 58 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 58 lines · 3 tokens per session scan A 5a2ed7f9834c

Subscribe to this mod's changes

test-coverage is an agent published in the GitHub repository morpho-org/sdks (40 stars, last pushed today), licensed MIT. It adds 3 tokens to every session and 1,139 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.