testing

testing is a cursor rule for Cursor from coddy-project/coddy-agent. It costs 2,616 tokens per session, scanned A, original, MIT.

A set of Go testing rules for a specific repository. It documents the commands and build tags needed to run the full test suite, including checks for Windows-specific code and the embedded user interface.

In plain words
What is it for?
Use it to run targeted Go tests, the repository’s complete test and UI build checks, Windows cross-build and lint checks, and tests for different feature combinations.
Why use it?
It prevents developers from relying only on host-platform tests that may miss Windows or tagged-code failures. It also gives a focused command for testing one package or test while making changes.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to run targeted Go tests, the repository’s complete test and UI build checks, Windows cross-build and lint checks, and tests for different feature combinations.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/coddy-project/coddy-agent/testing
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.

Clone the repo
git clone --depth 1 https://github.com/coddy-project/coddy-agent

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for testing

README.md
[![agentmods](https://agentmods.dev/badge/rules/coddy-project/coddy-agent/testing/github.svg)](https://agentmods.dev/rules/coddy-project/coddy-agent/testing)
Your own site
<a href="https://agentmods.dev/rules/coddy-project/coddy-agent/testing"><img src="https://agentmods.dev/badge/rules/coddy-project/coddy-agent/testing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for testing

Your own site · 80×15
<a href="https://agentmods.dev/rules/coddy-project/coddy-agent/testing"><img src="https://agentmods.dev/badge/rules/coddy-project/coddy-agent/testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,616 This file is loaded in full into every session.
When invoked 2,616 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original 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.1 $0.02616 $0.02616
Opus 5.5 $0.01046 $0.01046
Sonnet 5.5 $0.00523 $0.00523
Haiku 4.5 $0.00262 $0.00262

Measured today against content hash 49a8795929aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

testing 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.

.cursor/rules/testing.mdc · 56 lines

How it starts

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

Testing (Go)

Commands

  • Express run (what agents run before finishing): make test
    • Runs make test-agent-rules, make ui-build, make ui-test (the SPA's vitest suite), then one go test -tags=http,ui,scheduler,memory,cli,gateway,swarm,metrics ./... - the whole tree with every optional module compiled in, which is what the shipped binary contains. Minutes, not tens of minutes.
  • Tag matrix (CI's job, not a local step): make test-matrix walks every combination in TEST_TAG_SETS (Makefile) - the untagged build with its stubs, single tags, pairs, the shipped set. .github/workflows/tests-on-pr.yaml reads that list through make print-test-tag-sets and runs one job per combination with fail-fast: false, so a broken stub is named by the job that failed. Locally, a build-tag boundary change (a _stub.go, an Available const, a //go:build line) is checked with that one combination: go test -tags=<set> ./.... The untagged build is also compiled by make lint, so a signature a stub no longer satisfies is caught before the push.
  • Race detector: make test-race runs the whole tree under go test -race with every tag but ui; CI runs it on every pull request (job Race detector). Run it before the push when a change touches goroutines, locks or channels, or a test harness that drives a live loop (the console's UI loop, a running App, a godog step reading state a worker writes). GOFLAGS=-count=3 make test-race repeats every test, which a test that leans on process-wide state (a counter, bgtask.Default()) has to survive. Every package is clean under it: a race it reports is fixed where it lives (a stub's field read under the stub's own lock, a channel handed to a handler goroutine as a local), never skipped.
  • Prompt-cache group: make test-cache runs the features/prompt_cache_*.feature specs and every test named TestPromptCache* - what each request sends the provider: one system message for the whole session, a history that only grows at its end, every rule at most once and none that no path brought in. It is part of make test; run it on its own when a change touches the system prompt, the rules, the history or the send boundary, and give a new test of that kind the TestPromptCache prefix so it joins the group.
  • Performance group: make test-perf runs the benchmarks (Benchmark* in the perf_test.go files), which make test never runs: timings of the work a turn repeats and the context a session over this repository's own rules costs (system-tokens, request-tokens, duplicate-rules metrics). BENCH=<regexp> narrows them, BENCHTIME=5x sets the runs. A benchmark goes into the package's perf_test.go, not into its functional tests.
  • Targeted run while iterating: go test ./path/to/pkg -run TestName -count=1
  • Touching a file behind //go:build windows, or any signature it shares with _other.go / the rest of the tree: also run make check-windows and make lint-windows. make test and make lint run on the host, so the Windows half of internal/platform (and anything else with a per-OS file) is never compiled by them. check-windows cross-builds and go vets every non-ui tag combination, test files included. CI runs both (.github/workflows/tests-on-pr.yaml), plus go test on a real windows-latest runner for internal/platform, internal/bgtask, internal/tools/shell, internal/update, internal/hooks, internal/rules (drive-letter glob anchoring) and the console TUI (external/cli, -tags=cli) — the packages whose behavior differs by OS — and for cmd/coddy, internal/config, internal/dryrun and internal/swarm, whose tests write files and compare paths. The platform packages and the console suite run on macos-latest as well (job test-macos), which also builds the console and drives the binary through a real pty with examples/cli/cli_e2e_startup.py; the cli job of the Linux test matrix runs that script too, and the Telegram stand (tgfake) job runs examples/gateway/tg_e2e_offline.sh: the built binary against the release binary of tgfake (the version go.mod pins, installed by tgfake's own action; guide docs/contributing/tgfake.md), no Telegram and no model. The Go suite never opens a pty, so this is the only check of the console's terminal path.
  • Touching a file behind //go:build android, or internal/platform/android.go that it calls: also run make check-android. The Android build (GOOS=android with cgo, linked by the NDK against Bionic for arm64 and x86_64, published for Termux) compiles android_init.go and the cgo guard android_nocgo.go, which no host gate sees; check-android runs go vet over it with the NDK compiler (scripts/android-cc.sh), test files included, and CI runs it in the Android cross-build job, which also builds both release binaries, checks that each is a position-independent executable naming /system/bin/linker64 with no library Android does not ship, and uploads them as artifacts. The decisions themselves are plain functions tested on every Unix host (features/android_termux.feature, internal/platform/android_test.go). A new place that builds an exec.Cmd calls platform.AdaptCommand before Start; TestEverySpawnSiteAdaptsTheCommand fails otherwise.
  • HTTP server core is //go:build http. Embedded UI tests compile with go test -tags=http,ui ./external/httpserver. SPA-free http build uses //go:build http && !ui handlers under external/httpserver. Session memory REST uses //go:build http && memory (memory_http.go); without memory, memory_http_stub.go registers no routes.

Read the full file on GitHub · 56 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 Changed · +2 tokens per session 49a8795929aa
  2. 8d ago Changed · +31 tokens per session 53f9c1a50fde
  3. 10d ago Changed · +4 lines · +432 tokens per session dea3aa2497a6
  4. 11d ago Changed · +7 lines · +157 tokens per session 3b0b9523755c
  5. 18d ago Changed · +1 lines · +233 tokens per session 4b2c83f62df4
  6. 19d ago Changed · +2 lines · +263 tokens per session 8a3042fe8fda
  7. 25d ago Changed · +1 lines · +209 tokens per session fcef8ff0b710
  8. 26d ago Changed · +1 lines · +181 tokens per session 333ce13a5e48
  9. 27d ago Changed · +15 tokens per session b0d921b548be
  10. 28d ago First seen · 40 lines · 1,093 tokens per session scan A bf374a2c7af5

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository coddy-project/coddy-agent (175 stars, last pushed today), licensed MIT. It adds 2,616 tokens to every session, about $0.0105 per session on Opus 5.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-08-30.