Skip to content

docs: add canonical engineering truth sources - #38

Merged
seonghobae merged 1 commit into
chore/security-manual-hardeningfrom
chore/canonical-engineering-docs
Apr 10, 2026
Merged

docs: add canonical engineering truth sources#38
seonghobae merged 1 commit into
chore/security-manual-hardeningfrom
chore/canonical-engineering-docs

Conversation

@seonghobae

@seonghobae seonghobae commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add repository-local AGENTS/ARCHITECTURE and a canonical engineering docs set for execution, review, runtime-data, harness, workflow, and security guidance
  • align CONTRIBUTING with the new maintainer truth sources and add a deploy runbook that matches the real tag/manual-dispatch release trigger
  • add regression tests that fail when canonical docs disappear or drift away from review, runtime-data, and release/security expectations

Verification

  • uv run pytest tests/test_engineering_canonical_docs.py -q
  • uv run pytest --cov=src/newsdom_api --cov-branch --cov-report=term-missing --cov-fail-under=100
  • uv run mkdocs build --strict
  • npx -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

Summary by CodeRabbit

릴리스 노트

  • Documentation

    • 저장소 거버넌스 및 엔지니어링 가이드라인을 위한 포괄적인 문서 추가 (AGENTS.md, ARCHITECTURE.md, 배포 절차, 보안 체크리스트, 리뷰 정책 포함)
    • 기여자 및 유지보수자 워크플로우 관련 문서 확장
  • Tests

    • 필수 엔지니어링 문서의 존재 및 콘텐츠 검증을 위한 테스트 추가

@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
📝 Walkthrough

워크스루

저장소에 대한 AI 에이전트 지침, 아키텍처 설명, 엔지니어링 정책 및 운영 절차를 정의하는 포괄적인 설명서와 검증 테스트를 추가합니다. 기존 CONTRIBUTING.md를 업데이트하여 새로운 문서를 참조하고, 표준 문서 파일 존재를 검증하는 새로운 테스트 모듈을 추가합니다.

변경사항

코호트 / 파일(s) 요약
에이전트 및 아키텍처 개요
AGENTS.md, ARCHITECTURE.md
저장소 구조, Git Flow 모델, 검증 명령어, 기본 설정 및 배포 규칙을 정의하는 최상위 지침 문서를 추가합니다.
엔지니어링 정책 및 제어
docs/engineering/canonical-docs.md, docs/engineering/acceptance-criteria.md, docs/engineering/execution-policy.md, docs/engineering/review-policy.md, docs/engineering/harness-engineering.md, docs/engineering/runtime-data-policy.md, docs/engineering/skills-subagents-mcp.md
코드 검토 노력, 승인 기준, 실행 정책, 검증 하네스, 런타임 데이터 처리, 하위 에이전트 및 도구 지침을 정의하는 7개의 엔지니어링 정책 문서를 추가합니다.
워크플로 및 운영
docs/workflow/one-day-delivery-plan.md, docs/workflow/pr-continuity.md, docs/operations/deploy-runbook.md, docs/coderabbit/review-commands.md, docs/agents/README.md
배포 실행 계획, PR 연속성, 배포 검증 실행서 및 CodeRabbit 명령어 지침을 추가합니다.
보안 정책
docs/security/api-security-checklist.md
FastAPI 엔드포인트 보안 검사 목록을 추가하여 업로드/오류 처리/설명서 엔드포인트를 포함합니다.
문서 참조 및 테스트
CONTRIBUTING.md, tests/test_engineering_canonical_docs.py
CONTRIBUTING.md를 업데이트하여 새로운 설명서를 참조하고, 필수 문서 파일 존재 및 콘텐츠 검증을 위한 9개의 pytest 테스트를 추가합니다.

예상 코드 검토 노력

🎯 2 (단순) | ⏱️ ~10분

관련 가능성 있는 PR

  • PR #2: 동일한 품질 게이트 CI/워크플로(100% 커버리지), 소스 모듈 문서열 채우기, 동일한 파일 및 함수를 대상으로 하는 테스트와 도구 변경사항을 공유합니다.

🐰 저장소의 길을 밝히는 빛,
문서와 정책으로 에이전트를 인도하리,
표준이 실행을 통일할 때,
검증과 신뢰의 여정이 펼쳐지네. ✨
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the primary change: adding canonical engineering truth source documentation files to the repository.
Description check ✅ Passed The PR description includes all required template sections: summary detailing the changes, Git Flow target explaining the stacked follow-up context, and verification steps with specific commands.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/canonical-engineering-docs

Comment @coderabbitai help to get the list of available commands and usage tips.

@seonghobae

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 10, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 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.tagson.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

📥 Commits

Reviewing files that changed from the base of the PR and between a9d0ebb and 1d263a8.

📒 Files selected for processing (17)
  • AGENTS.md
  • ARCHITECTURE.md
  • CONTRIBUTING.md
  • docs/agents/README.md
  • docs/coderabbit/review-commands.md
  • docs/engineering/acceptance-criteria.md
  • docs/engineering/canonical-docs.md
  • docs/engineering/execution-policy.md
  • docs/engineering/harness-engineering.md
  • docs/engineering/review-policy.md
  • docs/engineering/runtime-data-policy.md
  • docs/engineering/skills-subagents-mcp.md
  • docs/operations/deploy-runbook.md
  • docs/security/api-security-checklist.md
  • docs/workflow/one-day-delivery-plan.md
  • docs/workflow/pr-continuity.md
  • tests/test_engineering_canonical_docs.py

@seonghobae
seonghobae merged commit 70383e4 into chore/security-manual-hardening Apr 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant