docs: preserve MITC4 prep sandbox failure and recovery boundary
This commit is contained in:
@@ -547,3 +547,102 @@ Planning은 implementation-prep-evidence.md를 수정하지 않는다.
|
||||
|
||||
이 R7의 commit/status edit/재실행은 아직 미실행이다. 정적 검사 결과와 갱신3문서 hash는
|
||||
handoff에 기록하며 실제 실행 exit·commit path/bytes·clean 확인은 Coordinator가 감사한다.
|
||||
|
||||
## R8. Attempt3의 blocked 기록 보존
|
||||
|
||||
현재 경계는 [attempt3 archive](../../.harness/build/mitc4-eigen-evidence/prep/attempt3/terminal-archive.json)와
|
||||
[Root 환경 관찰](../../.harness/build/mitc4-eigen-evidence/prep/attempt3/root-manual-build-environment-observation.json)이다.
|
||||
E7 native는 짧은 TEMP/TMP를 같은 build shell에 실제 지정했지만 FileTracker 접근 거부로
|
||||
manual build가 실패했다. Classifier37/focused136은 통과했으며 manual CTest/full pytest는
|
||||
미실행이다. Registered Stop의 build/CTest 성공은 이 manual 실패를 대체하지 않는다.
|
||||
현재 Step0은 blocked/history3이며 이전 두 history와 원시 기록을 보존한다.
|
||||
|
||||
이번 할당은 보존 명령의 문서화와 정적 확인뿐이다. Root가 동결된 관리2문서
|
||||
`FEATURED_AGENTS.md`, `coordination.md`와 Planning3문서를 exact-path checkpoint한 뒤,
|
||||
Coordinator가 아래 unchanged Executor method invocation을 실행한다. 첫 commit은
|
||||
Implementation 보고서1개의 WIP, 둘째는 phase/top controls2개의 blocked metadata이다.
|
||||
완료 판정·`_commit_step`·status reset·Hook/source 변경·guard override는 없다.
|
||||
현재 origin 이후 수정 가능한 선행 commit 경로도 이5문서로 제한한다. Source2와 Hook은
|
||||
현재 hash/내용 그대로이며, staging은 비어 있어야 한다. Linked root/branch, 실제
|
||||
`_assert_step_scope`, staged-path guard와 실행 전후 bytes/전체 JSON 비교를 유지한다.
|
||||
|
||||
```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="dc6b9b1cf70b0ca1685eb1ac5476aa6f8cd3dab6"
|
||||
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","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":"1e4d61997817b84b1df3933c6aa6518f030ca413edcda74393e0a0cf805e6732",
|
||||
"phases/index.json":"42c9581868cc3f552ea3b42764a291098f648352f31021c7bdd7b4bebcdcf91e",
|
||||
"phases/"+phase+"/index.json":"f863def2d19869ccb0cdc058b32c240b786a6d94a4a761cc98f9eeae62cd4c36",
|
||||
"phases/"+phase+"/step0-output.json":"d106f7ade2d678b6e0b383439b1b9b8d25f5ec32e883aed50c6fb4949a8983f1",
|
||||
"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)
|
||||
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"]=="blocked" and len(idx["steps"][0]["attempt_history"])==3
|
||||
assert next(p for p in top["phases"] if p["dir"]==phase)["status"]=="blocked"
|
||||
owned=ex._step_owned_paths(idx["steps"][0])
|
||||
code=["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 prep report with native build blocked"),
|
||||
(control,"chore(mitc4-shell-feast-eigen-execution-prep): preserve attempt 3 blocked 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":"blocked","history_count":3}))
|
||||
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
|
||||
```
|
||||
|
||||
각 실제 commit 직후 경로와 전체 snapshot을 확인하고, 마지막 clean preflight와 native
|
||||
exit를 즉시 보존·전파한다. 중간 실패 시 이미 생성된 commit과 남은 dirty 내용을 보존해
|
||||
Coordinator로 반환하며 명령을 무조건 반복하지 않는다. 원시 archive와 report의 당시 실패를
|
||||
삭제하거나 WIP commit을 full VERIFY 통과로 해석하지 않는다.
|
||||
|
||||
이 보존과 Coordinator 감사가 실제 완료된 뒤에만 별도 Planning dispatch로
|
||||
`steps[0].status`의 `blocked -> pending` 한 값 변경을 할당할 수 있다. 당시 history3,
|
||||
blocked_reason/blocked_at/started_at/created_at 및 모든 다른 값, top/raw를 보존한다.
|
||||
그 status-only edit의 actual Executor checkpoint와 재실행 명령은 다음 bounded delta에서
|
||||
확정한다. 이번에는 reset하거나 실행하지 않는다. 현재 정상 backend 대안과 미완료
|
||||
활성화 경계는 [E8](implementation-environment.md#e8-attempt3-후의-정상-backend-대안)에 있다.
|
||||
|
||||
다음 Implementation은 기존 RED/GREEN과 실패 기록을 읽고 전체 검증을 다시 수행해야 한다.
|
||||
기존 full CTest는 static reference를 읽고 비교한다. 보고서 owner는 원본의 직접 수정 없음,
|
||||
새 eigen comparison 미실행, 기존 static regression 비교를 구분하도록 현재 광범위한
|
||||
reference 미사용 문장을 바로잡는다. Planning은 해당 보고서를 수정하지 않는다.
|
||||
Harness r2 source Correction1회는 사용 완료됐으며 두 번째 source correction은 허용하지 않는다.
|
||||
|
||||
Reference in New Issue
Block a user