docs: add canonical engineering truth sources - #38
Conversation
📝 Walkthrough워크스루저장소에 대한 AI 에이전트 지침, 아키텍처 설명, 엔지니어링 정책 및 운영 절차를 정의하는 포괄적인 설명서와 검증 테스트를 추가합니다. 기존 변경사항
예상 코드 검토 노력🎯 2 (단순) | ⏱️ ~10분 관련 가능성 있는 PR
시🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
🧹 Nitpick comments (2)
tests/test_engineering_canonical_docs.py (2)
24-26: 실행 디렉터리에 따라 오탐이 날 수 있어, 저장소 루트 기준으로 경로를 고정하는 편이 안전합니다.현재
Path(path)는 CWD 기준입니다. 테스트를 루트가 아닌 위치에서 호출하면 문서가 있어도 실패할 수 있습니다.제안 diff
from pathlib import Path +REPO_ROOT = Path(__file__).resolve().parents[1] + REQUIRED_CANONICAL_DOCS = [ @@ def test_repository_ships_engineering_canonical_docs() -> None: - missing = [path for path in REQUIRED_CANONICAL_DOCS if not Path(path).exists()] + missing = [path for path in REQUIRED_CANONICAL_DOCS if not (REPO_ROOT / path).exists()] assert not missing, f"missing canonical engineering docs: {missing}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_engineering_canonical_docs.py` around lines 24 - 26, The test test_repository_ships_engineering_canonical_docs uses Path(path) which is CWD-relative and can false-fail when run outside the repo root; change it to resolve paths against the repository root before checking existence (e.g., compute repo_root from Path(__file__).resolve().parents[...] or otherwise determine repo root and then test (repo_root / path).exists()) so REQUIRED_CANONICAL_DOCS are checked reliably regardless of the current working directory.
123-124: 릴리스 트리거 검증이 문자열 포함 여부만 확인해서 구조적 드리프트를 놓칠 수 있습니다.
"push:"와"tags:"가 파일 어딘가에만 있어도 통과합니다.on.push.tags와on.workflow_dispatch구조를 함께 검증하도록 조금 더 엄격하게 잡는 걸 권장합니다.제안 diff
+import re from pathlib import Path @@ - assert "push:" in release_workflow and "tags:" in release_workflow - assert "workflow_dispatch:" in release_workflow + assert re.search(r"(?ms)^on:\s*.*?\bpush:\s*.*?\btags:\s*", release_workflow) + assert re.search(r"(?ms)^on:\s*.*?\bworkflow_dispatch:\s*", release_workflow)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/test_engineering_canonical_docs.py` around lines 123 - 124, The current assertions only check substrings in release_workflow and can miss structural drifts; instead parse release_workflow as YAML (e.g., with yaml.safe_load) and assert the loaded object has an "on" mapping containing a "push" mapping with a "tags" key (on["push"]["tags"]) and a "workflow_dispatch" entry (on["workflow_dispatch"]). Update the test that references release_workflow to load/validate the YAML structure and replace the two string assertions with these structured checks to ensure the exact on.push.tags and on.workflow_dispatch shapes exist.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@tests/test_engineering_canonical_docs.py`:
- Around line 24-26: The test test_repository_ships_engineering_canonical_docs
uses Path(path) which is CWD-relative and can false-fail when run outside the
repo root; change it to resolve paths against the repository root before
checking existence (e.g., compute repo_root from
Path(__file__).resolve().parents[...] or otherwise determine repo root and then
test (repo_root / path).exists()) so REQUIRED_CANONICAL_DOCS are checked
reliably regardless of the current working directory.
- Around line 123-124: The current assertions only check substrings in
release_workflow and can miss structural drifts; instead parse release_workflow
as YAML (e.g., with yaml.safe_load) and assert the loaded object has an "on"
mapping containing a "push" mapping with a "tags" key (on["push"]["tags"]) and a
"workflow_dispatch" entry (on["workflow_dispatch"]). Update the test that
references release_workflow to load/validate the YAML structure and replace the
two string assertions with these structured checks to ensure the exact
on.push.tags and on.workflow_dispatch shapes exist.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 148df2e0-e450-4200-831e-1b276ec631b6
📒 Files selected for processing (17)
AGENTS.mdARCHITECTURE.mdCONTRIBUTING.mddocs/agents/README.mddocs/coderabbit/review-commands.mddocs/engineering/acceptance-criteria.mddocs/engineering/canonical-docs.mddocs/engineering/execution-policy.mddocs/engineering/harness-engineering.mddocs/engineering/review-policy.mddocs/engineering/runtime-data-policy.mddocs/engineering/skills-subagents-mcp.mddocs/operations/deploy-runbook.mddocs/security/api-security-checklist.mddocs/workflow/one-day-delivery-plan.mddocs/workflow/pr-continuity.mdtests/test_engineering_canonical_docs.py
Summary
Verification
uv run pytest tests/test_engineering_canonical_docs.py -quv run pytest --cov=src/newsdom_api --cov-branch --cov-report=term-missing --cov-fail-under=100uv run mkdocs build --strictnpx -y markdownlint-cli2 "AGENTS.md" "ARCHITECTURE.md" "CONTRIBUTING.md" "docs/agents/README.md" "docs/coderabbit/review-commands.md" "docs/engineering/*.md" "docs/operations/deploy-runbook.md" "docs/security/api-security-checklist.md" "docs/workflow/one-day-delivery-plan.md" "docs/workflow/pr-continuity.md"Git Flow target
chore/security-manual-hardeningwhile PR ci: expand CodeQL coverage and tighten repo guardrails #35 remains review-blocked by issue Resolve reviewer-capacity mismatch with protected-branch approval policy #36Summary by CodeRabbit
릴리스 노트
Documentation
Tests