docs: preserve prep failure and short-temp recovery plan
This commit is contained in:
@@ -257,3 +257,111 @@ CMake/MSVC/x64/Debug configure/build와 전체 CTest discovery/run은 기존 Ste
|
||||
명령을 같은 inherited TEMP/TMP에서 별도로 실행한다. 실패 시 actual command/exit와 남은
|
||||
검증을 기록한다. Registered Stop을 수동 full 검증으로 대체하지 않으며 원 보고서 갱신은
|
||||
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' }
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user