feat: WP-0005 adoption polish — doc sync, fleet parity, CI lint
- Add make agents-sync-package and release-check parity gate - Add tests/test_packaged_agents_parity.py; sync packaged agents with agents/ - Update install docs (HELLO_WORLD, CLI_CHEAT_SHEET, AGENT_DISTRIBUTION) - Expand PACKAGE_RELEASE.md secrets setup and pre-tag checklist - Add flake8 to Gitea CI; CHANGELOG Unreleased for v1.2.0 - Expand INTEGRATION_PATTERNS activity-core handoff checklist
This commit is contained in:
29
tests/test_packaged_agents_parity.py
Normal file
29
tests/test_packaged_agents_parity.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Verify packaged agent data matches canonical agents/ source."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
AGENTS_SRC = ROOT / "agents"
|
||||
AGENTS_PKG = ROOT / "src" / "kaizen_agentic" / "data" / "agents"
|
||||
|
||||
|
||||
def _agent_files(directory: Path) -> dict[str, Path]:
|
||||
return {p.name: p for p in sorted(directory.glob("agent-*.md"))}
|
||||
|
||||
|
||||
def test_packaged_agents_match_source():
|
||||
"""Wheel data/agents must mirror agents/ (names and content)."""
|
||||
src = _agent_files(AGENTS_SRC)
|
||||
pkg = _agent_files(AGENTS_PKG)
|
||||
|
||||
assert src, "agents/ must contain agent-*.md files"
|
||||
assert set(src) == set(pkg), (
|
||||
f"agent file set mismatch\n"
|
||||
f" only in agents/: {sorted(set(src) - set(pkg))}\n"
|
||||
f" only in data/agents/: {sorted(set(pkg) - set(src))}"
|
||||
)
|
||||
|
||||
drift = [name for name in src if src[name].read_text() != pkg[name].read_text()]
|
||||
assert not drift, f"content drift in packaged copies: {drift}"
|
||||
Reference in New Issue
Block a user