156 lines
14 KiB
Markdown
156 lines
14 KiB
Markdown
# Step 0: Frequency semantic model과 exact 입력 subset
|
|
|
|
> 과거 개발 계획이다. 아래 작업·상태·예시는 현재 실행 지시가 아니다.
|
|
> 현재 구현과 검증 한계는 [기능 요약](../../docs/mitc4-shell-feast-eigen/README.md)을 따른다.
|
|
|
|
- Feature ID: `mitc4-shell-feast-eigen`
|
|
- Input contract revision: `r2`
|
|
- Phase: `mitc4-shell-feast-eigen`
|
|
- Dependency: execution-prep의 실제 completed·registered Stop 성공 및 새 main invocation
|
|
- Requirement IDs: `FEM-REQ-MITC4-EIGEN-001`, `FEM-REQ-MITC4-EIGEN-002`, `FEM-REQ-MITC4-EIGEN-003`, `FEM-REQ-MITC4-EIGEN-004`, `FEM-REQ-MITC4-EIGEN-007`, `FEM-REQ-MITC4-EIGEN-009`, `FEM-REQ-MITC4-EIGEN-015`, `FEM-REQ-MITC4-EIGEN-016`, `FEM-REQ-MITC4-EIGEN-018`, `FEM-REQ-MITC4-EIGEN-024`
|
|
- Logical cases: `MFE-C06`, `MFE-C07`, `MFE-C13`, `MFE-C23`, `MFE-C26`
|
|
- I/O obligations: `IO-T01`, `IO-T02`, `IO-T03`, `IO-T04`, `IO-T10`
|
|
|
|
## 필수 입력과 계약
|
|
|
|
Feature 폴더는 `docs/mitc4-shell-feast-eigen/`다. 아래 current r2 입력을 읽고 기존 완료 Step 코드와 evidence를 대조한다. 연결된 upstream contract는 read-only다.
|
|
|
|
- [AGENTS.md](../../AGENTS.md)
|
|
- [docs/SOLVER_AGENT_DESIGN.md](../../docs/solver-core/README.md)
|
|
- [docs/FEATURE_DOCUMENTATION.md](../../docs/solver-core/README.md)
|
|
- [docs/PRD.md](../../docs/solver-core/README.md)
|
|
- [docs/ARCHITECTURE.md](../../docs/solver-core/README.md)
|
|
- [docs/ADR.md](../../docs/solver-core/README.md)
|
|
- [docs/CODINGSTYLE.md](../../docs/solver-core/README.md)
|
|
- [docs/TOLERANCE.md](../../docs/solver-core/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/FEATURED_AGENTS.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/PRD.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/ADR.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/coordination.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/requirements.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/requirements-evidence.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/research.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/research-evidence.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/formulation.md](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation)
|
|
- [docs/mitc4-shell-feast-eigen/formulation-mass.md](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation-mass)
|
|
- [docs/mitc4-shell-feast-eigen/formulation-eigen.md](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation-eigen)
|
|
- [docs/mitc4-shell-feast-eigen/formulation-verification.md](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation-verification)
|
|
- [docs/mitc4-shell-feast-eigen/formulation-stabilization.md](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation-stabilization)
|
|
- [docs/mitc4-shell-feast-eigen/numerical-review.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/numerical-review-evidence.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/numerical-review-controls.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/numerical-review-cases.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/reference-model.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/io.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/io-input.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/io-schema.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/io-mapping.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/implementation-plan.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/implementation-environment.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/implementation-interfaces.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
- [docs/mitc4-shell-feast-eigen/implementation-verification.md](../../docs/mitc4-shell-feast-eigen/README.md)
|
|
|
|
이 Step의 직접 계약: [io-input.md#i3-density-material-mapping](../../docs/mitc4-shell-feast-eigen/README.md), [io-mapping.md#m1-input에서-equationresult까지](../../docs/mitc4-shell-feast-eigen/README.md), [formulation-eigen.md#e1-조립-단위-scaling과-실제-global-제약](../../docs/mitc4-shell-feast-eigen/formulation.md#formulation-eigen--e1-조립-단위-scaling과-실제-global-제약), [io-input.md](../../docs/mitc4-shell-feast-eigen/README.md), [io-schema.md#o2-metadata-모델과-source-요청](../../docs/mitc4-shell-feast-eigen/README.md), [io-mapping.md#m5-구현test-obligations와-requirement-연결](../../docs/mitc4-shell-feast-eigen/README.md).
|
|
논리 case의 전체 parameter/threshold/음성 inventory는 NR 원문과 [verification mapping](../../docs/mitc4-shell-feast-eigen/README.md)을 함께 적용한다.
|
|
|
|
## Owned paths
|
|
|
|
다음 목록은 phase index `owned_paths`와 exact equality를 유지한다. 목록 밖 파일이 필요하면 보존하고 Coordinator에 반환한다. 다른 agent도 같은 worktree를 사용하므로 타인 변경을 되돌리지 않는다.
|
|
|
|
```json
|
|
[
|
|
"include/fesa/model/model_types.h",
|
|
"include/fesa/model/frequency_step.h",
|
|
"src/fesa/model/frequency_step.cpp",
|
|
"include/fesa/model/domain.h",
|
|
"src/fesa/model/domain.cpp",
|
|
"include/fesa/analysis/analysis_model.h",
|
|
"src/fesa/analysis/analysis_model.cpp",
|
|
"src/fesa/fem/dof_manager.cpp",
|
|
"tests/unit/model/model_types_test.cpp",
|
|
"tests/unit/model/frequency_step_test.cpp",
|
|
"tests/unit/model/domain_test.cpp",
|
|
"tests/unit/analysis/analysis_model_test.cpp",
|
|
"tests/unit/fem/dof_manager_test.cpp",
|
|
"src/fesa/CMakeLists.txt",
|
|
"tests/CMakeLists.txt",
|
|
"include/fesa/io/abaqus/input_syntax.h",
|
|
"src/fesa/io/abaqus/input_reader.cpp",
|
|
"src/fesa/io/abaqus/domain_mapping_context.h",
|
|
"src/fesa/io/abaqus/domain_mapping_context.cpp",
|
|
"tests/unit/io/abaqus/input_syntax_test.cpp",
|
|
"tests/unit/io/abaqus/input_reader_test.cpp",
|
|
"tests/unit/io/abaqus/domain_mapping_context_test.cpp",
|
|
"tests/unit/io/abaqus/frequency_domain_test.cpp",
|
|
"docs/mitc4-shell-feast-eigen/implementation-step0-evidence.md"
|
|
]
|
|
```
|
|
|
|
## 같은 session의 behavior별 TDD
|
|
|
|
각 소단위는 아래 순서로 RED→observed failure→minimal GREEN→focused VERIFY를 완료한다. 마지막 소단위 뒤 full VERIFY를 한 번 수행하고 등록 Stop의 정상 전체검증도 받는다. Missing API의 정확한 compile/link failure는 RED일 수 있으나 configure/dependency 오류는 RED가 아니다. 이미 통과한 test를 새 RED라고 보고하지 않는다.
|
|
|
|
### 1. Density 정의, frequency step과 non-owning 실행 view
|
|
|
|
Symbols: `DensityDefinition, FrequencyStepDefinition, FrequencyStep; Domain::FrequencySteps/Densities; AnalysisModel::IsFrequency/GetFrequencyStep/BoundaryConditions/StepLocation; DofManager::Build/Create`.
|
|
|
|
**RED:** ModelTypes/Domain/AnalysisModel/DofManager tests에 두 material의 서로 다른 rho·t와 frequency-only ModelDefinition을 만든다. FrequencyStep에 요청 N/source options/BC를 보존하고 view의 주소가 Domain storage와 같은지 검사한다. 현재 타입/API 부재의 compile failure 또는 exactly-one-static-step 거부를 관찰한다. Missing/zero/negative/nonfinite active density, multiple/static+frequency step, ambiguous source BC를 각각 거부하고 기존 density 없는 static fixture는 유지한다.
|
|
|
|
**Minimal GREEN:** Density는 material identity에 연결된 Domain-owned composition record로 저장한다. Material base에 가짜 기본 density/no-op capability를 추가하지 않는다. 기존 StaticStepDefinition/StepDefinition API를 유지하면서 별도 FrequencyStep을 소유한다. AnalysisModel은 sole active procedure에 대한 boundary/location view를 제공하고 DofManager의 Step() 직접 접근만 해당 공통 view로 바꾼다. Static legacy constructors/loads/0x0 Kff 의미는 유지한다. Parser·solver·writer는 다음 단계이며 아직 CLI frequency 지원을 주장하지 않는다.
|
|
|
|
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
|
|
|
|
### 2. Density/FREQUENCY exact parser와 원문 보존
|
|
|
|
Symbols: `DataLine::original_line; AbaqusInputReader::Read; DomainMappingContext::Impl/ParseSyntax/FinalizeMaterialProperties/FinalizeStep/Commit`.
|
|
|
|
**RED:** 기존 InputSyntax/InputReader에 spaces·빈 slot·CRLF를 포함한 원 data line 보존 기대값을 먼저 추가한다. FrequencyDomain tests는 원본 input 그대로 729/676/104 nodes/elements/boundary, Step-2/N10, rho2700/t0.5와 exact warnings/source records를 검사하여 현재 FREQUENCY/DENSITY 거부를 관찰한다. 테스트 fixture 안에서만 S4R 변경, density/step/option/field/BC/no-op scope별 양성·음성 입력을 만든다.
|
|
|
|
**Minimal GREEN:** I1~I6의 exact allowlist를 기존 private context의 parse/finalize 책임에 통합한다. 물리 data line 원문을 보존하고 numeric label/lexical identity는 재사용한다. Density의 rho 또는 rho, 한 row만 허용; N은 1~7 fields 첫 양의 checked int64, 나머지 blank. Explicit SIM/acoustic와 source Lanczos의 stable warning을 보존한다. Active density 검사와 source location/category를 연결한다. Static Density subset은 확대하지 않는다.
|
|
|
|
**Focused VERIFY:** 아래 regex 중 해당 suite를 먼저 discovery하여 tests>0을 확인하고 같은 test를 재실행한다. Exact exit와 실패 이유를 behavior별로 기록한다.
|
|
|
|
## Focused 명령
|
|
|
|
Workspace root의 PowerShell에서 실행한다. 초기 missing API RED라면 build의 expected failure를 기록하고 production 구현 후 같은 명령을 다시 실행한다.
|
|
|
|
```powershell
|
|
$env:CMAKE_BUILD_PARALLEL_LEVEL = '1'
|
|
cmake --preset mfe-workspace-msvc-ninja-debug
|
|
cmake --build --preset mfe-workspace-msvc-ninja-debug --target fesa_tests
|
|
ctest --preset mfe-workspace-msvc-ninja-debug -R '^(ModelTypes|FrequencyStep|Domain|AnalysisModel|DofManager|InputSyntax|InputReader|DomainMappingContext|FrequencyDomain|DomainMapper|ShellSurfacePressureDomain)\.' --show-only=json-v1
|
|
ctest --preset mfe-workspace-msvc-ninja-debug -R '^(ModelTypes|FrequencyStep|Domain|AnalysisModel|DofManager|InputSyntax|InputReader|DomainMappingContext|FrequencyDomain|DomainMapper|ShellSurfacePressureDomain)\.' --output-on-failure
|
|
```
|
|
|
|
Configure exit는 항상0이어야 한다. GREEN에서는 위 모든 exit0, discovered selected tests>0, failures0이어야 한다. 각 호출의 `$LASTEXITCODE`를 즉시 기록하고 실패 뒤 후속 명령으로 덮어쓰지 않는다.
|
|
|
|
### 필수 신규 test discovery inventory
|
|
|
|
- `FrequencyStep.MfeC23SemanticOwnership`
|
|
- `FrequencyDomain.MfeC07DensityFailures`
|
|
- `FrequencyDomain.MfeC23ExactReferenceSubset`
|
|
|
|
위 이름 모두를 focused 및 full discovery JSON의 `tests[].name`에서 확인한다. Parameterized 전개가 필요하면 원 obligation→실제 discovered 이름을 evidence에 명시하고 모든 전개 case를 실행한다. 단지 selected count>0이거나 기존 suite만 존재하는 것은 실패다. V2의 해당 독립 oracle/mutation과 이 Step의 behavior assertions를 실제 구현해 각 결과를 기록한다.
|
|
|
|
## Full VERIFY
|
|
|
|
현재 backend는 local user preset `mfe-workspace-msvc-ninja-debug`/MSVC x64 Debug다. 이 Step의 명령을 직접 실행하며 local config/preset과 다른 graph로 fallback하지 않는다.
|
|
|
|
과거 도구 실행·출력 지시는 정리했으며, 현재 검증 방법은 기능 요약을 따른다.
|
|
|
|
전체 discovery의 test count와 실제 실행 count를 대조하고 skipped/missing/unobserved를 성공으로 합치지 않는다. 기존 target의 `/W4 /WX`를 유지하고 새 compiler/link warning0을 확인한다. 등록 Stop의 전체 검증은 그대로 수행되며 수동 hook 실행·state/reentry 조작으로 대체하지 않는다. Step 0에서 영향받는 C++ binary가 바뀌면 기존 reference helper의 cache 재사용 여부와 실제 solve 호출을 구분한다. 최종 fresh portfolio의 권위는 Step 7이다.
|
|
|
|
## Evidence와 종료
|
|
|
|
- `../../docs/mitc4-shell-feast-eigen/README.md`
|
|
|
|
이 Step의 evidence에는 Feature/owner/r2, exact owned changed paths, RED→GREEN 명령·actual exits·기간·핵심 수치, focused/full counts, MSVC/x64/Debug/dependency/runtime selection, warning 수, upstream case/requirement 연결, 미실행 및 residual risk를 기록한다. Raw logs는 Git ignored 과거 검증 자료(정리됨)에 보존한다. 각 CTest 호출 직후 해당 `Testing/Temporary/LastTest.log`를 고유 RED/focused/full 이름으로 복사하여 이후 Stop 로그와 섞지 않는다. Binary/reference/result hash와 run freshness는 적용되는 경우 기록한다.
|
|
|
|
보고서 작성 시점에는 마지막 registered Stop/Codex exit가 아직 발생하지 않을 수 있다. Implementation은 실제 완료된 manual 검증과 미관찰 Stop을 구분하고 미래 성공을 선기록하지 않는다. `completed` payload는 그 자체로 Stop 성공 증거가 아니다. Executor 종료 뒤 Coordinator가 raw output·등록 Hook evidence·actual exit를 management 문서에서 사후 감사한다. Specialist 보고서 본문은 Coordinator가 대신 수정하지 않는다.
|
|
|
|
Manual AC가 성공하면 Executor가 허용한 `phases/mitc4-shell-feast-eigen/index.json`의 **현재 Step 0만** `status=completed`와 비어 있지 않은 `summary`를 기록한다. 구현/검증 실패는 `error/error_message`, 환경·필수 준비 차단은 `blocked/blocked_reason`이다. `owned_paths`, 이름/번호, 다른 Step/top index, timestamp, attempt_history는 수정하지 않는다. `step0-output.json`은 Executor 생성 기록이며 ignored 상태를 유지한다. 마지막 응답은 공통 handoff envelope다. Phase 전체 또는 workflow gate의 자기 승인은 하지 않는다.
|
|
|
|
## 제외와 중단 조건
|
|
|
|
Physics/formulation/I/O/tolerance/원본 reference·기존 feature 보고서 변경, 외부 solver, spectrum fitting, eigen 외부 vector/frequency/stress gate, sparse rank cutoff, sandbox 확대, retry-budget 변경, Git branch/commit/push/tag/release는 소유 범위 밖이다. 명백한 구현 결함은 이 exact scope 안에서 최소 수정한다. 계약 결함은 정확한 owner로 `return-upstream`, 실행 환경 실패는 actual command/exit와 함께 Coordinator로 반환한다. 동일 실패를 transport timeout으로 가장하거나 evidence를 지우고 재실행하지 않는다.
|