Editorial diagram design for Claude Code, Codex, GitHub Copilot, Cursor, Factory Droid, Qoder, and Pi. 45 diagram types. Self-contained HTML + SVG. No shadows. No Mermaid slop.
fix(ci): allow patch bumps without skill metadata changes (#194)
Cathryn Lavery66ab67ecc277
diff --git a/.github/workflows/auto-bump.yml b/.github/workflows/auto-bump.ymlindex a5affff..4d3c5f6 100644--- a/.github/workflows/auto-bump.yml+++ b/.github/workflows/auto-bump.yml@@ -125,14 +125,19 @@ jobs:set -euo pipefailpython3 scripts/verify-plugin-package.py "$SOURCE_SHA"- expected=$(printf '%s\n' \+ expected_without_skill=$(printf '%s\n' \+ .claude-plugin/plugin.json \+ .codex-plugin/plugin.json \+ .factory-plugin/plugin.json | LC_ALL=C sort)+ expected_with_skill=$(printf '%s\n' \.claude-plugin/plugin.json \.codex-plugin/plugin.json \.factory-plugin/plugin.json \skills/diagram-design/SKILL.md | LC_ALL=C sort)actual=$(git diff --name-only | LC_ALL=C sort)- if [ "$actual" != "$expected" ]; then- echo "Bump changed files outside the release allowlist:" >&2+ if [ "$actual" != "$expected_without_skill" ] \+ && [ "$actual" != "$expected_with_skill" ]; then+ echo "Bump changed unexpected files or omitted a required manifest:" >&2git diff --name-only >&2exit 1fi@@ -199,13 +204,18 @@ jobs:run: |set -euo pipefailpatch=_version-bump/version-bump.patch- expected=$(printf '%s\n' \+ expected_without_skill=$(printf '%s\n' \+ .claude-plugin/plugin.json \+ .codex-plugin/plugin.json \+ .factory-plugin/plugin.json | LC_ALL=C sort)+ expected_with_skill=$(printf '%s\n' \.claude-plugin/plugin.json \.codex-plugin/plugin.json \.factory-plugin/plugin.json \skills/diagram-design/SKILL.md | LC_ALL=C sort)patch_paths=$(git apply --numstat "$patch" | cut -f3- | LC_ALL=C sort)- if [ "$patch_paths" != "$expected" ]; then+ if [ "$patch_paths" != "$expected_without_skill" ] \+ && [ "$patch_paths" != "$expected_with_skill" ]; thenecho "Artifact contains paths outside the release allowlist" >&2exit 1fi@@ -213,7 +223,7 @@ jobs:git apply --check --whitespace=error "$patch"git apply --index --whitespace=error "$patch"staged_paths=$(git diff --cached --name-only | LC_ALL=C sort)- if [ "$staged_paths" != "$expected" ] \+ if [ "$staged_paths" != "$patch_paths" ] \|| [ -n "$(git diff --cached --summary)" ]; thenecho "Artifact changed unexpected paths or file modes" >&2exit 1diff --git a/scripts/test-plugin-package.py b/scripts/test-plugin-package.pyindex ffaa42b..392e476 100755--- a/scripts/test-plugin-package.py+++ b/scripts/test-plugin-package.py@@ -16,6 +16,7 @@ from typing import Iterator, OptionalROOT = Path(__file__).resolve().parent.parentVERIFY_SCRIPT = ROOT / "scripts/verify-plugin-package.py"BUMP_SCRIPT = ROOT / "scripts/bump-plugin-version.py"+AUTO_BUMP_WORKFLOW = ROOT / ".github/workflows/auto-bump.yml"PLUGIN_NAME = "diagram-design"@@ -479,6 +480,11 @@ def test_bumper() -> None:with tempfile.TemporaryDirectory() as scratch:root = Path(scratch)seed_package(root)+ version_paths = (*BUMP.MANIFEST_PATHS, BUMP.SKILL_PATH)+ before = {+ relative: (root / relative).read_text(encoding="utf-8")+ for relative in version_paths+ }actual = BUMP.bump(root, part)versions = {json.loads((root / relative).read_text(encoding="utf-8"))["version"]@@ -495,6 +501,19 @@ def test_bumper() -> None:f"{part} bump left SKILL.md metadata.version off "f"{expected_minor!r}: {skill_text!r}")+ changed = {+ relative+ for relative in version_paths+ if (root / relative).read_text(encoding="utf-8") != before[relative]+ }+ expected_changed = set(BUMP.MANIFEST_PATHS)+ if part != "patch":+ expected_changed.add(BUMP.SKILL_PATH)+ if changed != expected_changed:+ raise AssertionError(+ f"{part} bump changed {sorted(map(str, changed))}; expected "+ f"{sorted(map(str, expected_changed))}"+ )print(f"OK: {part} bump produced {expected} and synced SKILL.md")with tempfile.TemporaryDirectory() as scratch:@@ -535,9 +554,51 @@ def test_bumper() -> None:print("OK: version bumper fails closed on SKILL.md drift, manifests untouched")+def test_auto_bump_workflow_allowlists() -> None:+ workflow = AUTO_BUMP_WORKFLOW.read_text(encoding="utf-8")+ expected = {+ "expected_without_skill": tuple(+ sorted(relative.as_posix() for relative in BUMP.MANIFEST_PATHS)+ ),+ "expected_with_skill": tuple(+ sorted(+ relative.as_posix()+ for relative in (*BUMP.MANIFEST_PATHS, BUMP.SKILL_PATH)+ )+ ),+ }++ for variable, expected_paths in expected.items():+ marker = f"{variable}=$(printf '%s" + "\\n' \\" + "\n"+ chunks = workflow.split(marker)+ if len(chunks) != 3:+ raise AssertionError(+ f"expected prepare and publish assignments for {variable}; "+ f"found {len(chunks) - 1}"+ )+ for job, chunk in zip(("prepare", "publish"), chunks[1:]):+ body, separator, _ = chunk.partition("| LC_ALL=C sort)")+ if not separator:+ raise AssertionError(f"could not parse {job} {variable} allowlist")+ actual_paths = tuple(+ sorted(+ line.strip().removesuffix("\\").strip()+ for line in body.splitlines()+ if line.strip()+ )+ )+ if actual_paths != expected_paths:+ raise AssertionError(+ f"{job} {variable} allowlist is {actual_paths}; "+ f"expected {expected_paths}"+ )+ print("OK: prepare and publish workflow allowlists match bumper paths")++def main() -> int:test_verifier()test_bumper()+ test_auto_bump_workflow_allowlists()print("All plugin package tests passed")return 0