docs: preserve MITC4 prep failure and recovery plan

This commit is contained in:
KOKO\Mimi
2026-09-06 10:56:03 +09:00
parent d533b61541
commit 7dca487da1
8 changed files with 400 additions and 15 deletions
@@ -57,6 +57,15 @@ Feature 폴더 `docs/mitc4-shell-feast-eigen/`와 다음 management/approved bun
[WORKFLOW](../../docs/HARNESS_WORKFLOW.md), [환경·activation 상세](../../docs/mitc4-shell-feast-eigen/implementation-environment.md).
현재 config schema에는 timeout option이 없다. 이번에 새 config field를 만들지 않는다.
재개 시 [복구 계획](../../docs/mitc4-shell-feast-eigen/implementation-recovery.md)과
[실제 classifier 재현](../../.harness/build/mitc4-eigen-evidence/prep/attempt1/classifier-observation.json)을
추가 입력으로 읽는다. 아래 classifier delta는 기존 owned scripts/execute.py/tests/test_execute.py에
한정된 TDD 작업이다. 현재 blocked history와 실제 Hook 쓰기 거부는 그대로 보존한다.
현재 WIP 보존 뒤 별도 Correction Agent가 classifier 소스/테스트와 corrections.md를 먼저
완성한다. 그 실제 결과·별도 checkpoint 감사·수정 classifier를 읽는 새 process activation이
완료되기 전 이 prep를 재실행하지 않는다. 재개 Implementation은 선행 RED/GREEN evidence를
읽고 아래 회귀를 다시 실행하며, 이미 통과한 assertion을 새 RED라고 주장하지 않는다.
## Owned paths
```json
@@ -85,6 +94,28 @@ Feature 폴더 `docs/mitc4-shell-feast-eigen/`와 다음 management/approved bun
4. 등록 Stop timeout7500이 shared7200보다 크며 command/matcher/PreToolUse timeout30이 그대로인지 검사한다. Executor14400>registered7500 관계와 finite positive 값을 확인한다.
5. One-time module invocation은 딱 `StepExecutor.CODEX_TIMEOUT_SECONDS`만 유한14400으로 지정하고 unchanged `execute.main()`을 호출한다는 계약을 mock entry로 검사한다. Sandbox modes/default, MAX_TRANSPORT_ATTEMPTS, ownership/preflight/branch/commit/terminal result는 기존 tests를 유지한다.
6. `tests/test_execute.py`에서 실제 `_codex_environment_failure`와 `_classify_attempt`, 기존
`step_runtime`을 사용하는 회귀를 먼저 추가한다. 필수 이름은
`test_environment_classifier_ignores_successful_source_echo`,
`test_environment_classifier_retains_runtime_helper_failure`,
`test_successful_source_echo_preserves_terminal_and_retry`다. 첫 test는 archive의 source
excerpt와 실제 JSONL `item.completed/command_execution/exit_code=0`의 marker 포함
`aggregated_output`을 주입해 `None`을 기대한다. 성공 command가 실제 helper 오류 문장까지
source로 출력한 경우도 포함한다. 현재 broad substring은 environment로 오판하므로 RED다.
두 번째는 기존 실제 stderr helper diagnostic을 exit0/1에서 계속 검출하고, 성공 source echo와
진짜 stderr failure가 함께 있을 때도 차단함을 확인한다. 마지막은 성공 echo만 있는
completed/exit0의 완료, 명시 error/blocked의 원래 reason·history 보존, pending/exit0의
missing-result 오류, 실제 wrapper timeout만 최대2회 재시도되는 기존 분기를 검증한다.
이 positive regression들은 최초부터 pass할 수 있으므로 새 RED로 주장하지 않는다.
```powershell
uv run --with pytest python -B -m pytest -v -rs tests/test_execute.py -k 'environment_classifier or successful_source_echo'
```
Case3개의 collection inventory/parameter 전개와 actual failure를 기록한다. 무관 import/setup
오류는 classifier RED가 아니다. 마지막 attempt1의 test-only `.value` 수정은 별도 미검증이므로
기존 focused 명령으로 실제 재확인하고 원 보고서도 Implementation owner가 수정한다.
```powershell
uv run --with pytest python -B -m pytest -v -rs tests/test_harness_timeouts.py
```
@@ -93,7 +124,8 @@ Actual nonzero exit와 기존1800 기본값 때문에 실패한 assertions를
## Minimal GREEN
변경은 아래 다섯 runtime 설정의 literal default와 필요한 설명에 한정한다.
변경은 아래 다섯 runtime 설정의 literal default와 필요한 설명, 이어지는 재현된 classifier
결함의 최소 수정에 한정한다.
| 파일 / symbol | 기존 | 새 값 |
| --- | ---: | ---: |
@@ -103,7 +135,18 @@ Actual nonzero exit와 기존1800 기본값 때문에 실패한 assertions를
| scripts/msvc_harness/models.py / CommandSpec.timeout_seconds | 1800 | 7200 |
| scripts/msvc_harness/process.py / execute_plan total_timeout_seconds default | 1800 | 7200 |
`min(command cap, shared remaining)` 알고리즘은 그대로 둔다. 다른 함수·sandbox·transport/Coordinator retry·Hook scope/active flags·ownership/Git/API를 변경하지 않는다. `docs/HARNESS_WORKFLOW.md`의 이전1800 설명은 위 유한 deadline/새 process activation을 정확히 반영한다. Config field/환경변수/새 public CLI timeout option은 만들지 않는다.
Classifier GREEN은 `_codex_environment_failure`의 helper marker 판별만 좁힌다. 성공한
source/tool 출력의 임의 substring을 runtime diagnostic으로 사용하지 않는다. Stderr의 실제
helper diagnostic과 관찰된 명시 runtime failure 형식을 보존하고, JSONL 성공 command의
command/aggregated_output 같은 source payload는 제외한다. Plain `Source excerpt:` 문장도
진짜 runtime error 형식이 아니므로 무시한다. 모든 exit0을 정상으로 간주하거나 stderr 검사를
제거하지 않는다. 필요한 작은 private 판별 함수는 같은 scripts/execute.py 안에 둔다.
기존 auth/CLI nonzero 진단, explicit terminal·history, retry 분기와 횟수는 바꾸지 않는다.
`min(command cap, shared remaining)` 알고리즘은 그대로 둔다. 이 classifier delta 외의 함수·
sandbox·transport/Coordinator retry·Hook scope/active flags·ownership/Git/API를 변경하지 않는다.
`docs/HARNESS_WORKFLOW.md`의 이전1800 설명은 위 유한 deadline/새 process activation을 정확히
반영한다. Config field/환경변수/새 public CLI timeout option은 만들지 않는다.
## Focused VERIFY
@@ -113,6 +156,9 @@ uv run --with pytest python -B -m pytest -v -rs tests/test_harness_timeouts.py t
Exit0, failures0, 현재 sandbox/terminal/ownership regressions 보존을 확인한다. PreToolUse/Stop unit tests는 mock 테스트이고 실제 등록 Stop 통과 evidence가 아니다.
위 신규 classifier test3개의 실제 collection 이름과 parameter case 존재도 확인한다.
등록된 기존 suite만 실행되었다고 새로운 behavior가 검증됐다고 보고하지 않는다.
## Full VERIFY
```powershell