Releases: zerosixty/samurai
v0.8.3 — Skill v3 cleanup
Skill tooling cleanup for the Claude Code samurai skill (no framework code changes).
Changes
claude-setupversion sync: bumped the version constant from"2"to"3"soclaude-setupcorrectly upgrades v2 installs to the v3 SKILL.md already shipped in v0.8.2- Dropped false-positive rule #5 ("Existing isolation: test already uses Ginkgo
BeforeEachor similar") — too broad, the other four rules already cover the real cases
Full Changelog: v0.8.2...v0.8.3
v0.8.2 — Factory: extract when shared across Tests
Skill documentation refinement for the Claude Code samurai skill (no framework code changes).
Change
Relaxed the strict "always inline the factory closure" rule:
- Prefer inlining the factory inside `RunWith`
- Extract to a private helper (below the Tests) when 2+ Test functions in the same file need identical factory logic — duplication outweighs locality once there is no single caller
Why
Multi-Test files (e.g. 5 `TestXxx` sharing one factory) turned strict inlining into mandatory 5× duplication. The locality rationale only applies when there is a single caller.
Full Changelog: v0.8.1...v0.8.2
v0.8.1 — Skill detection protocol
Skill documentation refinements for the Claude Code samurai skill (no framework code changes).
Changes
- File layout guide: context type + Test on top, helpers below
- Detection protocol: read bodies not names, swap-order test, find the writes
- Refined false-positive rules: read-only chains and shared setup helpers are not samurai candidates
Full Changelog: v0.8.0...v0.8.1
v0.8.0 — Auto-parallel top-level tests
Breaking: top-level `TestXxx` is now parallel by default
`samurai.Run` / `samurai.RunWith` now call `t.Parallel()` on the top-level `*testing.T`, not just on samurai-emitted sub-tests. Tests in the same Go package run concurrently without a manual `t.Parallel()` at the top of every `TestXxx`.
Migration
- Remove any manual `t.Parallel()` from the first line of a `TestXxx` that uses `samurai.Run` / `samurai.RunWith`. Go panics with `t.Parallel called multiple times` if the same `*testing.T` is marked parallel twice.
- Pass `samurai.Sequential()` for any test that uses `t.Setenv`, binds a fixed port, or otherwise cannot tolerate sibling tests running alongside it.
Why
Previously only sub-tests within a single `TestXxx` ran in parallel; different `TestXxx` functions in the same package ran serially unless each one wrote `t.Parallel()` manually. Real-world adoption (20 samurai tests in one package, ~140 leaves) dropped from ~30s to ~19s wall-clock once top-level parallelism was enabled — this release makes that the default.
🤖 Generated with Claude Code
v0.7.2
Skill improvements
- Split Claude Code skill into 3 files:
SKILL.md(rules + when to use),api.md(examples),pitfalls.md(validation + wrong patterns) - Added "When to Use" decision guide with clear criteria for when samurai is/isn't appropriate
- Bumped skill version to v2 — run
go run github.com/zerosixty/samurai/cmd/claude-setup@latestto update
v0.7.1
v0.7.0
Factory per path (breaking behavior change)
The factory in RunWith is now called once per test path instead of once per scope level. The same value is reused across all scope levels in a path, so parent state is visible to children.
Breaking change
Code that relied on getting a fresh factory-created value at each scope level will now receive the same value throughout the path. This is the intended behavior — it enables sharing state (e.g., database connections, assertion helpers) set up in parent callbacks with child callbacks.
Cleanup ordering
- Inner cleanups run before outer cleanups (unchanged)
- Factory cleanups now run last, after all callback cleanups
v0.6.0
What's New
BaseContext.Context()— New method that returns the scope'scontext.Context, enablingRunWithfactories to perform initialization that requires a context (e.g., connecting to databases, setting up providers). Delegates totesting.T.Context().
Example
samurai.RunWith(t, func(w samurai.W) *MyCtx {
ctx := w.Context()
return &MyCtx{BaseContext: w, db: connectDB(ctx)}
}, builder)Full Changelog: v0.5.0...v0.6.0
v0.5.0
Claude Code Skill Installer
Samurai now ships a zero-install CLI that sets up Claude Code context for your project:
go run github.com/zerosixty/samurai/cmd/claude-setup@latestThis creates .claude/skills/samurai/SKILL.md — a compact, AI-optimized reference (~1000 tokens) that teaches Claude Code how to write samurai tests correctly: variable scoping, cleanup patterns, Skip(), RunWith, and all validation rules.
Run it once per project. It's idempotent and auto-updates when a new skill version is available.
What's new
- Claude Code skill installer (
cmd/claude-setup) — one command to teach Claude Code the samurai API - GoLand plugin publish workflow — automated plugin builds via GitHub Actions
- Updated README — new banner, merged Quick Start, GoLand screenshots, AI-assisted development section
- New
ExampleRun_skip— testable example demonstratings.Skip()behavior - Docs cleanup — removed stale architecture docs, updated plugin docs
Full changelog
v0.4.0
Full Changelog: https://github.com/zerosixty/samurai/commits/v0.4.0