eng-test-conventions

Featured

Go test-shape discipline for Compozy. Use when writing or editing *_test.go under cmd or internal after test placement is justified. Do not use for non-Go tests, fixture-only changes, or as a replacement for eng-consolidate-test-suites.

AI & Automation 2,894 stars 189 forks Updated today MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
77
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Compozy Test Conventions Name the invariant, owning layer, and existing suite before changing coverage; reuse that working note. Use `eng-consolidate-test-suites` when placement is unclear, including a proposed new file with no obvious owner. No test is needed merely to raise coverage. Read the nearby canonical suite and relevant sections of `references/test-shape-rules.md` for subtests, parallelism, errors/assertions, interfaces, tags, integration behavior, mocks, helpers, and race/cgo. - Co-ship affected ACP/E2E fixtures, typed matchers, and generated expectations with runtime-contract changes. Exercise real SQLite or production-like process boundaries where the owning layer requires them. - Repair production regressions without weakening tests. If an assertion itself contradicts the established contract, substantiate that mismatch before changing it. - Keep touched tests in the canonical subtest shape; do not rewrite unrelated suites. Transitive `t.Setenv` use keeps the enclosing test serial. For changed Go test files, run the read-only heuristic checker: ```bash python3 .agents/skills/eng/eng-test-conventions/scripts/check-test-conventions.py <file_path> ``` Fix real findings; document a demonstrated false positive without weakening the convention. Run the affected package's race-enabled tests with `CGO_ENABLED=1` and the owning lint lane, reusing current evidence when those inputs are unchanged. Repository-wide gates run only in CI, per root `CLAUDE.md`; a local ...

Details

Author
compozy
Repository
compozy/compozy
Created
7 months ago
Last Updated
today
Language
Go
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category