codebase-explorer
Deep codebase exploration agent for architecture understanding, pattern discovery, and…
Extends `qa.v2.md`. Load this file when dispatched with `mode: integration`.
> /plugin marketplace add LerianStudio/ringHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Extends `qa.v2.md`. Load this file when dispatched with `mode: integration`.
Extends `qa.v2.md`. Load this file when dispatched with `mode: integration`.
import (
"github.com/testcontainers/testcontainers-go"
"github.com/testcontainers/testcontainers-go/modules/postgres"
)
func TestMain(m *testing.M) {
ctx := context.Background()
pgContainer, err := postgres.RunContainer(ctx,
testcontainers.WithImage("postgres:16.3-alpine"),
postgres.WithDatabase("testdb"),
postgres.WithUsername("test"),
postgres.WithPassword("test"),
testcontainers.WithWaitStrategy(
wait.ForLog("database system is ready to accept connections"),
),
)
if err != nil {
log.Fatal(err)
}
defer pgContainer.Terminate(ctx)
connStr, _ := pgContainer.ConnectionString(ctx, "sslmode=disable")
os.Setenv("DATABASE_URL", connStr)
os.Exit(m.Run())
}func TestAccountRepository_Create(t *testing.T) {
// Uses real DB from TestMain
repo := NewPostgresAccountRepository(testDB)
t.Run("creates account successfully", func(t *testing.T) {
acc := &Account{Name: "Test Account", OrgID: "org-1"}
err := repo.Create(ctx, acc)
require.NoError(t, err)
assert.NotEmpty(t, acc.ID)
// Verify persisted
found, err := repo.FindByID(ctx, acc.ID)
require.NoError(t, err)
assert.Equal(t, "Test Account", found.Name)
})
t.Run("duplicate name in same org returns conflict", func(t *testing.T) {
acc := &Account{Name: "Duplicate", OrgID: "org-1"}
require.NoError(t, repo.Create(ctx, acc))
duplicate := &Account{Name: "Duplicate", OrgID: "org-1"}
err := repo.Create(ctx, duplicate)
require.Error(t, err)
assert.Equal(t, "CONFLICT", extractCode(err))
})
}Integration tests MUST cover:
# Build tag separates integration from unit tests go test -tags=integration ./... -v -timeout=120s
## VERDICT: [PASS | FAIL] ## Integration Testing Summary | Metric | Value | |--------|-------| | Scenarios Tested | N | | Infrastructure | PostgreSQL 16.3, RabbitMQ 3.13 (testcontainers) | | Duration | Xs | ## Scenario Coverage | Scenario | Type | Status | |----------|------|--------| | Account creation with real DB | Happy path | ✅ PASS | | Duplicate name constraint | Error path | ✅ PASS | | Concurrent writes | Concurrency | ✅ PASS | ## Quality Gate Results | Check | Status | |-------|--------| | All scenarios pass | ✅ | | No test isolation leaks | ✅ | | Containers healthy | ✅ | ## Next Steps [PASS: "Integration tests pass." | FAIL: list failed scenarios with root cause.]
Proven engineering practices, enforced through skills. Ring is a comprehensive skills library and workflow system for AI agents that transforms how AI assistants approach software development.
Repo: LerianStudio/ring
Deep codebase exploration agent for architecture understanding, pattern discovery, and…
Review Slicer: Adaptive classification engine that evaluates semantic cohesion to decide…
Senior Backend Engineer specialized in Go for high-demand financial systems. Handles API…
Senior Backend Engineer specialized in TypeScript/Node.js for scalable systems. Handles API…
Senior BFF (Backend for Frontend) Engineer specialized in Next.js API Routes with Clean…
Foundation Review: Reviews code quality, architecture, design patterns, algorithmic flow, and…