Files
2026-06-11 11:08:44 +09:00

71 lines
3.2 KiB
Markdown

# Step 6: tdd-tests
## Read First
- `/AGENTS.md`
- `/docs/ABAQUS_SUBROUTINE_AGENT_DESIGN.md`
- `/docs/ARCHITECTURE.md`
- `/docs/ADR.md`
- `/.codex/skills/abaqus-fortran-tdd/SKILL.md`
- `/docs/requirements/uel-3d-euler-beam.md`
- `/docs/formulations/uel-3d-euler-beam.md`
- `/docs/io-definitions/uel-3d-euler-beam.md`
- `/docs/reference-models/uel-3d-euler-beam.md`
## Task
Create the no-Abaqus Fortran test files and manifest entries required before production Fortran implementation.
Use the exact paths and test names approved in `/docs/reference-models/uel-3d-euler-beam.md`. If that document is missing exact paths, mark this step `blocked` and explain the missing contract.
Expected files should include, unless the reference model document chooses better names:
- `/tests/fortran/test_uel_3d_euler_beam_stiffness.f90`
- `/tests/fortran/test_uel_3d_euler_beam_transform.f90`
- `/tests/fortran/test_uel_3d_euler_beam_invalid_inputs.f90`
- `/tests/fortran/manifest.json`
Write tests before implementation. The tests must encode the accepted formulation and interface contract, including:
- Local stiffness matrix numerical checks.
- Matrix symmetry.
- Basic rigid-body mode or rank sanity where practical.
- Orientation transform checks.
- Invalid length, invalid orientation, and non-positive property checks.
- Wrapper mapping checks if the interface contract defines a no-Abaqus wrapper test.
Run RED evidence. Because production source may not exist yet, the expected RED result is a compile/link failure or targeted failing assertion caused by missing/unimplemented production code. Record the RED command and failure reason in `/docs/build-test-reports/uel-3d-euler-beam-red.md`.
Do not implement production Fortran in this step except for the minimum non-production test scaffolding needed to express the tests. Do not weaken tests to make RED easier.
## Tests To Write First
- `/tests/fortran/test_uel_3d_euler_beam_stiffness.f90`
- `/tests/fortran/test_uel_3d_euler_beam_transform.f90`
- `/tests/fortran/test_uel_3d_euler_beam_invalid_inputs.f90`
- `/tests/fortran/manifest.json` entry or entries for the above tests.
## Acceptance Criteria
```bash
python -m unittest discover -s scripts -p "test_*.py"
python scripts/validate_reference_artifacts.py
python scripts/validate_fortran.py
python scripts/validate_workspace.py
```
For this RED step, `python scripts/validate_fortran.py` may fail only for the expected missing/unimplemented production code reason. The step must still run the Python script tests and reference artifact validation successfully. Record exact RED evidence in `/docs/build-test-reports/uel-3d-euler-beam-red.md`.
## Validation Notes
- If no Intel Fortran compiler is available, use `HARNESS_FORTRAN_VALIDATION=detect` only to record compiler detection evidence, then mark the step `blocked` if RED compile evidence cannot be produced.
- Update `/phases/uel-3d-euler-beam/index.json` step 6 with `completed`, `error`, or `blocked` and a concrete summary or reason.
## Forbidden
- Do not add JavaScript/TypeScript/npm fallback.
- Do not run Abaqus analyses from this project.
- Do not generate reference CSVs.
- Do not create production Fortran implementation.
- Do not break existing Python harness tests.