docs: preserve prep failure and short-temp recovery plan
This commit is contained in:
@@ -54,13 +54,13 @@ Reference artifact와 공통 정책은 수정하지 않는다. 외부 solver 실
|
|||||||
| [io-mapping.md](io-mapping.md) | io-definition-agent | r2 | 책임·candidate 보존·TXT Value-only·27개 요구/11개 I/O 검증 obligation |
|
| [io-mapping.md](io-mapping.md) | io-definition-agent | r2 | 책임·candidate 보존·TXT Value-only·27개 요구/11개 I/O 검증 obligation |
|
||||||
| [implementation-plan.md](implementation-plan.md) | implementation-planning-agent | r2 | Prep 1/main 8개 step 및 실행 계획 gate pass |
|
| [implementation-plan.md](implementation-plan.md) | implementation-planning-agent | r2 | Prep 1/main 8개 step 및 실행 계획 gate pass |
|
||||||
| [implementation-environment.md](implementation-environment.md) | implementation-planning-agent | r2 | 실제 backend·유한 deadline·bootstrap/activation·Git/사후 evidence 경계 |
|
| [implementation-environment.md](implementation-environment.md) | implementation-planning-agent | r2 | 실제 backend·유한 deadline·bootstrap/activation·Git/사후 evidence 경계 |
|
||||||
| [implementation-recovery.md](implementation-recovery.md) | implementation-planning-agent | r2 | actual blocked 보존·guarded WIP checkpoint·별도 Correction·조건부 승인/status/activation 계획 감사 완료 |
|
| [implementation-recovery.md](implementation-recovery.md) | implementation-planning-agent | r2 | R7 attempt2 환경 실패 보존과 E7 짧은 TEMP/workspace-write 재개 계획 감사 완료; 실제 실행 상태는 coordination 참조 |
|
||||||
| [implementation-interfaces.md](implementation-interfaces.md) | implementation-planning-agent | r2 | 기존 확장점·API/source-test·vendor/state/transaction 책임 |
|
| [implementation-interfaces.md](implementation-interfaces.md) | implementation-planning-agent | r2 | 기존 확장점·API/source-test·vendor/state/transaction 책임 |
|
||||||
| [implementation-verification.md](implementation-verification.md) | implementation-planning-agent | r2 | 요구27/NR27/I/O11·신규 test40·독립 oracle·fresh evidence·실제 validator |
|
| [implementation-verification.md](implementation-verification.md) | implementation-planning-agent | r2 | 요구27/NR27/I/O11·신규 test40·독립 oracle·fresh evidence·실제 validator |
|
||||||
| [implementation-prep-evidence.md](implementation-prep-evidence.md) | implementation-agent | r2 | actual attempt1 blocked 보고서; 두 실패·마지막 test 수정의 미검증 구분은 coordination raw audit 참조 |
|
| [implementation-prep-evidence.md](implementation-prep-evidence.md) | implementation-agent | r2 | attempt1 역사와 attempt2 Hook GREEN/focused136 pass·full CTest361/362 실패; 실제 terminal/TEMP pair 판정은 coordination 참조 |
|
||||||
| [corrections.md](corrections.md) | correction-agent | r2 | source echo 최소 교정1회·RED/GREEN37 확인; full Python Hook1실패와 manual build 환경 차단 보존, registered Stop362 pass는 coordination 후속 evidence |
|
| [corrections.md](corrections.md) | correction-agent | r2 | source echo 최소 교정1회·RED/GREEN37 확인; full Python Hook1실패와 manual build 환경 차단 보존, registered Stop362 pass는 coordination 후속 evidence |
|
||||||
| [phases/index.json](../../phases/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | 기존5개 보존; prep blocked/main pending |
|
| [phases/index.json](../../phases/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | 기존5개 보존; prep error/main pending |
|
||||||
| [prep index](../../phases/mitc4-shell-feast-eigen-execution-prep/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | Step0 blocked; actual attempt1/history 보존 |
|
| [prep index](../../phases/mitc4-shell-feast-eigen-execution-prep/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | Step0 error; actual attempt2/history2 보존 |
|
||||||
| [prep step0](../../phases/mitc4-shell-feast-eigen-execution-prep/step0.md) | implementation-planning-agent | r2 | 유한 deadline 및 재현 classifier 오탐의 최소 TDD/full VERIFY; 별도 Correction 후 재개 |
|
| [prep step0](../../phases/mitc4-shell-feast-eigen-execution-prep/step0.md) | implementation-planning-agent | r2 | 유한 deadline 및 재현 classifier 오탐의 최소 TDD/full VERIFY; 별도 Correction 후 재개 |
|
||||||
| [main index](../../phases/mitc4-shell-feast-eigen/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | Step0~7 pending; exact owned paths 검증 |
|
| [main index](../../phases/mitc4-shell-feast-eigen/index.json) | implementation-planning-agent(정의), Executor(진행) | r2 | Step0~7 pending; exact owned paths 검증 |
|
||||||
| [main step0](../../phases/mitc4-shell-feast-eigen/step0.md) | implementation-planning-agent | r2 | Frequency model/parser |
|
| [main step0](../../phases/mitc4-shell-feast-eigen/step0.md) | implementation-planning-agent | r2 | Frequency model/parser |
|
||||||
|
|||||||
@@ -3,15 +3,15 @@
|
|||||||
- Feature ID: `mitc4-shell-feast-eigen`
|
- Feature ID: `mitc4-shell-feast-eigen`
|
||||||
- Owner: `coordinator-agent`
|
- Owner: `coordinator-agent`
|
||||||
- Contract revision: `r2` (사용자 승인 stabilization 개선·영향받는 정적/eigen 재검증 범위)
|
- Contract revision: `r2` (사용자 승인 stabilization 개선·영향받는 정적/eigen 재검증 범위)
|
||||||
- Stage: `implementation` (승인된 E6 prep 재개)
|
- Stage: `implementation` (E6 prep attempt2 종료; 환경 복구 Planning)
|
||||||
- Outcome: `retry`
|
- Outcome: `blocked-environment`
|
||||||
- Next owner: `implementation-agent` (실제 Harness Executor의 prep Step0)
|
- Next owner: `Executor` (R7 exact Hook/report2 및 error controls2 WIP 보존; 이후 Planning status-only 할당)
|
||||||
- Attempt: `2` (이번 prep 재개 할당; 기존 실제 history1은 보존)
|
- Attempt: `2` (실제 prep history2; 첫 history 보존 확인)
|
||||||
- Completion: 미완료
|
- Completion: 미완료
|
||||||
- Failure classification: `environment`
|
- Failure classification: `environment`
|
||||||
- Retry key: `mitc4-shell-feast-eigen|implementation|environment|r2`
|
- Retry key: `mitc4-shell-feast-eigen|implementation|environment|r2`
|
||||||
- Escalation class: `null`
|
- Escalation class: `null`
|
||||||
- Blocker: `null` (명시 승인과 R3 control checkpoint 완료; 실제 재개·full 검증 결과 대기)
|
- Blocker: 긴 inherited TEMP에서 test323 output lock 경로가 261자로 늘어나 full CTest 실패. 같은 binary의 짧은 TEMP probe는 통과했으며 실패 보존 후 기본 workspace-write 환경 재개를 계획한다.
|
||||||
|
|
||||||
기준: [프로젝트 지침](../../AGENTS.md), [프로젝트 PRD](../PRD.md), [프로젝트 ADR](../ADR.md),
|
기준: [프로젝트 지침](../../AGENTS.md), [프로젝트 PRD](../PRD.md), [프로젝트 ADR](../ADR.md),
|
||||||
[SOLVER_AGENT_DESIGN](../SOLVER_AGENT_DESIGN.md), [FEATURE_DOCUMENTATION](../FEATURE_DOCUMENTATION.md).
|
[SOLVER_AGENT_DESIGN](../SOLVER_AGENT_DESIGN.md), [FEATURE_DOCUMENTATION](../FEATURE_DOCUMENTATION.md).
|
||||||
@@ -45,6 +45,20 @@ Root의 intake 시작 Git 조사에서는 worktree clean을 확인했다. 당시
|
|||||||
|
|
||||||
## 현재 bounded dispatch
|
## 현재 bounded dispatch
|
||||||
|
|
||||||
|
Planning의 [R7](implementation-recovery.md#r7-attempt2-실패-보존과-정상-workspace-write-재개)·[E7](implementation-environment.md#e7-짧은-temp를-사용하는-정상-재개) 최소 delta는 owner/revision 및 현재 hash/정확 실행 순서를 확인해 계획 gate `pass`로 수락했다. Owner 정적 결과는 Python AST5·PowerShell13 blocks/errors0·link74·고정 artifact hash7·Executor AST 불변, exit `0`이다. Coordinator의 변경5문서 경로 검사는 local links239/missing0, exit `0`이다. 이는 실제 prep 검증 통과가 아니다. Root가 동결된 management2/Planning3 정확5문서를 먼저 checkpoint한 뒤 R7 첫 block을 unchanged Executor로 실행한다. 이때 source/tests·Hook/report·phase/raw는 지금 실제 실패 bytes 그대로 보존되며, 다음 status-only 편집은 그 WIP commit과 clean 확인 뒤에만 별도 할당한다.
|
||||||
|
|
||||||
|
E6 실제 실행은 `2655.156`초 뒤 native PowerShell/managed exit `1`, Codex actual exit `0`으로 종료했다. [wrapper result](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/executor-result.json)는 HEAD `d64cd1403ac41fb1397dfb088361ce18ad1d59bd` 및 branch 유지, 비소유 bytes 변경 `0`, dirty가 Hook/report와 control2의 정확4개임을 확인한다. [보존 원시 결과](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/step0-output.json) SHA-256은 `8852e0ddae9ef94d885e8b4ae4b8a3b2e3a9d9161a3801bc7e56ea157e9411f4`다. Phase는 `error`, history2이며 첫 history의 JSON equality를 원래 attempt1 archive와 확인했다(exit `0`). `transportFailure=null`이며 명시 `reported-error`를 transport retry로 바꾸지 않는다. Owner가 요청한 `test` 분류/attempt1은 전이 권한이 없으므로 원시 반환으로 보존하고, Coordinator는 실제 환경 pair와 history에 따라 `environment`/attempt2로 기록한다.
|
||||||
|
|
||||||
|
수동 CTest는 `1086.77`초, 등록 CTest는 `982.52`초이며 둘 다 `361 passed/1 failed`, 실제 exit `8`이다. 등록 Stop wrapper와 Python의 실제 exit `0`은 test pass가 아니다. [수동 archive](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/manual-ctest-observation.json)와 [등록 archive](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/registered-ctest-observation.json)를 분리했다. Full Python은 순차 VERIFY의 CTest 실패 때문에 이번 실행에서 미실행이다. 승인된 Hook7500만 적용됐고 classifier source/test hashes는 이전 Correction 이후 불변이다. 기존 full CTest는 저장된 정적 reference를 읽고 비교하므로 owner report의 포괄적 reference 미열람 문구는 다음 Implementation에서 직접 원본 편집·새 eigen 비교 부재라는 정확한 의미로 정정하도록 인계한다.
|
||||||
|
|
||||||
|
Raw item18의 첫 focused는 깊은 pytest basetemp에서 exit `1`, `130 passed/6 failed`였고 item20은 짧은 `.harness/build/mfe-focus-<8자>`로 바꾼 동일 대상에서 exit `0`, `136 passed`였다. 앞선 실패를 지우거나 최초부터 통과했다고 기록하지 않는다. 새 환경 명령은 C++ TEMP/TMP와 pytest basetemp를 모두 짧게 지정하며, 통과한 기존 assertion을 변경하지 않는다.
|
||||||
|
|
||||||
|
Root에 할당한 동일 binary의 단일 test323 환경 probe는 새 긴 TEMP152자에서 결과251자/lock261자로 exit `1`, 새 짧은 TEMP70자에서 같은 test exit `0`을 기록했다. [Probe observation](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/path-length-probe-e15c1747/observation.json) SHA-256은 `511b30e183759b378e6f33f30aa3be4c940b58d1eabde12068151173a0a91979`이며 기존 CTest shared log/source/control/reference를 변경하지 않았다. 이 증거는 전체 gate를 대체하지 않는다. 실제 Win32 `GetLastError`를 관찰했다고 주장하지 않는다.
|
||||||
|
|
||||||
|
현재 Planning 소유 작업은 기존 implementation-plan/environment/recovery 3문서의 최소 delta다. Required inputs는 Feature 폴더 및 FEATURED_AGENTS/PRD/ADR/coordination, r2 계약, 원래 Step0/phase, [attempt2 terminal archive](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/terminal-archive.json)와 TEMP pair다. 실패 Hook/report 및 controls의 정확 bytes/hash/history를 unchanged Executor `_commit_paths`로 구분 보존하는 명령, 이후 별도 할당의 status-only 복구, 짧은 새 workspace TEMP/TMP를 native와 등록 Stop에 함께 상속하는 기본 workspace-write 명령만 구체화한다. Root는 먼저 frozen 관리/계획 문서만 checkpoint한다. Planning은 source/test/Hook/Implementation report/phase/status/Git을 수정하거나 실행하지 않는다. Syntax·ownership·hash 정적 검증과 exact frozen 경로 반환이 이번 gate이며, status reset은 실패 보존 commit 뒤 별도 할당한다. 새 DFA 승인, solver 계약 변경, 두 번째 source Correction 또는 framework 확대는 필요 없다. 현재 한 번의 DFA 승인은 이미 사용됐고 후속 prep/main은 기본 workspace-write다.
|
||||||
|
|
||||||
|
### E6 실제 실행 전 handoff 이력
|
||||||
|
|
||||||
R3 Planning은 prep index의 Step0.status 한 값만 `blocked`→`pending`으로 변경했다. Coordinator가 나머지 JSON·history1 보존과 hash `10de90d5cde92797a0dfeedc716a5d5a267000304260c063d55ae6bc53bb4cf5`를 확인했다(exit `0`). [실제 R3 checkpoint](../../.harness/build/mitc4-eigen-evidence/prep/classifier-correction/r3-approved-status-checkpoint-result.json)는 unchanged Executor 호출 native PowerShell/managed exit `0`, `1.531`초이며, control commit `671feb7c620d0f4e5d13d48cf7f312a02067c6aa`의 정확 index1개·pending·history/raw/top 보존·clean을 [stdout](../../.harness/build/mitc4-eigen-evidence/prep/classifier-correction/r3-approved-status-checkpoint-stdout.log)에 확인했다. Top은 blocked 그대로다.
|
R3 Planning은 prep index의 Step0.status 한 값만 `blocked`→`pending`으로 변경했다. Coordinator가 나머지 JSON·history1 보존과 hash `10de90d5cde92797a0dfeedc716a5d5a267000304260c063d55ae6bc53bb4cf5`를 확인했다(exit `0`). [실제 R3 checkpoint](../../.harness/build/mitc4-eigen-evidence/prep/classifier-correction/r3-approved-status-checkpoint-result.json)는 unchanged Executor 호출 native PowerShell/managed exit `0`, `1.531`초이며, control commit `671feb7c620d0f4e5d13d48cf7f312a02067c6aa`의 정확 index1개·pending·history/raw/top 보존·clean을 [stdout](../../.harness/build/mitc4-eigen-evidence/prep/classifier-correction/r3-approved-status-checkpoint-stdout.log)에 확인했다. Top은 blocked 그대로다.
|
||||||
|
|
||||||
다음 실제 dispatch는 E6의 정확 prep1회이며 Execution owner는 공식 implementation-agent profile이다. Required inputs는 이 Feature 폴더와 FEATURED_AGENTS/PRD/ADR/coordination, r2 선행 계약, prep Step0, implementation-plan/environment/recovery 및 실제 corrections evidence다. Owned outputs는 Step0의 원래 exact9개이고 result payload는 `completed`와 nonempty summary 또는 명시 error/blocked다. Existing RED/GREEN을 보존한 재검증, 남은 Hook7500, 원래 implementation-prep-evidence 보고서 정정, full Python/MSVC/x64/Debug CMake/CTest 및 실제 registered Stop/terminal evidence가 gate다. Source echo Correction의 후속 Implementation rerun은 이번 1회만 할당하며 두 번째 Correction은 금지한다. Guard/ownership/upstream 실패나 명시 terminal 발생 시 원시 결과를 보존하고 무단 재시도하지 않는다. Root/Coordinator는 active invocation 동안 모든 non-owned 편집과 Git을 동결한다. 실제 gate audit 전 main/physics/release 전이는 없다.
|
다음 실제 dispatch는 E6의 정확 prep1회이며 Execution owner는 공식 implementation-agent profile이다. Required inputs는 이 Feature 폴더와 FEATURED_AGENTS/PRD/ADR/coordination, r2 선행 계약, prep Step0, implementation-plan/environment/recovery 및 실제 corrections evidence다. Owned outputs는 Step0의 원래 exact9개이고 result payload는 `completed`와 nonempty summary 또는 명시 error/blocked다. Existing RED/GREEN을 보존한 재검증, 남은 Hook7500, 원래 implementation-prep-evidence 보고서 정정, full Python/MSVC/x64/Debug CMake/CTest 및 실제 registered Stop/terminal evidence가 gate다. Source echo Correction의 후속 Implementation rerun은 이번 1회만 할당하며 두 번째 Correction은 금지한다. Guard/ownership/upstream 실패나 명시 terminal 발생 시 원시 결과를 보존하고 무단 재시도하지 않는다. Root/Coordinator는 active invocation 동안 모든 non-owned 편집과 Git을 동결한다. 실제 gate audit 전 main/physics/release 전이는 없다.
|
||||||
|
|||||||
@@ -257,3 +257,111 @@ CMake/MSVC/x64/Debug configure/build와 전체 CTest discovery/run은 기존 Ste
|
|||||||
명령을 같은 inherited TEMP/TMP에서 별도로 실행한다. 실패 시 actual command/exit와 남은
|
명령을 같은 inherited TEMP/TMP에서 별도로 실행한다. 실패 시 actual command/exit와 남은
|
||||||
검증을 기록한다. Registered Stop을 수동 full 검증으로 대체하지 않으며 원 보고서 갱신은
|
검증을 기록한다. Registered Stop을 수동 full 검증으로 대체하지 않으며 원 보고서 갱신은
|
||||||
Implementation owner, 종료 뒤 사후 감사는 Coordinator 소유다.
|
Implementation owner, 종료 뒤 사후 감사는 Coordinator 소유다.
|
||||||
|
|
||||||
|
## E7. 짧은 TEMP를 사용하는 정상 재개
|
||||||
|
|
||||||
|
E6의 긴 TEMP 이름은 attempt2의
|
||||||
|
`ShellSurfacePressureApplication.InputWithoutPressureRetainsExistingNonlinearBehavior`
|
||||||
|
실패를 재현했다. [같은 binary의 짧은 경로 비교](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/path-length-probe-e15c1747/observation.json)
|
||||||
|
SHA-256은 `511b30e183759b378e6f33f30aa3be4c940b58d1eabde12068151173a0a91979`다.
|
||||||
|
TEMP152에서 만들어진 result251/lock261과 실패1, TEMP70에서 실제 생성된 lock179와 성공0을
|
||||||
|
구분한다. 새 `.harness/build/t-<8hex>`는 이 workspace에서70자이며 **TEMP80자 이하**를
|
||||||
|
검사한다. 관찰된 해당 fixture suffix109자를 더하면 lock189자 이하라는 운영 여유다.
|
||||||
|
이는 모든 미래 fixture의 길이 보장이 아니므로 기존 전체 suite를 실제 수행한다.
|
||||||
|
|
||||||
|
Attempt2의 focused도 처음에는 긴 pytest basetemp에서130pass/6fail(exit1)이었고,
|
||||||
|
같은136대상을 짧은 `.harness/build/mfe-focus-<8guid>`로 바꾼 뒤136pass(exit0)였다.
|
||||||
|
확인된 named venv/base/UVoffline/cache와 direct pytest entry/대상은 유지하되 TEMP/TMP와
|
||||||
|
pytest basetemp를 모두 짧게 만든다. Native child와
|
||||||
|
registered Stop도 같은 process 환경을 상속한다. 기존 temp/evidence 삭제·test skip·FileTracker
|
||||||
|
비활성화·source/reference 변경은 없다. Full pytest는 attempt2에서 미실행이므로 필수로 남는다.
|
||||||
|
|
||||||
|
[R7 WIP 및 별도 status checkpoint](implementation-recovery.md#r7-attempt2-실패-보존과-정상-workspace-write-재개)
|
||||||
|
완료 뒤 Coordinator가 아래 정상 workspace-write invocation을 할당한다. 추가 사용자
|
||||||
|
승인이나 DFA flag는 없다. 오류·정상 종료 모두 환경을 finally에서 원래 값으로 복원하고
|
||||||
|
native exit를 즉시 전파한다. 유한14400과 기존 registered Stop7500/shared7200은 유지한다.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$mfeRoot = (Get-Location).Path
|
||||||
|
$mfePhase = 'mitc4-shell-feast-eigen-execution-prep'
|
||||||
|
$mfeEvidence = Join-Path $mfeRoot '.harness/build/mitc4-eigen-evidence/prep/classifier-correction'
|
||||||
|
$mfePython = Join-Path $mfeEvidence 'pytest-venv/Scripts/python.exe'
|
||||||
|
$mfeBasePython = Join-Path $mfeEvidence 'python-runtime/cpython-3.11.15-windows-x86_64-none/python.exe'
|
||||||
|
$mfeUvCache = Join-Path $mfeEvidence 'workspace-python-cache'
|
||||||
|
foreach ($mfeFile in @($mfePython, $mfeBasePython)) {
|
||||||
|
if (-not (Test-Path -LiteralPath $mfeFile -PathType Leaf)) { throw "Missing Python: $mfeFile" }
|
||||||
|
}
|
||||||
|
Get-Command uv -ErrorAction Stop | Out-Null
|
||||||
|
$mfeGitRoot = git rev-parse --show-toplevel
|
||||||
|
$mfeIdentityExit = $LASTEXITCODE
|
||||||
|
if ($mfeIdentityExit -ne 0 -or [IO.Path]::GetFullPath($mfeGitRoot) -ne [IO.Path]::GetFullPath($mfeRoot)) {
|
||||||
|
throw 'Workspace root mismatch'
|
||||||
|
}
|
||||||
|
$mfeTempParent = Join-Path $mfeRoot '.harness/build'
|
||||||
|
$mfeRunTemp = Join-Path $mfeTempParent ('t-' + [guid]::NewGuid().ToString('N').Substring(0, 8))
|
||||||
|
if ($mfeRunTemp.Length -gt 80) { throw 'TEMP exceeds the approved 80-character budget' }
|
||||||
|
if (-not [IO.Path]::GetFullPath($mfeRunTemp).StartsWith([IO.Path]::GetFullPath($mfeTempParent) + [IO.Path]::DirectorySeparatorChar)) {
|
||||||
|
throw 'Temp path outside approved workspace evidence'
|
||||||
|
}
|
||||||
|
$null = New-Item -ItemType Directory -Path $mfeRunTemp
|
||||||
|
$mfeEnvNames = @('PATH', 'UV_PYTHON', 'UV_CACHE_DIR', 'UV_OFFLINE', 'TEMP', 'TMP', 'FEM_HARNESS_CODEX_SANDBOX')
|
||||||
|
$mfeBeforeEnv = @{}
|
||||||
|
foreach ($mfeName in $mfeEnvNames) {
|
||||||
|
$mfeBeforeEnv[$mfeName] = [Environment]::GetEnvironmentVariable($mfeName, 'Process')
|
||||||
|
}
|
||||||
|
if ($null -ne $mfeBeforeEnv['FEM_HARNESS_CODEX_SANDBOX'] -and $mfeBeforeEnv['FEM_HARNESS_CODEX_SANDBOX'] -ne 'workspace-write') {
|
||||||
|
throw 'Unexpected pre-existing sandbox environment'
|
||||||
|
}
|
||||||
|
$mfeNativeExit = $null
|
||||||
|
try {
|
||||||
|
$env:PATH = (Split-Path $mfePython) + ';' + (Split-Path $mfeBasePython) + ';' + $mfeBeforeEnv['PATH']
|
||||||
|
$env:UV_PYTHON = $mfePython
|
||||||
|
$env:UV_CACHE_DIR = $mfeUvCache
|
||||||
|
$env:UV_OFFLINE = 'true'
|
||||||
|
$env:TEMP = $mfeRunTemp
|
||||||
|
$env:TMP = $mfeRunTemp
|
||||||
|
$env:FEM_HARNESS_CODEX_SANDBOX = 'workspace-write'
|
||||||
|
& $mfePython -B -X utf8 -c "from scripts import execute; execute.StepExecutor.CODEX_TIMEOUT_SECONDS = 14400; execute.main()" $mfePhase
|
||||||
|
$mfeNativeExit = $LASTEXITCODE
|
||||||
|
if ($null -eq $mfeNativeExit) { throw 'Native Executor exit unavailable' }
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
foreach ($mfeName in $mfeEnvNames) {
|
||||||
|
[Environment]::SetEnvironmentVariable($mfeName, $mfeBeforeEnv[$mfeName], 'Process')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exit $mfeNativeExit
|
||||||
|
```
|
||||||
|
|
||||||
|
현재 block은 미실행이다. Prep 성공·full manual VERIFY·actual registered Stop/CTest exit와
|
||||||
|
Coordinator 사후 감사 뒤 main을 별도 할당할 때는 같은 block의 `$mfePhase` 값만
|
||||||
|
`mitc4-shell-feast-eigen`으로 지정한다. Main도 workspace-write이며 해당8개 Step의
|
||||||
|
실제 C++ TDD/focused/full/reference gate를 그대로 수행한다. Hook7500이 이미 적용됐다는
|
||||||
|
사실이나 단독 경로 재현 성공을 전체 prep/main 성공으로 보고하지 않는다.
|
||||||
|
|
||||||
|
현재 pytest의 정확한 recipe는 아래다. E6의 긴 basetemp 예시는 과거 이력으로 남기고,
|
||||||
|
각 호출마다 새 `.harness/build/p-<8guid>`(현재70자, 상한80자)를 사용한다. 기존 directory를
|
||||||
|
재사용하거나 지우지 않는다. 같은 tests/assertions와 실제 exit 확인을 유지한다.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$mfeBuild = Join-Path (Get-Location).Path '.harness/build'
|
||||||
|
$mfeEvidence = Join-Path $mfeBuild 'mitc4-eigen-evidence/prep/classifier-correction'
|
||||||
|
$mfePython = Join-Path $mfeEvidence 'pytest-venv/Scripts/python.exe'
|
||||||
|
$mfePytestRuns = @(
|
||||||
|
@{ label = 'classifier'; targets = @('tests/test_execute.py', '-k', 'environment_classifier or successful_source_echo') },
|
||||||
|
@{ label = 'focused'; targets = @('tests/test_harness_timeouts.py', 'tests/test_execute.py', 'tests/test_execute_ownership.py', 'tests/test_hook_validation_scope.py', 'tests/test_harness_preset_contract.py') },
|
||||||
|
@{ label = 'full'; targets = @() }
|
||||||
|
)
|
||||||
|
foreach ($mfeRun in $mfePytestRuns) {
|
||||||
|
$mfeFreshBase = Join-Path $mfeBuild ('p-' + [guid]::NewGuid().ToString('N').Substring(0, 8))
|
||||||
|
if ($mfeFreshBase.Length -gt 80 -or (Test-Path -LiteralPath $mfeFreshBase)) { throw 'Pytest basetemp must be short and new' }
|
||||||
|
$mfeCache = Join-Path $mfeEvidence 'pytest-cache'
|
||||||
|
$mfeTargets = $mfeRun.targets
|
||||||
|
& $mfePython -B -X utf8 -m pytest -v -rs -o "cache_dir=$mfeCache" "--basetemp=$mfeFreshBase" @mfeTargets
|
||||||
|
$mfePytestExit = $LASTEXITCODE
|
||||||
|
Write-Output ("pytest {0}: exit {1}; basetemp {2}" -f $mfeRun.label, $mfePytestExit, $mfeFreshBase)
|
||||||
|
if ($null -eq $mfePytestExit -or $mfePytestExit -ne 0) { throw 'pytest verification failed' }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
@@ -18,6 +18,12 @@ source2 보존 뒤 [E6](implementation-environment.md#e6-correction-후의-pytho
|
|||||||
확인된 Python 및 정상 TEMP/TMP 설정으로 후속 검증을 준비한다. 현재 source checkpoint,
|
확인된 Python 및 정상 TEMP/TMP 설정으로 후속 검증을 준비한다. 현재 source checkpoint,
|
||||||
status reset과 DFA 실행은 미실행이며 exact-run 명시 승인도 아직 없다.
|
status reset과 DFA 실행은 미실행이며 exact-run 명시 승인도 아직 없다.
|
||||||
|
|
||||||
|
위 E6 승인·재개는 이후 실제 attempt2로 수행됐다. Hook7500/focused136pass와 build는
|
||||||
|
완료됐지만 긴 inherited TEMP의 test323 실패로 전체 gate는 미완료다. 현재 복구는
|
||||||
|
[R7](implementation-recovery.md#r7-attempt2-실패-보존과-정상-workspace-write-재개)의
|
||||||
|
error/history2 WIP 보존 뒤 [E7](implementation-environment.md#e7-짧은-temp를-사용하는-정상-재개)의
|
||||||
|
짧은 TEMP와 정상 workspace-write를 사용한다. 이번에는 추가 DFA 승인이나 source Correction이 없다.
|
||||||
|
|
||||||
[FEATURED_AGENTS](FEATURED_AGENTS.md), [PRD](PRD.md), [ADR](ADR.md)와
|
[FEATURED_AGENTS](FEATURED_AGENTS.md), [PRD](PRD.md), [ADR](ADR.md)와
|
||||||
[coordination](coordination.md), 승인된 [requirements](requirements.md), [research](research.md),
|
[coordination](coordination.md), 승인된 [requirements](requirements.md), [research](research.md),
|
||||||
[formulation](formulation.md), [NR](numerical-review.md), [I/O](io.md) 및 각 상세 r2를 적용한다.
|
[formulation](formulation.md), [NR](numerical-review.md), [I/O](io.md) 및 각 상세 r2를 적용한다.
|
||||||
|
|||||||
@@ -397,3 +397,153 @@ Prep full gate·등록 Stop 실제 exit·Coordinator 사후 감사 전 main acti
|
|||||||
Executor AST 불변, local links/EOF/whitespace와 blocked archive 동일성을 대상으로 했다.
|
Executor AST 불변, local links/EOF/whitespace와 blocked archive 동일성을 대상으로 했다.
|
||||||
정확 결과와 갱신3문서 hash는 handoff에 기록한다. Source/tests/Hook/phase/status/Git과
|
정확 결과와 갱신3문서 hash는 handoff에 기록한다. Source/tests/Hook/phase/status/Git과
|
||||||
Correction 본문은 이번 Planning 작업에서 수정하지 않았다.
|
Correction 본문은 이번 Planning 작업에서 수정하지 않았다.
|
||||||
|
|
||||||
|
## R7. Attempt2 실패 보존과 정상 workspace-write 재개
|
||||||
|
|
||||||
|
R2/R6/R3와 E6은 과거 실행·승인 이력으로 보존한다. 이번 actual attempt2는 종료됐으며
|
||||||
|
[terminal archive](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/terminal-archive.json)에
|
||||||
|
native PowerShell1/Codex0, Step error/history2와 이전 history1이 남아 있다.
|
||||||
|
Hook RED3pass/1fail→GREEN4pass, focused136pass(기존 classifier37 포함),
|
||||||
|
configure/build/discovery0 뒤 manual CTest와 registered CTest는 각각 exit8,
|
||||||
|
361/362pass였다. Stop wrapper/Python0은 검증 성공이 아니다. Full pytest는 미실행이다.
|
||||||
|
|
||||||
|
[동일 binary의 경로 길이 비교](../../.harness/build/mitc4-eigen-evidence/prep/attempt2/path-length-probe-e15c1747/observation.json)는
|
||||||
|
TEMP152/result251/lock261에서 해당 test exit1, TEMP70/관찰 lock179에서 exit0을 기록한다.
|
||||||
|
Binary SHA-256 `d52ed2538be8f66e076f25ae44f073aea8486c5f543fbc7c179b7a5610dc3209`는 같고
|
||||||
|
source/shared CTest log/reference 변경은 없다. 이 결과는 정상 환경 설정의 근거이며
|
||||||
|
solver defect 또는 직접 관찰하지 않은 GetLastError를 주장하지 않는다.
|
||||||
|
|
||||||
|
### 실패 상태의 WIP checkpoint
|
||||||
|
|
||||||
|
Root는 frozen management4문서와 Planning3문서의 실제 변경 경로만 먼저 checkpoint한다.
|
||||||
|
Hook/report/phase controls는 그 문서 commit에 섞지 않는다. Root ack 뒤 Coordinator가 아래
|
||||||
|
unchanged Executor 호출을 할당한다. Origin은 `d64cd1403ac41fb1397dfb088361ce18ad1d59bd`,
|
||||||
|
dirty는 Hook+report2 및 controls2뿐이어야 한다. 두 commit은 WIP/실패 기록이며 성공 전환이 아니다.
|
||||||
|
모든 bytes/history/raw/error는 유지한다. 중간 실패 시 원래 HEAD/index/worktree를 보존하며
|
||||||
|
자동 재시도나 rollback을 하지 않는다. `_commit_step`/runtime override는 사용하지 않는다.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$mfePython = Join-Path (Get-Location).Path '.harness/build/mitc4-eigen-evidence/prep/classifier-correction/pytest-venv/Scripts/python.exe'
|
||||||
|
if (-not (Test-Path -LiteralPath $mfePython -PathType Leaf)) { throw 'Named Python missing' }
|
||||||
|
@'
|
||||||
|
import ast,hashlib,json
|
||||||
|
from pathlib import Path
|
||||||
|
from scripts import execute
|
||||||
|
phase="mitc4-shell-feast-eigen-execution-prep"
|
||||||
|
origin="d64cd1403ac41fb1397dfb088361ce18ad1d59bd"
|
||||||
|
ex=execute.StepExecutor(phase); root=Path(ex._root)
|
||||||
|
assert Path.cwd().resolve()==root
|
||||||
|
assert Path(ex._run_git_checked("rev-parse","--show-toplevel").stdout.strip()).resolve()==root
|
||||||
|
assert ex._is_isolated_worktree() and ex._codex_sandbox_mode()=="workspace-write"
|
||||||
|
assert ex._implementation_agent_settings()==("gpt-5.6-terra","xhigh")
|
||||||
|
branch,head=ex._git_execution_identity()
|
||||||
|
assert branch=="refs/heads/feat-"+phase
|
||||||
|
ex._run_git_checked("merge-base","--is-ancestor",origin,"HEAD")
|
||||||
|
docs={"docs/mitc4-shell-feast-eigen/"+n for n in ("FEATURED_AGENTS.md","PRD.md","ADR.md",
|
||||||
|
"coordination.md","implementation-plan.md","implementation-environment.md","implementation-recovery.md")}
|
||||||
|
assert set(ex._run_git_checked("diff","--name-only","--no-renames",origin,"HEAD").stdout.splitlines())<=docs
|
||||||
|
assert not ex._run_git_checked("diff","--cached","--name-only").stdout.strip()
|
||||||
|
expected={".codex/hooks.json":"e7e5d3c0c4fcd1e33b60680122ea7c42298d5cbde78a7f87d9e0007bf60a0fa4",
|
||||||
|
"docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md":"90d104423af2971837a38eb632c8a4aa54b8acf6f6cd96b5a193dbd4ba4e083f",
|
||||||
|
"phases/index.json":"c2d98e5bcb96bb781f687e696083076a3f5bea2d095f4c7264bb4a6415b6cc38",
|
||||||
|
"phases/"+phase+"/index.json":"7990530b4d259850f614ae68036c551b3c11539c90673512c6515d3f87ad1ebe",
|
||||||
|
"phases/"+phase+"/step0-output.json":"8852e0ddae9ef94d885e8b4ae4b8a3b2e3a9d9161a3801bc7e56ea157e9411f4",
|
||||||
|
"scripts/execute.py":"64f5165fc544b3b17904c633ef3b222de79b52a0960e254c5b5c4eb99e79c2d0",
|
||||||
|
"tests/test_execute.py":"0eb0c1ca0f25199e00686b7e3ab57672b1390437d09da218a929added0346dd6"}
|
||||||
|
for p,h in expected.items():assert hashlib.sha256((root/p).read_bytes()).hexdigest()==h,p
|
||||||
|
assert ast.dump(ast.parse((root/"scripts/execute.py").read_text(encoding="utf-8")))==ast.dump(ast.parse(ex._run_git_checked("show",origin+":scripts/execute.py").stdout))
|
||||||
|
old_hook=json.loads(ex._run_git_checked("show",origin+":.codex/hooks.json").stdout)
|
||||||
|
old_hook["hooks"]["Stop"][0]["hooks"][0]["timeout"]=7500
|
||||||
|
assert json.loads((root/".codex/hooks.json").read_bytes())==old_hook
|
||||||
|
idx=ex._read_phase_index();top=ex._read_top_index()
|
||||||
|
assert idx["steps"][0]["status"]=="error" and len(idx["steps"][0]["attempt_history"])==2
|
||||||
|
assert next(p for p in top["phases"] if p["dir"]==phase)["status"]=="error"
|
||||||
|
owned=ex._step_owned_paths(idx["steps"][0])
|
||||||
|
code=[".codex/hooks.json","docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md"]
|
||||||
|
control=["phases/index.json","phases/"+phase+"/index.json"]
|
||||||
|
assert set(ex._assert_step_scope(owned))==set(code+control)
|
||||||
|
frozen={p:(root/p).read_bytes() for p in list(owned)+list(expected)+["phases/"+phase+"/step0.md","phases/mitc4-shell-feast-eigen/index.json"]}
|
||||||
|
for paths,message in (
|
||||||
|
(code,"chore(mitc4-shell-feast-eigen-execution-prep): WIP Hook update with verification failure"),
|
||||||
|
(control,"chore(mitc4-shell-feast-eigen-execution-prep): preserve attempt 2 error metadata")):
|
||||||
|
assert all((root/p).read_bytes()==v for p,v in frozen.items())
|
||||||
|
assert ex._git_execution_identity()==(branch,head)
|
||||||
|
assert ex._commit_paths(paths,message,owned_paths=owned)
|
||||||
|
new_branch,new_head=ex._git_execution_identity()
|
||||||
|
assert new_branch==branch and new_head!=head
|
||||||
|
actual=ex._run_git_checked("diff-tree","--no-commit-id","--name-only","--no-renames","-r",new_head).stdout.splitlines()
|
||||||
|
assert set(actual)==set(paths)
|
||||||
|
assert all((root/p).read_bytes()==v for p,v in frozen.items())
|
||||||
|
assert ex._read_phase_index()==idx and ex._read_top_index()==top
|
||||||
|
print(json.dumps({"commit":new_head,"paths":actual,"status":"error","history_count":2}))
|
||||||
|
head=new_head
|
||||||
|
assert not ex._worktree_paths()
|
||||||
|
ex._preflight_repository()
|
||||||
|
print(json.dumps({"head":head,"branch":branch,"clean":True}))
|
||||||
|
'@ | & $mfePython -B -X utf8 -
|
||||||
|
$mfeWipExit = $LASTEXITCODE
|
||||||
|
if ($null -eq $mfeWipExit) { throw 'Native exit unavailable' }
|
||||||
|
exit $mfeWipExit
|
||||||
|
```
|
||||||
|
|
||||||
|
### 별도 할당 뒤 status-only checkpoint
|
||||||
|
|
||||||
|
위 terminal WIP 보존이 실제 완료되기 전에는 status를 바꾸지 않는다.
|
||||||
|
그 후 Coordinator의 별도 할당을 받은 Planning만 prep index의 현재 Step0.status를
|
||||||
|
`error -> pending` 한 값으로 바꾼다. error_message/failed_at/started_at/created_at/
|
||||||
|
attempt_history2/owned_paths와 다른 fields/top/raw는 그대로 둔다. 현재 Planning dispatch는
|
||||||
|
이 status edit를 허용하지 않는다. 반환 감사 뒤 Coordinator가 다음 Executor control
|
||||||
|
checkpoint를 할당하고 clean을 확인한다. 일반 환경 복구이므로 새 사용자 승인은 필요하지 않다.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$ErrorActionPreference = 'Stop'
|
||||||
|
$mfePython = Join-Path (Get-Location).Path '.harness/build/mitc4-eigen-evidence/prep/classifier-correction/pytest-venv/Scripts/python.exe'
|
||||||
|
if (-not (Test-Path -LiteralPath $mfePython -PathType Leaf)) { throw 'Named Python missing' }
|
||||||
|
@'
|
||||||
|
import json
|
||||||
|
from pathlib import Path
|
||||||
|
from scripts import execute
|
||||||
|
phase="mitc4-shell-feast-eigen-execution-prep"
|
||||||
|
ex=execute.StepExecutor(phase);root=Path(ex._root)
|
||||||
|
assert Path.cwd().resolve()==root
|
||||||
|
assert Path(ex._run_git_checked("rev-parse","--show-toplevel").stdout.strip()).resolve()==root
|
||||||
|
assert ex._is_isolated_worktree() and ex._codex_sandbox_mode()=="workspace-write"
|
||||||
|
branch,head=ex._git_execution_identity();assert branch=="refs/heads/feat-"+phase
|
||||||
|
path="phases/"+phase+"/index.json"
|
||||||
|
before=json.loads(ex._run_git_checked("show","HEAD:"+path).stdout)
|
||||||
|
assert before["steps"][0]["status"]=="error" and len(before["steps"][0]["attempt_history"])==2
|
||||||
|
expected=json.loads(json.dumps(before));expected["steps"][0]["status"]="pending"
|
||||||
|
assert ex._read_phase_index()==expected
|
||||||
|
assert set(ex._assert_step_scope(()))=={path}
|
||||||
|
assert not ex._run_git_checked("diff","--cached","--name-only").stdout.strip()
|
||||||
|
frozen={p:(root/p).read_bytes() for p in (path,"phases/index.json","phases/"+phase+"/step0-output.json")}
|
||||||
|
assert ex._commit_paths([path],"chore(mitc4-shell-feast-eigen-execution-prep): queue short-temp environment recovery")
|
||||||
|
new_branch,new_head=ex._git_execution_identity()
|
||||||
|
assert new_branch==branch and new_head!=head
|
||||||
|
assert ex._run_git_checked("diff-tree","--no-commit-id","--name-only","-r",new_head).stdout.splitlines()==[path]
|
||||||
|
assert all((root/p).read_bytes()==v for p,v in frozen.items())
|
||||||
|
assert ex._read_phase_index()==expected and not ex._worktree_paths()
|
||||||
|
ex._preflight_repository()
|
||||||
|
print(json.dumps({"commit":new_head,"status":"pending","history_count":2,"clean":True}))
|
||||||
|
'@ | & $mfePython -B -X utf8 -
|
||||||
|
$mfeStatusExit = $LASTEXITCODE
|
||||||
|
if ($null -eq $mfeStatusExit) { throw 'Native exit unavailable' }
|
||||||
|
exit $mfeStatusExit
|
||||||
|
```
|
||||||
|
|
||||||
|
이어 [E7의 짧은 TEMP와 정상 sandbox](implementation-environment.md#e7-짧은-temp를-사용하는-정상-재개)로
|
||||||
|
prep를 재개한다. 이전 E6의 one-time DFA 승인은 사용 완료됐고 Hook7500은 안전하게
|
||||||
|
보존되므로 이번에는 DFA flag나 danger-full-access 환경을 사용하지 않는다.
|
||||||
|
Main도 full prep gate/Coordinator 사후 감사 뒤 같은 짧은 환경과 workspace-write로 실행한다.
|
||||||
|
Source classifier의 harness r2 Correction allowance는 이미 사용됐으며 두 번째 source
|
||||||
|
Correction은 허용하지 않는다. 같은 테스트·전체 VERIFY·Hook·retry/ownership guard를 유지한다.
|
||||||
|
|
||||||
|
재개 Implementation은 기존 RED/GREEN을 읽고 focused/full을 실제 재검증한다. Full CTest는
|
||||||
|
기존 정적 reference를 읽고 비교하므로 보고서의 'reference를 읽거나 비교하지 않았다' 문장은
|
||||||
|
owner가 바로잡아야 한다. 원본 reference의 직접 수정 없음, 새 eigen reference 비교 없음과
|
||||||
|
기존 static regression 비교 수행을 구분하고 당시 실패·미실행 기록도 보존한다.
|
||||||
|
Planning은 implementation-prep-evidence.md를 수정하지 않는다.
|
||||||
|
|
||||||
|
이 R7의 commit/status edit/재실행은 아직 미실행이다. 정적 검사 결과와 갱신3문서 hash는
|
||||||
|
handoff에 기록하며 실제 실행 exit·commit path/bytes·clean 확인은 Coordinator가 감사한다.
|
||||||
|
|||||||
Reference in New Issue
Block a user