testing

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

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 rules/coddy-project/coddy-agent/testing
Clone the repo
git clone --depth 1 https://github.com/coddy-project/coddy-agent

Made for: Cursor.

Per session 776 This file is loaded in full into every session.
When invoked 776 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.00776 $0.00776
Opus 5 $0.00388 $0.00388
Sonnet 5 $0.00155 $0.00155
Haiku 4.5 $0.00078 $0.00078

Measured yesterday against content hash 26333c0463dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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 · 39 lines

How it starts

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

Testing (Go)

Commands

  • Full suite (what agents should run before finishing): make test
    • Runs go test ./..., -tags=memory, -tags=http, -tags=http,memory, -tags=scheduler, -tags=scheduler,memory, then make ui-build, then http,ui, http,ui,memory, http,scheduler, http,scheduler,memory, http,scheduler,ui, http,scheduler,ui,memory (see Makefile test target).
  • 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, and internal/tools/shell — the packages whose behavior differs by OS.
  • 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.

Conventions

  • Prefer table-driven tests where it clarifies cases.
  • Keep tests deterministic; avoid real network unless the test is explicitly integration-style and documented.
  • New HTTP behavior belongs in external/httpserver/server_test.go (and related files) with **http build tag parity.

BDD feature specs (features/)

  • Happy-path behavior of a feature (and the reproduction of a bug) is an executable Gherkin spec in the repo-root features/ directory, run by a godog harness (e.g. external/httpserver/bdd_remote_test.go, bdd_workspace_test.go) whose Options.Paths points at ../../features/<name>.feature.
  • Edge / boundary / error cases are ordinary unit tests next to the code, not scenarios in features/. Keep .feature files to the correct-behavior story.
  • Feature suites run under the tag that owns the behavior (e.g. -tags http) and are part of make test. Step definitions may use a stub runner to stay deterministic and LLM-free.

Read the full file on GitHub · 39 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. yesterday First seen · 39 lines · 776 tokens per session scan A 26333c0463dd

Subscribe to this mod's changes

testing is a cursor rule published in the GitHub repository coddy-project/coddy-agent (127 stars, last pushed 3d ago), licensed MIT. It adds 776 tokens to every session, about $0.0039 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-08-30.