/shipwright:canary-executionfrom shipwright
Defines a cross-cutting contract for canary test execution: two modes (local/canary), eligibility rules, and deploy-gate budget (<60s). Referenced by system-design and migration skills.
Ships in shipwright. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Make "tests run locally" and "tests validate canary deploys" compatible — same code, separate entry point.
The canary suite runs from a dedicated entry point — a separate npm script (test:canary) or a dedicated Playwright project (e.g., playwright.canary.config.ts). It must never reuse test:smoke or the local smoke runner.
The separation is mechanical: CI wires two distinct jobs — smoke (pre-merge, boots local deps, runs test:smoke) and canary (post-deploy, sets TEST_TARGET_URL, runs test:canary). These jobs must not share a script.
Every canary-eligible smoke/E2E test reads TEST_TARGET_URL at process start:
local mode. Test boots its dependencies inline (docker-compose / testcontainers / in-memory) and makes HTTP calls to http://localhost:<port>.canary mode. Test skips local boot. Makes HTTP calls directly to $TEST_TARGET_URL. Uses canary-only auth credentials supplied via separate env vars (e.g., TEST_AUTH_TOKEN).The test code is identical. Only the setup-fixture layer branches.
A test is canary-eligible iff all of the following hold:
local mode is not canary-eligible. In canary mode there is no local database to boot — the test will fail at the setup step, not at the assertion. If a test currently boots a DB, it must be refactored to use the deployed service's API for any state setup before it can be promoted to the canary suite.Rules 3 and the cleanup discipline below are derived from t7_canary_safety in references/principles.md — canary-eligible tests must be wrapped with the canary-mode helper and must clean up after themselves. Treat references/principles.md as the canonical source for these safety principles.
If the canary suite exceeds 60s, one of:
The eligibility rules require canary tests to be read-only or self-cleaning, but stating the rule doesn't enforce it. Before a test file is promoted to the canary suite, run this verifiable check:
grep -En \
"(\.create|\.update|\.delete|\.insert|\.upsert|\.patch|\.save|\.destroy|\.truncate|\bPOST\b|\bPUT\b|\bPATCH\b|\bDELETE\b)" \
<canary-spec-files>
Every match is a candidate prod-write path.
For each match, classify as one of:
beforeEach / beforeAll / setup() and a matching delete exists in afterEach / afterAll / teardown. Verify the teardown runs inside a try/finally so it fires even on assertion failure.canary- prefix that the deployed service scopes to the TEST_AUTH_TOKEN holder).| Result | Action |
|---|---|
| Zero matches | File is clear. Proceed. |
| All matches are Safe | File is clear. Document the teardown evidence in the PR description. |
| Any Unsafe match | File is not canary-eligible. Mark it rebuild in the migration bucket. |
canary-eligible to validate or override the tag.test-inventory uses eligibility rule (1)+(2)+(3) to tag the canary column.test-design copies the mode-selection contract into the test-system.md artifact and prescribes the local-substitute setup that lets local-mode boot without external network.test-migration uses this contract to identify tests that claim canary eligibility but actually mutate persistent state — those are promote/rebuild, not reuse.test-roadmap Milestone 3 ("Canary suite live") gates on this contract being honored end-to-end.test:smoke as the canary entry point." No — test:smoke boots local dependencies. When TEST_TARGET_URL is set in that same job, the boot step will either succeed (wasting time on setup that isn't used) or fail (if the boot requires network). The canary entry point must skip all local setup unconditionally.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
27 skills in this plugin
/agent-readinessScore one repo against the agent-readiness catalogue (docs/readiness.md) with the deterministic scorer, post one ReadinessSnapshot and record one run. Requires --repo org/repo. No model judgment, no task creation, no repo files./duplication-fixRead a repo's ready_to_propose duplication patterns from the task store (PatrolFinding) and queue them as routed task-store tasks (auto, review or plan), one task per pattern, each carrying a strangler-fig (build -> coexist -> eliminate) execution plan. Requires --repo org/repo and duplication-scan to have run first./duplication-scanDiscover emerging duplicate/similar code patterns in one repo via judgment-driven comparison, track them across runs in the task store's PatrolFinding ledger, and list only stabilized open patterns in docs/patrols/duplication.md. Requires --repo org/repo. Report only — no code changes.npx claudepluginhub app-vitals/shipwright --plugin shipwrightOther plugins' skills for the same job