docs(phases): add harness self-test bootstrap step

This commit is contained in:
KOKO\Mimi
2026-07-29 23:34:10 +09:00
parent f5379472ce
commit b0ab8e77d5
6 changed files with 194 additions and 112 deletions
+37 -27
View File
@@ -1,55 +1,65 @@
# Step 1: Dependency Smoke Tests
# Step 1: CMake Project Scaffold
## 읽어야 할 파일
먼저 아래 파일을 모두 읽고 저장소 계약을 파악하라.
- `/AGENTS.md`
- `/docs/PRD.md`
- `/docs/ARCHITECTURE.md`
- `/docs/ADR.md`
- `/docs/HARNESS.md`
- `/docs/superpowers/plans/2026-07-29-fesa-phase-1.md`
- `/CMakeLists.txt`
- `/CMakePresets.json`
- `/cmake/FesaDependencies.cmake`
- `/.harness/config.json`
- `/tests/CMakeLists.txt`
이전 step의 CMake target과 preset을 그대로 확장하라.
- `/.harness/config.example.json`
- `/tests/harness/test_config.py`
- `/tests/harness/test_discovery.py`
- `/tests/harness/test_process.py`
## 작업
사전 설치된 oneMKL, oneTBB, HDF5 C API, GoogleTest/GoogleMock을 CMake imported
target으로 찾고 링크 계약을 검증한다.
C++20/MSVC x64 프로젝트의 최소 실행 가능한 build/test 뼈대를 만든다.
- `tests/unit/dependencies/dependency_smoke_test.cpp`를 먼저 작성한다.
- 테스트는 MKL의 작은 vector 연산, TBB의 제한된 parallel loop, HDF5 임시 파일
생성·닫기, GoogleTest 실행을 확인한다.
- `FesaDependencies.cmake` `MKL::MKL`, TBB imported target, HDF5 C target,
GoogleTest target을 제공해야 한다.
- oneMKL은 LP64, dynamic link, TBB threading 조합을 사용한다.
- runtime DLL 또는 architecture 불일치는 configure diagnostic으로 보고한다.
- `CMakeLists.txt`, `CMakePresets.json`, `cmake/FesaDependencies.cmake`,
`.harness/config.json`, `tests/CMakeLists.txt`를 만든다.
- 실제 target은 `fesa_core` 정적 라이브러리와 `fesa` CLI 두 개만 만든다.
- `include/fesa/core/version.hpp`, `src/fesa/core/version.cpp`,
`src/fesa/cli/main.cpp`에 다음 계약을 구현한다.
```cpp
namespace fesa {
[[nodiscard]] std::string_view version() noexcept;
}
```
- CLI는 이 step에서 `fesa --version`만 처리한다.
- 먼저 `VersionCommand` CTest를 등록해 실패를 확인한 뒤 최소 구현한다.
- `windows-debug`, `windows-release` configure/build/test preset을 정의한다.
- build 산출물은 `out/build/<preset>` 아래에만 둔다.
- MSVC가 아니거나 x64가 아니면 configure 단계에서 명확히 실패시킨다.
## Acceptance Criteria
```powershell
uv run --with pytest python -m pytest -v -rs
cmake --preset windows-debug
cmake --build --preset windows-debug
ctest --preset windows-debug -R DependencySmoke --output-on-failure
ctest --preset windows-debug -R VersionCommand --output-on-failure
ctest --preset windows-debug --output-on-failure
```
네 의존성을 실제 호출하는 smoke test가 통과해야 하며 새 MSVC 경고가 없어야 한다.
`fesa --version`은 비어 있지 않은 FESA 버전을 출력하고 종료 코드 0을 반환해야 한다.
CTest는 0개가 아니어야 한다.
## 검증 절차
1. smoke test를 먼저 추가하고 link 또는 실행 실패를 확인한다.
2. dependency discovery와 target link만 최소 수정한다.
3. 전체 configure/build/test를 새로 실행한다.
4. 성공 시 정확한 imported target과 탐색 파일을 summary에 기록한다.
5. 패키지나 MSVC가 없으면 세 차례 임의 수정하지 말고 `blocked`로 종료한다.
1. 테스트가 구현 전 실패하는 것을 확인한다.
2. Acceptance Criteria 명령을 새로 실행한다.
3. MSVC/C++20/x64와 산출물 경로를 확인한다.
4. 성공 시 index의 step을 `completed`로 바꾸고 생성 파일을 summary에 기록한다.
5. 도구가 없으면 자동 설치하지 말고 `blocked`와 정확한 누락 항목을 기록한다.
## 금지사항
- FetchContent, vcpkg, Conan 또는 다운로드를 추가하지 마라. 이유: ADR-002 위반다.
- vendor 절대경로를 public header에 노출하지 마라. 이유: backend 격리를 깨뜨린다.
- solver 기능을 구현하지 마라. 이유: 이 step은 build dependency 계약만 다룬다.
- 외부 패키지를 다운로드하지 마라. 이유: 사전 설치 의존성 정책을 위반다.
- MKL, TBB, HDF5 기능을 구현하지 마라. 이유: 다음 step의 독립 범위다.
- 빈 미래 모듈을 만들지 마라. 이유: Phase 1 최소 실체화 원칙을 위반한다.