아키텍처
CI/CD 파이프라인 다이어그램
모든 코드 변경과 릴리스를 게이트하는 빌드, 테스트, lint, 보안, 배포 워크플로 단계의 시각적 지도와 레인 분해.
Apothem 생태계의 모든 변경을 게이트하는 빌드 · 검증 · 배포 워크플로의 구조적 지도입니다. 이 문서는 시각화 표면을 설치합니다. 구체적인 GitHub Actions 워크플로 파일과 릴리스 도구는 이후 프로덕션 준비 설치 아래에서 배치됩니다.
파이프라인 형태
%%{ init: { "theme": "neutral" } }%%
%% verified: 2026-04-27 %%
%% provenance: pyproject.toml + scripts/dev/validate_ecosystem.py + scripts/dev/validate_hooks.py %%
%% cross-reference: site/content/docs/developer-guide.mdx (contributor workflow) %%
flowchart LR
accTitle: CI/CD pipeline shape
accDescr: Left-to-right flowchart of the apothem CI CD pipeline showing build, test, lint, type-check, security scan, docs build, package, sign, and publish stages with branch protection gates between them.
subgraph Trigger["Trigger surface"]
PR["Pull request opened or updated"]
PUSH["Push to main"]
TAG["Tag release vX.Y.Z"]
end
subgraph Static["Static analysis lane"]
LINT["Ruff lint + format check"]
TYPE["Mypy strict"]
MD["markdownlint"]
FRONT["Frontmatter validator"]
end
subgraph Test["Test lane"]
PYTEST["pytest tests/hooks"]
ECO["validate_ecosystem.py"]
CHAOS["chaos_pass.py (release lane)"]
BENCH["src/apothem/benchmarks/ (release lane)"]
end
subgraph Security["Security lane"]
SECRETS["Secret scan"]
SBOM["SBOM generation"]
LICENSE["License audit"]
end
subgraph Publish["Publish lane (tags only)"]
SIGN["Signed-tag verification"]
ATTEST["Provenance attestation"]
DOCS["Project website publish"]
RELEASE["Release notes from CHANGELOG.md"]
end
PR --> Static
PR --> Test
PR --> Security
PUSH --> Static
PUSH --> Test
PUSH --> Security
TAG --> Static
TAG --> Test
TAG --> Security
TAG --> Publish
Static --> GATE{All lanes green?}
Test --> GATE
Security --> GATE
GATE -->|yes| MERGE[Merge / publish]
GATE -->|no| BLOCK[Block · surface failures · request fix]
Publish --> MERGE레인 역할
- 정적 분석 레인 — 빠른 피드백. Ruff는 Python 스타일과 엄선된 규칙 집합을 다룹니다. mypy는 strict로 타입 규율을 강제합니다. markdownlint는 문서 표면을 단속합니다. frontmatter 검증기는 규칙, 스킬, 위임된 워커, 명령에 대한 아티팩트 스키마 준수를 게이트합니다.
- 테스트 레인 —
pytest tests/hooks는 hook 런타임을 완전한 이벤트 매트릭스에 대해 실행합니다.validate_ecosystem.py는 아티팩트 간 일관성을 위한 주요 구조 게이트입니다.chaos_pass.py와src/apothem/benchmarks/아래의 클래스별 벤치마크 스위트는 저하된 입력 아래에서의 퇴화와 런타임 예산 회귀를 잡아내기 위해 릴리스 레인에서 활성화됩니다. - 보안 레인 — 시크릿 스캔은 실수로 커밋된 자격 증명을 잡아냅니다. SBOM 생성과 라이선스 감사는 모든 프로덕션 준비 설치에 대해 공급망 표면을 게이트합니다.
- 배포 레인 — 태그된 릴리스에서만 실행됩니다. 서명된 태그 검증은 릴리스
브랜치의 출처를 확인합니다. 프로젝트 웹사이트는
site/dist/에서 GitHub Pages 대상으로 배포됩니다. 릴리스 노트는CHANGELOG.md의 Keep-A-Changelog 형식에서 파생됩니다.
구체적 구성
실제 워크플로 파일(.github/workflows/ci.yml,
.github/workflows/release.yml 등)은 프로덕션 준비 생태계 구축 중에
설치됩니다. 이 다이어그램은 향후 모든 구성이 반영하는 정규 형태를 정의합니다.
권위 있는 상호 참조
pyproject.toml— Ruff / mypy / pytest 구성의 진실의 출처.scripts/dev/validate_ecosystem.py— 주요 아티팩트 간 게이트.scripts/dev/validate_hooks.py— hook 전용 구조 검증.scripts/dev/chaos_pass.py— 구성된 각 hook에 대한 적대적 스윕.src/apothem/benchmarks/— 클래스별 런타임 예산 검증기.site/content/docs/developer-guide.mdx— 운영자 대상 기여자 워크플로.CHANGELOG.md— 릴리스 노트 출처.