"""Smoke tests for WP-0004 integration artifacts.""" from __future__ import annotations from pathlib import Path import yaml DEFINITIONS_DIR = ( Path(__file__).parent.parent / "docs" / "integrations" / "activity-definitions" ) def test_activity_definitions_have_required_frontmatter(): files = list(DEFINITIONS_DIR.glob("*.md")) assert len(files) == 3 for path in files: text = path.read_text(encoding="utf-8") assert text.startswith("---\n") end = text.index("\n---\n", 4) frontmatter = yaml.safe_load(text[4:end]) assert frontmatter["id"] assert frontmatter["trigger"]["type"] in ("cron", "event") assert frontmatter["owner"] == "kaizen-agentic" def test_integration_docs_exist(): root = Path(__file__).parent.parent / "docs" assert (root / "INTEGRATION_PATTERNS.md").exists() assert (root / "integrations" / "helix-forge-correlation.md").exists() assert (root / "integrations" / "optimizer-artifact-manifest.md").exists()