12 KiB
Nonlinear Static Newton-Raphson Correction Report
1. Metadata
| key | value |
|---|---|
| feature_id | nonlinear-static-newton-raphson |
| source failure report | docs/nonlinear-static-newton-raphson/coordination.md; phases/nonlinear-static-newton-raphson/step0-output.json |
| source implementation plan | docs/nonlinear-static-newton-raphson/implementation-plan.md |
| status | corrected-for-implementation-rerun |
| owner_agent | correction-agent |
| date | 2026-08-24 |
implementation-report.md, build-test.md, reference-comparison.md는 아직 생성되지 않았으므로 현재 Coordinator failure evidence와 Executor의 step0-output.json을 source failure report로 사용했다.
Sections 2-6의 Codex 0.147.0 내용은 initial correction history이며, current REWORK-004 status와 증거는 Sections 7-9가 supersede한다.
2. Failure Triage
-
classification:
harness -
normalized classification:
harness-nested-codex-windows-shell-tool-execution-hang -
first failed command:
codex exec --json --model gpt-5.6-terra --config 'model_reasoning_effort="xhigh"' --sandbox workspace-write --dangerously-bypass-hook-trust --cd C:\git\FESADev\.worktrees\nonlinear-static-newton-raphson - -
failed target or test: nested shell smoke
cmd.exe /d /c echo CODEX_SHELL_SMOKE_OK -
evidence tail: baseline diagnostic는 45초 안에 종료되지 않았다. JSONL에는
item.started,type=command_execution,status=in_progress가 기록됐지만 대응하는 completion event와CODEX_SHELL_SMOKE_OK출력이 없었다. 진단 root PID11292와 관찰된 descendant PID tree를taskkill /PID 11292 /T /F로 종료한 뒤remainingPids=[]를 확인했다. -
historical evidence:
step0-output.json도 exit code124, stderrCodex timed out after 1800 seconds.를 기록했고Get-Date,cmd.exe /d /c echo test,exit 0등의 nested command가status=in_progress에 머물렀다.
3. Root Cause Summary
실패 경계는 repaired Python Executor의 timeout/retry 처리나 FESA C++ 구현이 아니라 local codex-cli 0.147.0의 nested command execution runtime이다. 같은 worktree에서 direct PowerShell과 cmd.exe는 정상 실행되고, focused Harness Python test도 통과하며, runner-equivalent Codex baseline만 nested shell completion을 반환하지 않았다.
Local CLI help는 --disable <FEATURE>와 --enable <FEATURE>를 문서화하고, codex features list는 code_mode_host를 stable true, shell_tool을 stable true, unified_exec를 stable false, hooks를 stable true로 보고했다. 다음 좁은 가설을 한 변수씩 검사했다.
| variant | result | command completion evidence |
|---|---|---|
| baseline | 45.318초 timeout 후 exact PID tree cleanup | item.started/status=in_progress; completion 및 echo output 없음 |
--disable code_mode_host |
exit 0, 33.322초 |
shell 미실행; stderr code-mode host is disabled; completion event 없음 |
--enable unified_exec |
45.299초 timeout 후 exact PID tree cleanup | completion event 및 echo output 없음 |
--disable code_mode_host --enable unified_exec |
exit 0, 25.922초 |
shell 미실행; 동일한 fail-closed host-disabled error |
따라서 --disable code_mode_host는 shell execution을 복구하지 않고 tool host를 fail-closed로 제거한다. unified_exec도 단독 또는 조합에서 실제 shell completion을 만들지 못했다. Codex 내부 결함의 더 세부 원인은 repository evidence로 확정할 수 없으며, 안전한 documented runner flag workaround는 입증되지 않았다. 이는 implementation defect, test defect 또는 CMake registration issue가 아니라 external Codex runtime blocker다.
4. Correction Scope
- changed source files:
scripts/execute.py(codex execargv에 adjacent--disable,unified_exec추가) - changed header files: 없음
- changed test files:
tests/test_execute.py(Implementation Agent command contract regression assertion 추가) - changed CMake files: 없음
- changed report files:
docs/nonlinear-static-newton-raphson/corrections.md - excluded upstream contract files:
requirements.md,research.md,formulation.md,numerical-review.md,reference-model.md,io.md,implementation-plan.md - excluded artifacts/policies: phase definition/index, production C++, reference inputs/CSV,
docs/TOLERANCE.md
초기 correction cycle에서는 safe workaround가 입증되지 않아 runner/test를 변경하지 않았다. 이후 user/root가 Codex 0.149.1의 bounded smoke로 --disable unified_exec runtime envelope를 입증했고, REWORK-004에서 그 pair만 TDD로 추가했다. 기존 Harness-repair 변경과 다른 owner의 dirty-worktree 변경은 그대로 보존했다.
5. Verification Evidence
| purpose | command | result |
|---|---|---|
| installed CLI | codex --version |
exit 0; codex-cli 0.147.0 |
| documented options | codex exec --help; codex features list |
exit 0; --enable/--disable, code_mode_host, unified_exec, shell_tool, hooks 확인 |
| targeted reproduction | runner-equivalent codex exec ... --sandbox workspace-write ... + one echo tool request |
45초 timeout; command started, completion/output 없음; exact tree cleanup 후 remaining PID 0 |
| focused Harness Python | uv run --with pytest python -m pytest -v -rs tests/test_execute.py |
exit 0; 10 passed |
| full Harness Python | uv run --with pytest python -m pytest -v -rs |
exit 1; 23 passed, 1 failed |
| MSVC Debug build | cmake --build .harness/build --config Debug |
exit 0; solver/CLI/unit/integration/reference targets built |
| CTest discovery | ctest --test-dir .harness/build -C Debug --show-only=json-v1 |
exit 0; 214 tests discovered |
| full CTest | ctest --test-dir .harness/build -C Debug --output-on-failure |
exit 0; 214/214 passed |
.harness/config.json은 없었다. Existing .harness/build/CMakeCache.txt는 Visual Studio 18 2026, x64, approved local GoogleTest/MKL/TBB/HDF5 paths를 사용하므로 Harness auto-detected build tree를 재사용했다.
Full Python failure는 pre-existing out-of-scope contract mismatch다: test_agent_toml_and_limited_skill_yaml_schemas_are_parseable가 actual xhigh와 expected extra high를 비교한다. Dispatch 지시에 따라 이 test, AGENTS.md, agent profile을 변경하지 않았다.
Stop hook은 Harness Step 실행을 금지한 이번 correction session에서 별도 Codex Step 종료 evidence를 생성하지 않았다. Hook entry point의 수동 실행은 project contract가 금지하므로 대신 config-resolved full MSVC build와 full CTest를 직접 실행해 결과를 위에 기록했다.
6. Traceability
| requirement id | task id | test id | failing command | corrected file | acceptance criterion |
|---|---|---|---|---|---|
FESA-REQ-NSNR-083 |
Step 0 cli-output-lease-and-derived-names |
CORR-HARNESS-SMOKE-001 |
runner-equivalent codex exec invoking cmd.exe /d /c echo CODEX_SHELL_SMOKE_OK |
없음 | workspace-write, hooks, gpt-5.6-terra/xhigh, no-push, no danger-full-access를 유지한 실제 shell completion과 exact echo output; 실패 |
FESA-REQ-NSNR-083 |
Step 0 cli-output-lease-and-derived-names |
CORR-HARNESS-SMOKE-002 |
same smoke with --disable code_mode_host |
없음 | shell completion 복구; 실패 (code-mode host is disabled) |
Runner correction acceptance criterion이 충족되지 않았으므로 Implementation Step 0의 NSNR-CLI-* RED/GREEN은 시작되지 않았고 Step 0 status는 pending으로 유지된다.
7. Handoff Recommendation
- recommendation: Coordinator Agent를 통해 Implementation Agent에
needs-implementation-rerun요청. - corrected runner contract: nested command는
codex exec --disable unified_exec --json ...순서로 실행된다. - preserved execution contract: Coordinator가 관리하는 rerun launch environment는 Codex
0.149.1, alignedCODEX_HOME, approved WindowsApps PATH filtering,workspace-write, project hooks,gpt-5.6-terra,xhigh, no-push, nodanger-full-access를 유지해야 한다. - scope boundary: 이 correction은 runner option gate만 복구했다. Harness phase, Implementation Step 0, reference comparison 또는 physics success를 주장하지 않는다.
8. Stop Condition
- repeated failure: normalized classification attempt
2는 초기 Codex0.147.0failure history로 보존한다. - external mitigation: user/root의 Codex
0.149.1bounded smoke와DECISION-038이 새 좁은 runner correction을 승인했다. - correction result: required adjacent
--disable unified_execpair와 regression test가 GREEN이다. - residual blocker: runner correction 자체 blocker는 없음. Full Python suite의 pre-existing
xhighactual 대extra highexpected mismatch는 변경하지 않았다. - upstream ambiguity/reference artifact gap: 없음; reference artifact는 읽기/수정/생성하지 않았다.
- final stop: correction-owned edits와 검증이 끝났으므로 여기서 중단하고, phase rerun 판단과 실행은 Coordinator/Implementation Agent에 반환한다.
9. REWORK-004 TDD And Verification Evidence
Failure and Minimal Correction
- classification:
harness - implementation defect: Codex
0.149.1에서 통과한 runtime envelope의--disable unified_execoption을scripts/execute.py가 nestedcodex exec에 전달하지 않았다. - RED test:
test_invoke_codex_uses_implementation_agent_command_contract - minimal GREEN: command vector에서
"codex", "exec"바로 뒤에"--disable", "unified_exec"두 argument만 추가했다. - preserved behavior:
workspace-writedefault/validated override,--dangerously-bypass-hook-trust,gpt-5.6-terra,model_reasoning_effort="xhigh", 1800-second structured timeout, no-push default,danger-full-access비사용 정책은 변경하지 않았다.
RED / GREEN / VERIFY
| stage | command | exit | duration | evidence tail |
|---|---|---|---|---|
| RED | uv run --with pytest python -m pytest -v -rs tests/test_execute.py::test_invoke_codex_uses_implementation_agent_command_contract |
1 |
1.2초 | assert ('--disable', 'unified_exec') in adjacent_arguments; 1 failed |
| GREEN | same targeted command | 0 |
1.1초 | 1 passed |
| focused VERIFY | uv run --with pytest python -m pytest -v -rs tests/test_execute.py |
0 |
1.1초 | 10 passed |
| full Harness Python | uv run --with pytest python -m pytest -v -rs |
1 |
1.3초 | 23 passed, 1 pre-existing failure |
| MSVC Debug build | cmake --build .harness/build --config Debug |
0 |
3.8초 | solver/CLI/unit/integration/reference targets built |
| CTest discovery | ctest --test-dir .harness/build -C Debug --show-only=json-v1 |
0 |
0.7초 | 214 tests discovered |
| full CTest | ctest --test-dir .harness/build -C Debug --output-on-failure |
0 |
10.2초 | 214/214 passed |
Full Python failure는 기존 test_agent_toml_and_limited_skill_yaml_schemas_are_parseable의 assert 'xhigh' == 'extra high' 한 건이다. REWORK-004의 command-contract test를 포함한 tests/test_execute.py는 10/10 통과하며, dispatch 경계에 따라 pre-existing mismatch를 수정하지 않았다.
REWORK-004 Traceability
| requirement id | task id | test id | corrected files | acceptance criterion |
|---|---|---|---|---|
FESA-REQ-NSNR-083 |
Harness runner correction REWORK-004; blocks Step 0 cli-output-lease-and-derived-names |
test_invoke_codex_uses_implementation_agent_command_contract |
scripts/execute.py; tests/test_execute.py |
nested Codex argv가 adjacent --disable, unified_exec를 포함하면서 Terra/xhigh routing을 보존함; passed |