kitaru-tests-release
Skill300 starsChanged 2 months agoApache-2.0View on GitHub
Kitaru test layout, CI workflows, and release-workflow behavior. Use when adding or debugging tests on any surface (CLI, server, task, worker, MCP, plugins), changing CI, or explaining what a release tag triggers.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- devtools/AGENTS.mdAGENTS.md
- plugins/AGENTS.mdAGENTS.md
- tests/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docker/CLAUDE.mdCLAUDE.md
- docs/CLAUDE.mdCLAUDE.md
- kitaru-adapter-developmentSkill
- kitaru-devSkill
- kitaru-docsSkill
- kitaru-importer-developmentSkill
- kitaru-releaseSkill
- kitaru-tests-releaseSkill
- kitaru-ui-api-developmentSkill
- kitaru-adapter-developmentSkill
- kitaru-devSkill
- kitaru-docsSkill
- kitaru-importer-developmentSkill
- kitaru-releaseSkill
- kitaru-ui-api-developmentSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
35 rules. About 0 are common, 16 are distinctive, and 19 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
19
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 8
Use this when adding, moving, or debugging tests beyond the basic commands and safety rules in tests/AGENTS.md, or when changing CI/release …
- Distinctive: line 15
Keep tests independent of working-directory state unless the test creates that state explicitly.
- Distinctive: line 16
Avoid shared mutable module-level state and wall-clock ordering assumptions.
- Very specific: line 23
Call src/kitaru/cli/app.py::main with an explicit argument list.
- Very specific: line 25
Use capsys and assert stable structured or plain-text contracts.
- Distinctive: line 26
Prefer lightweight stubs for remote resources instead of starting the full server.
- Very specific: line 28
Run just cli-artifact-smoke after optional-dependency, entrypoint, or packaging changes.
- Distinctive: line 30
Keep CLI tests focused on argument parsing, command dispatch, output contracts, and the specific resource interaction under test.
- Very specific: line 34
Follow the four server-resource surfaces in tests/AGENTS.md: service tests, ASGI REST tests, shared repository contracts, and PostgreSQL …
- Very specific: line 36
Use the PostgreSQL-backed tests for transaction, locking, migration, or cross-request behavior that an in-memory fake cannot prove.
- Distinctive: line 42
Keep subprocess tests bounded and assert structured receipts, exit behavior, and redaction.
- Distinctive: line 43
Use the existing worker fakes rather than starting unrelated services.
- Very specific: line 48
Read plugins/DEVELOPMENT.md for the package map, local candidate-image rehearsal, version preparation, dry-run dispatch, PyPI Trusted …
- Very specific: line 50
Run just plugin-artifact-smoke after changing plugin package metadata, default definitions, requirement pins, or release installation paths.
- Very specific: line 55
Commit plugins/candidate.Dockerfile and plugins/docker-compose.candidate.yml.
- Distinctive: line 56
Keep production release Dockerfiles unchanged when a plugin change only needs local candidate-wheel testing.
- Very specific: line 62
Keep handler tests typed and bounded.
- Very specific: line 63
Test capability filtering through MCPServer.list_tools(), not by calling decorated functions alone.
- Very specific: line 64
Treat tests/mcp/snapshots/metrics.json and src/kitaru/mcp/registry.py as the tool-inventory authorities.
- Very specific: line 65
Run just mcp-schema-check after any input/output model, registry, annotation, description, or MCP SDK change.
- Distinctive: line 71
Every bug fix should include a regression test that would have caught the original problem:
- Distinctive: line 73
Write or update the test so it captures the broken behavior.
- Distinctive: line 74
Run it and observe the expected failure when practical.
- Distinctive: line 79
If code changes after a successful test run, run the affected tests again.
- Distinctive: line 83
When adding a new CLI command, MCP tool, SDK resource, task, or worker capability:
- Distinctive: line 85
Add or update focused tests for the changed surface.
- Distinctive: line 86
Update offline CLI registration metadata for CLI commands.
- Very specific: line 87
Update examples/example-coverage.yaml and run just example-coverage-audit when examples are added, removed, renamed, or publicly documented.
- Distinctive: line 89
Run the relevant CLI artifact, MCP schema, MCP wheel, migration, OpenAPI, or package-build checks for the changed contract.
- Very specific: line 103
Use the current host's kitaru-release skill for the release interview, metadata edits, validation, and preparation PR.
- Distinctive: line 111
Before creating a core tag:
- Very specific: line 117
After changing the core version, run uv run python scripts/generate_openapi.py and commit the updated openapi/openapi.json.
- Very specific: line 118
Run just check, the relevant base/CLI/MCP tests, just mcp-schema-check, just cli-artifact-smoke, just plugin-artifact-smoke, just …
- Very specific: line 125
Default branch is develop.
- Very specific: line 132
Add a changelog.d/<pr-number>.<section>.md fragment for user-facing changes instead of editing CHANGELOG.md.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Kitaru Tests, CI, and Release Workflow
Use this when adding, moving, or debugging tests beyond the basic commands and safety rules in tests/AGENTS.md, or when changing CI/release behavior.
Unit and Contract Tests
- Build small typed stubs or
SimpleNamespaceobjects instead of booting unrelated runtime state. - Assert one behavior or contract at a time.
- Include regression coverage for bug fixes.
- Keep tests independent of working-directory state unless the test creates that state explicitly.
- Avoid shared mutable module-level state and wall-clock ordering assumptions.
V2 has no primed_zenml fixture or test_phase* example suite. Do not copy those v1 patterns into new tests.
CLI Tests
- Install the surface with
uv sync --extra cli --extra worker. - Call
src/kitaru/cli/app.py::mainwith an explicit argument list. - Assert the returned integer exit code, such as
main(["--help"]) == 0; successful calls do not raiseSystemExit(0). - Use
capsysand assert stable structured or plain-text contracts. - Prefer lightweight stubs for remote resources instead of starting the full server.
- Exercise offline help, version, schema, and scaffold commands without reading local configuration.
- Run
just cli-artifact-smokeafter optional-dependency, entrypoint, or packaging changes.
Keep CLI tests focused on argument parsing, command dispatch, output contracts, and the specific resource interaction under test.
Server and SDK Tests
Follow the four server-resource surfaces in tests/AGENTS.md: service tests, ASGI REST tests, shared repository contracts, and PostgreSQL end-to-end tests. Add SDK round-trip coverage under tests/client/ when a public resource changes.
Use the PostgreSQL-backed tests for transaction, locking, migration, or cross-request behavior that an in-memory fake cannot prove. Run docker compose up -d db before those tests and just migration-check after schema changes.
Task and Worker Tests
- Task subprocess contracts live under
tests/task/. - Worker lifecycle and handler contracts live under
tests/worker/. - Keep subprocess tests bounded and assert structured receipts, exit behavior, and redaction.
- Use the existing worker fakes rather than starting unrelated services.
- When changing dynamic task dependencies or adding a first-party Python distribution, compare the worker's package-age allowlist with every PyPI unit in
release/release-units.toml, including non-default packages. Exercise an exact pin under an olderexclude-newercutoff with a candidate or published wheel, and cover the fallback when the installeduvlacks--exclude-newer-package.
Default Plugin Packages
- Read
plugins/DEVELOPMENT.mdfor the package map, local candidate-image rehearsal, version preparation, dry-run dispatch, PyPI Trusted Publisher setup, publish workflow, and verification commands. - Standalone adapter distributions also live under
plugins/packages/, but agent projects install them directly. Keepdefault-catalog = falsein the release inventory and keep them out of the server default catalog. - Run
just plugin-artifact-smokeafter changing plugin package metadata, default definitions, requirement pins, or release installation paths. - The smoke builds Kitaru and every selected plugin as wheels, installs them into a clean environment, loads each configured package entrypoint, and verifies idempotent default registration.
- CI runs plugin distributions as a package matrix. Keep the matrix aligned with
plugins/packages/and the choices in.github/workflows/release-plugins.yml. - Plugin workflow dispatches are dry-runs. Package tags publish from reviewed commits reachable from
developor the unit's matching maintenance branch. Dependent plugins wait for core PyPI availability; other core jobs can continue. - Kitaru release dry-runs build plugin-owned candidate images from
plugins/candidate-wheels; production release Dockerfiles continue to install exact versions from PyPI. - Commit
plugins/candidate.Dockerfileandplugins/docker-compose.candidate.yml. Do not commit generated files underplugins/candidate-wheels/. - Keep production release Dockerfiles unchanged when a plugin change only needs local candidate-wheel testing.
- Register a self-contained in-progress plugin with the CLI
--scriptsource. Use an exact package source when the test must cover wheel installation or package imports.
MCP Tests
- Synchronize with
uv sync --frozen --extra mcpand runjust test tests/mcp. - Keep handler tests typed and bounded; use resource-shaped fake
KitaruAPIClientobjects unless a protocol or real-server contract requires deeper integration. - Test capability filtering through
MCPServer.list_tools(), not by calling decorated functions alone. - Treat
tests/mcp/snapshots/metrics.jsonandsrc/kitaru/mcp/registry.pyas the tool-inventory authorities. Do not hardcode copied inventory counts in instructions. - Run
just mcp-schema-checkafter any input/output model, registry, annotation, description, or MCP SDK change. Snapshot changes require explicit MCP API review. - Build the wheel and run
just mcp-wheel-smokeafter launcher, packaging, lifecycle, or optional-import changes. - Preserve stable request-ID forwarding, mixed-version refusal, bounded preflight reads, and text/structured response parity where the existing contracts require them.
Bug Fix Workflow
Every bug fix should include a regression test that would have caught the original problem:
- Write or update the test so it captures the broken behavior.
- Run it and observe the expected failure when practical.
- Make the code change.
- Rerun the targeted test.
- Rerun the broader relevant suite.
If code changes after a successful test run, run the affected tests again.
Feature Completion Checklist
When adding a new CLI command, MCP tool, SDK resource, task, or worker capability:
- Add or update focused tests for the changed surface.
- Update offline CLI registration metadata for CLI commands.
- Update
examples/example-coverage.yamland runjust example-coverage-auditwhen examples are added, removed, renamed, or publicly documented. - Review analytics coverage and add events only through the current v2 analytics paths.
- Run the relevant CLI artifact, MCP schema, MCP wheel, migration, OpenAPI, or package-build checks for the changed contract.
Python CI
.github/workflows/ci.yml runs on pushes to develop and on pull requests. It includes separate base, CLI, and MCP matrices across Python 3.11 through 3.14, plus installed CLI-artifact and MCP-wheel contracts. Push-only jobs cover Docker server smoke and UI wheel packaging because those paths may require trusted UI release credentials.
This repository has no live-LLM test surface; do not cite one as release evidence.
Docs CI
.github/workflows/docs.yml runs on manual dispatch, main pushes, and selected docs/reference pull-request paths. It regenerates the SDK and CLI reference content, builds the FumaDocs export, and tests the redirect worker. Pull requests build without deploying; deployment runs on main pushes or manual dispatch. Hand-written docs publish separately through GitBook Git Sync.
Release Workflows
Use the current host's kitaru-release skill for the release interview, metadata edits, validation, and preparation PR. Keep this skill focused on selecting and running test surfaces.
.github/workflows/release.yml handles the core tag python/kitaru/v<VERSION>. It publishes Kitaru to PyPI, then publishes client, server, worker, and managed images plus Helm, and creates the GitHub Release. Python RC versions such as 0.22.0rc1 become deployable tags such as 0.22.0-rc.1. There is no separate bundle tag.
.github/workflows/release-plugins.yml handles one Python plugin distribution per namespaced tag. In a coordinated release, dependent plugin tags follow successful core PyPI publication. They can publish while core deployables and post-release jobs continue. Independent plugins use an already-published compatible core.
.github/workflows/release-typescript.yml publishes @zenml-io/kitaru, @zenml-io/kitaru-mastra, and @zenml-io/kitaru-vercel-ai together from an immutable typescript/kitaru/v<VERSION> tag. Read release/typescript.md before preparing or recovering a TypeScript release. Manual dispatch is a non-publishing rehearsal; pushing the tag publishes the tested tarballs, waits for npm publish-time scanning, verifies a clean registry install, and creates the GitHub Release. The three packages use one lockstep stable or -rc.N version.
Before creating a core tag:
- Fetch
develop,main, and tags. - Confirm the intended release commits are on
developand identify the last immutable release tag. - Review the changelog fragments in
changelog.d/and the version classification. - Confirm no other release run is active.
- After changing the core version, run
uv run python scripts/generate_openapi.pyand commit the updatedopenapi/openapi.json. - Run
just check, the relevant base/CLI/MCP tests,just mcp-schema-check,just cli-artifact-smoke,just plugin-artifact-smoke,just migration-check, andjust buildas applicable. Runjust mcp-wheel-smokeonly afterjust build; it consumes the wheel underdist/. - Dispatch
release.ymlwith the proposed core tag when a non-publishing rehearsal is needed. Userelease-plugins.ymlfor a plugin rehearsal.
Stable core releases move the public Docker latest aliases, advance the core maintenance branch, and create a draft development-reset PR. The release owner fast-forwards main to the immutable core tag before merging the reset into develop. Report PyPI publication, public deployables, managed-image warnings, installer smoke, maintenance state, and reset state separately. A reset failure can leave the workflow red after artifact publication succeeds.
Branching and Releases
- Default branch is
develop. - Pull requests target
develop. maintracks the latest released version only; do not push directly.- Python core and plugin releases use namespaced tags handled by
release.ymlandrelease-plugins.yml, respectively. - TypeScript releases are cut with
typescript/kitaru/v<VERSION>tags handled by.github/workflows/release-typescript.yml; rehearse the exact tag through manual dispatch before pushing it. - A core tag directly starts
.github/workflows/release.yml. Manual dispatch rehearses without publishing; recover publication by inspecting and rerunning the original failed jobs with the same immutable artifacts. - Release preparation maintains the version in
pyproject.toml; application code should useimportlib.metadata.version("kitaru")rather than hardcoding it. - Add a
changelog.d/<pr-number>.<section>.mdfragment for user-facing changes instead of editingCHANGELOG.md. Any slug works in place of the number while the PR does not exist yet.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

