# Build/Test Report 문서 작성 가이드 이 디렉터리는 Build/Test Executor Agent가 작성하거나 제안하는 기능별 build/test 실행 리포트를 보관하는 위치다. Build/Test Executor Agent는 Implementation Agent 이후 독립적으로 Fortran no-Abaqus validation, reference artifact validation, workspace validation을 실행하고, 실패를 분류해 다음 agent로 handoff한다. 이 agent는 source code, tests, requirements, formulations, I/O contracts, reference artifacts, tolerance policies를 수정하지 않는다. build artifacts와 test outputs는 `build/` 아래 생성될 수 있다. 기본 문서명은 `docs/build-test-reports/-build-test.md` 형식을 사용한다. ## Build/Test Executor Agent 역할 수행한다: - `python scripts/validate_workspace.py`를 기본 검증 명령으로 실행한다. - implementation plan/report에 명시된 경우 harness self-test와 feature-specific CTest를 실행한다. - `HARNESS_VALIDATION_COMMANDS`, `CMakePresets.json`의 `msvc-debug`, 기본 CMake/MSVC x64 Debug 경로 중 어떤 검증 경로가 사용되었는지 기록한다. - configure, compile, link, test, reference-comparison, harness, environment, upstream-contract 실패를 구분한다. - command, exit code, duration, stdout/stderr tail, failed test name을 요약한다. - 실패 원인에 따라 Implementation Agent, Correction Agent, Reference Verification Agent, Implementation Planning Agent 중 handoff 대상을 제안한다. 수행하지 않는다: - source code를 수정하지 않는다. - tests를 수정하지 않는다. - CMake files를 수정하지 않는다. - requirements, formulations, I/O contracts, reference artifacts, tolerance policies를 수정하지 않는다. - Abaqus 해석을 직접 실행하지 않는다. - reference CSV를 생성하지 않는다. - release readiness, reference tolerance success, physics validation success를 승인하지 않는다. - 최종 reference verification report를 작성하지 않는다. ## 실행 순서 기본 순서는 implementation plan/report에 따라 다음 중 필요한 항목만 실행한다. ```powershell python -m unittest discover -s scripts -p "test_*.py" python scripts/validate_fortran.py python scripts/validate_reference_artifacts.py ctest -C Debug -R python scripts/validate_workspace.py ``` `scripts/validate_workspace.py`의 command discovery 우선순위는 다음과 같다. 1. `HARNESS_VALIDATION_COMMANDS` 2. `CMakePresets.json`의 `msvc-debug` 3. 기본 CMake/MSVC x64 Debug 명령 4. `CMakeLists.txt`가 없고 override도 없으면 안내 메시지와 함께 성공 종료 For Abaqus UserSubroutine work, workspace validation also supports: - `HARNESS_FORTRAN_VALIDATION=off|detect|auto|compile` - `HARNESS_FORTRAN_COMPILER=auto|ifx|ifort` - `HARNESS_ONEAPI_VARS_BAT=` - `HARNESS_ABAQUS_VALIDATION=off|detect|run` - `HARNESS_ABAQUS_COMMAND=` - `HARNESS_ABAQUS_VALIDATION_COMMANDS=` - `HARNESS_ABAQUS_USE_ONEAPI_ENV=auto|on|off` Default validation does not run Abaqus jobs. Solver-result evidence must come from externally generated ODB-extracted CSV artifacts. 기본 CMake/MSVC x64 Debug 명령은 다음과 같다. ```powershell cmake -S . -B build/msvc-debug -G "Visual Studio 17 2022" -A x64 cmake --build build/msvc-debug --config Debug ctest --test-dir build/msvc-debug --output-on-failure -C Debug ``` ## 문서 템플릿 ```markdown # Build/Test Report ## Metadata - feature_id: - source_implementation_report: - source_implementation_plan: docs/implementation-plans/-implementation-plan.md - status: pass-for-reference-verification | needs-correction | needs-environment-fix | needs-upstream-decision | blocked - owner_agent: build-test-executor-agent - date: ## Execution Environment - os: - generator: Visual Studio 17 2022 | - platform: x64 | - config: Debug | - build_dir: build/msvc-debug | - active_override_env_vars: HARNESS_VALIDATION_COMMANDS | HARNESS_CMAKE_GENERATOR | HARNESS_CMAKE_PLATFORM | HARNESS_CMAKE_CONFIG | HARNESS_BUILD_DIR | none - command_discovery_path: HARNESS_VALIDATION_COMMANDS | CMakePresets.json msvc-debug | default CMake/MSVC x64 Debug | no-CMake informational success ## Command Log Summary | order | command | exit_code | duration | stdout_stderr_tail | | --- | --- | --- | --- | --- | | 1 | python -m unittest discover -s scripts -p "test_*.py" | | | | | 2 | ctest -C Debug -R | | | | | 3 | python scripts/validate_workspace.py | | | | ## Validation Results | validation_stage | result | evidence | | --- | --- | --- | | harness self-test | pass | fail | skipped | | | configure | pass | fail | skipped | | | build | pass | fail | skipped | | | CTest | pass | fail | skipped | | | feature-specific tests | pass | fail | skipped | | ## Failure Classification - classification: configure | compile | link | test | reference-comparison | harness | environment | upstream-contract | N/A - primary_failure: - first_failed_command: - evidence_tail: ## Failed Test Inventory | test_name | label | command | failure_summary | | --- | --- | --- | --- | | |