docs(phases): add harness self-test bootstrap step
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Step 2: Core IDs and Diagnostics
|
||||
# Step 2: Dependency Smoke Tests
|
||||
|
||||
## 읽어야 할 파일
|
||||
|
||||
@@ -6,67 +6,50 @@
|
||||
- `/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`
|
||||
- `/include/fesa/core/version.hpp`
|
||||
|
||||
이전 step의 CMake target과 preset을 그대로 확장하라.
|
||||
|
||||
## 작업
|
||||
|
||||
외부 라이브러리에 의존하지 않는 `core` 값 타입을 TDD로 구현한다.
|
||||
사전 설치된 oneMKL, oneTBB, HDF5 C API, GoogleTest/GoogleMock을 CMake imported
|
||||
target으로 찾고 링크 계약을 검증한다.
|
||||
|
||||
- 생성 파일:
|
||||
`include/fesa/core/entity_id.hpp`, `vec3.hpp`, `source_location.hpp`,
|
||||
`diagnostic.hpp`, `status.hpp`와 대응 테스트
|
||||
- 인터페이스:
|
||||
|
||||
```cpp
|
||||
template<class Tag>
|
||||
class EntityId final {
|
||||
public:
|
||||
explicit constexpr EntityId(std::int64_t value);
|
||||
[[nodiscard]] constexpr std::int64_t value() const noexcept;
|
||||
auto operator<=>(const EntityId&) const = default;
|
||||
};
|
||||
|
||||
struct Vec3 final { double x; double y; double z; };
|
||||
struct SourceLocation final {
|
||||
std::filesystem::path file;
|
||||
std::size_t line;
|
||||
std::size_t column;
|
||||
};
|
||||
enum class DiagnosticStage { io, syntax, semantic, model, equation, solver, results, validation };
|
||||
enum class Severity { warning, error };
|
||||
struct Diagnostic final {
|
||||
DiagnosticStage stage;
|
||||
Severity severity;
|
||||
std::string code;
|
||||
std::string message;
|
||||
std::optional<SourceLocation> source;
|
||||
};
|
||||
```
|
||||
|
||||
- typed ID의 잘못된 암시 변환, 음수 ID, nonfinite vector와 diagnostic source 보존을
|
||||
실패 테스트로 먼저 고정한다.
|
||||
- `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으로 보고한다.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
```powershell
|
||||
cmake --preset windows-debug
|
||||
cmake --build --preset windows-debug
|
||||
ctest --preset windows-debug -R "Core|Diagnostic|EntityId" --output-on-failure
|
||||
ctest --preset windows-debug -R DependencySmoke --output-on-failure
|
||||
ctest --preset windows-debug --output-on-failure
|
||||
```
|
||||
|
||||
네 의존성을 실제 호출하는 smoke test가 통과해야 하며 새 MSVC 경고가 없어야 한다.
|
||||
|
||||
## 검증 절차
|
||||
|
||||
1. production header 전에 실패하는 GoogleTest를 작성한다.
|
||||
2. 최소 값 타입만 구현한다.
|
||||
3. focused test와 전체 CTest를 실행한다.
|
||||
4. `core`가 MKL, TBB, HDF5, Abaqus header를 include하지 않는지 확인한다.
|
||||
5. index와 summary를 갱신한다.
|
||||
1. smoke test를 먼저 추가하고 link 또는 실행 실패를 확인한다.
|
||||
2. dependency discovery와 target link만 최소 수정한다.
|
||||
3. 전체 configure/build/test를 새로 실행한다.
|
||||
4. 성공 시 정확한 imported target과 탐색 파일을 summary에 기록한다.
|
||||
5. 패키지나 MSVC가 없으면 세 차례 임의 수정하지 말고 `blocked`로 종료한다.
|
||||
|
||||
## 금지사항
|
||||
|
||||
- 단위 변환 시스템을 만들지 마라. 이유: FESA는 일관 단위계만 사용한다.
|
||||
- 범용 reflection이나 serialization을 만들지 마라. 이유: 요구되지 않았다.
|
||||
- equation ID를 정의하지 마라. 이유: `DofManager` 단계의 책임이다.
|
||||
- FetchContent, vcpkg, Conan 또는 다운로드를 추가하지 마라. 이유: ADR-002 위반이다.
|
||||
- vendor 절대경로를 public header에 노출하지 마라. 이유: backend 격리를 깨뜨린다.
|
||||
- solver 기능을 구현하지 마라. 이유: 이 step은 build dependency 계약만 다룬다.
|
||||
|
||||
Reference in New Issue
Block a user