docs: align eigen implementation steps with validated Ninja preset
This commit is contained in:
@@ -903,3 +903,171 @@ Root의 **actual canonical7500/enabled/trusted** evidence가 확인되기 전에
|
||||
새 native를 할당하지 않는다. 새 DFA/remote 권한은 없다. 현재 정상 invocation은
|
||||
[E11](implementation-environment.md#e11-실제-local-설정에-대한-정상-invocation)을 따른다.
|
||||
이번 task는 Planning3문서뿐이며 phase/status/Git/설정/실행 권한이 아니다.
|
||||
|
||||
## R13. Attempt5 명령 정합과 실패 보존
|
||||
|
||||
[실제 결과](../../.harness/build/mitc4-eigen-evidence/prep/attempt5/e11-result.json)와
|
||||
[terminal audit](../../.harness/build/mitc4-eigen-evidence/prep/attempt5/coordinator-terminal-audit.json)는
|
||||
native2/Codex0·blocked/history5를 보존한다. Manual37/4와 focused136 세 실행은 통과했지만
|
||||
과거 VS configure/build를 실행해 build1이었다. Manual CTest/full pytest는 미실행이다.
|
||||
Registered local Ninja의 full362/CTest·Stop Python·wrapper0은 별도 자동 결과이며
|
||||
registered build exit의 관찰 공백도 남긴다. 이는 새 local Ninja 실패나 source Correction이 아니다.
|
||||
[명령 원시 관찰](../../.harness/build/mitc4-eigen-evidence/prep/attempt5/manual-command-events-observation.json)을
|
||||
유지하고 r.output-only 표시 때문에 결과가 보이지 않았던 실행을 미실행으로 바꾸지 않는다.
|
||||
|
||||
현재 prep/main9 Step 본문의 active CMake/CTest를 local preset으로 직접 고쳤다.
|
||||
Root가 frozen 관리/Planning/9 Step definitions/사용자 설명문서를 먼저 exact checkpoint한 뒤,
|
||||
Coordinator가 아래 unchanged Executor로 report1 WIP와 controls2 blocked metadata를 분리 commit한다.
|
||||
Source/config/reference/Hook, current history5/첫4 history 및 raw는 보존하고
|
||||
`_commit_step`, 완료 판정·reset·guard 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="c051adc9c3feb4ff85758eeaf06ae08be277b097"
|
||||
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","msvc-build-access-error.md","implementation-plan.md","implementation-environment.md","implementation-recovery.md")}
|
||||
definitions={"phases/"+phase+"/step0.md"}|{"phases/mitc4-shell-feast-eigen/step"+str(i)+".md" for i in range(8)}
|
||||
assert set(ex._run_git_checked("diff","--name-only","--no-renames",origin,"HEAD").stdout.splitlines())<=docs|definitions
|
||||
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":"7789386f17c416fb21cd82514e71f1504e6ee8998bc9e886931d55bb76eeec62",
|
||||
"phases/index.json":"b291eebdf5782763bcad37d7c22de91c813c44922c76b8cbdd0b019f71b3b612",
|
||||
"phases/"+phase+"/index.json":"6d4ba8f2960bf55169b1ffac740151014bf5d8a47673ecdec5c557c65629cf0e",
|
||||
"phases/"+phase+"/step0-output.json":"915c56af488d477cbff46b24d1744e46305d50cac71d77466a8fcf49508302c9",
|
||||
"scripts/execute.py":"64f5165fc544b3b17904c633ef3b222de79b52a0960e254c5b5c4eb99e79c2d0",
|
||||
"tests/test_execute.py":"0eb0c1ca0f25199e00686b7e3ab57672b1390437d09da218a929added0346dd6"}
|
||||
expected.update({
|
||||
".gitignore":"e9a67c202173c7b049429bb3eddc6dd921a4a76e7a5d248604fa8bdfb2ecdd68",
|
||||
"CMakeUserPresets.json":"c4665b004be903c4beb913967143c0b0ac4da7e7d857a8c2f09e48754e865e9c",
|
||||
".harness/config.json":"47ea5f1da7f6c0312429ead5a3d6d1c71fa884c49e511c1608e7fcccd90d796d",
|
||||
".harness/build-ninja-msvc-debug/CMakeCache.txt":"f58c337fc09fccd29c088b2a65859f6c925322dfc8eb7bea9d1509518a2b3d87",
|
||||
".harness/build/CMakeCache.txt":"d880104fdc3f1411119ce787c0ddb9a63db23de3f571ba2fedce1c56cb91085b"})
|
||||
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
|
||||
canonical=Path("C:/git/FESADev/.codex/hooks.json")
|
||||
canonical_bytes=canonical.read_bytes()
|
||||
assert hashlib.sha256(canonical_bytes).hexdigest()=="c8065e7b60882da5db3f90d57b265da25b3c25980bf669d0b1da863e621871ca"
|
||||
idx=ex._read_phase_index();top=ex._read_top_index()
|
||||
assert idx["steps"][0]["status"]=="blocked" and len(idx["steps"][0]["attempt_history"])==5
|
||||
assert next(p for p in top["phases"] if p["dir"]==phase)["status"]=="blocked"
|
||||
owned=ex._step_owned_paths(idx["steps"][0]);assert len(owned)==9
|
||||
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)+list(definitions)+["phases/mitc4-shell-feast-eigen/index.json","docs/mitc4-shell-feast-eigen/msvc-build-access-error.md"]}
|
||||
for paths,message in (
|
||||
(code,"chore(mitc4-shell-feast-eigen-execution-prep): WIP prep report with manual backend mismatch"),
|
||||
(control,"chore(mitc4-shell-feast-eigen-execution-prep): preserve attempt 5 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
|
||||
assert canonical.read_bytes()==canonical_bytes
|
||||
print(json.dumps({"commit":new_head,"paths":actual,"status":"blocked","history_count":5}))
|
||||
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/clean 감사 뒤 **별도 Planning 할당**에서 Step0.status의
|
||||
`blocked -> pending` 한 값만 바꾼다. 다른 bytes/JSON·timestamp·blocked fields·owned_paths·
|
||||
history5·top/raw를 보존한다. 그 한 값 diff를 감사한 Coordinator만 아래 control checkpoint를 실행한다.
|
||||
이번 Planning은 status를 바꾸거나 어느 명령도 실행하지 않았다.
|
||||
|
||||
```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 hashlib,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
|
||||
origin="c051adc9c3feb4ff85758eeaf06ae08be277b097"
|
||||
ex._run_git_checked("merge-base","--is-ancestor",origin,"HEAD")
|
||||
report="docs/mitc4-shell-feast-eigen/implementation-prep-evidence.md"
|
||||
controls={"phases/index.json","phases/"+phase+"/index.json"}
|
||||
docs={"docs/mitc4-shell-feast-eigen/"+n for n in ("FEATURED_AGENTS.md","PRD.md","ADR.md",
|
||||
"coordination.md","msvc-build-access-error.md","implementation-plan.md","implementation-environment.md","implementation-recovery.md")}
|
||||
definitions={"phases/"+phase+"/step0.md"}|{"phases/mitc4-shell-feast-eigen/step"+str(i)+".md" for i in range(8)}
|
||||
assert set(ex._run_git_checked("diff","--name-only","--no-renames",origin,"HEAD").stdout.splitlines())<=docs|definitions|controls|{report}
|
||||
for paths,probe in ((controls,"phases/"+phase+"/index.json"),({report},report)):
|
||||
commit=ex._run_git_checked("log","-1","--format=%H","--",probe).stdout.strip()
|
||||
actual=set(ex._run_git_checked("diff-tree","--no-commit-id","--name-only","--no-renames","-r",commit).stdout.splitlines())
|
||||
assert actual==paths
|
||||
protected={".codex/hooks.json":"e7e5d3c0c4fcd1e33b60680122ea7c42298d5cbde78a7f87d9e0007bf60a0fa4",
|
||||
"scripts/execute.py":"64f5165fc544b3b17904c633ef3b222de79b52a0960e254c5b5c4eb99e79c2d0",
|
||||
"tests/test_execute.py":"0eb0c1ca0f25199e00686b7e3ab57672b1390437d09da218a929added0346dd6",
|
||||
report:"7789386f17c416fb21cd82514e71f1504e6ee8998bc9e886931d55bb76eeec62",
|
||||
"phases/index.json":"b291eebdf5782763bcad37d7c22de91c813c44922c76b8cbdd0b019f71b3b612",
|
||||
"phases/"+phase+"/step0-output.json":"915c56af488d477cbff46b24d1744e46305d50cac71d77466a8fcf49508302c9",
|
||||
".gitignore":"e9a67c202173c7b049429bb3eddc6dd921a4a76e7a5d248604fa8bdfb2ecdd68",
|
||||
"CMakeUserPresets.json":"c4665b004be903c4beb913967143c0b0ac4da7e7d857a8c2f09e48754e865e9c",
|
||||
".harness/config.json":"47ea5f1da7f6c0312429ead5a3d6d1c71fa884c49e511c1608e7fcccd90d796d",
|
||||
".harness/build-ninja-msvc-debug/CMakeCache.txt":"f58c337fc09fccd29c088b2a65859f6c925322dfc8eb7bea9d1509518a2b3d87",
|
||||
".harness/build/CMakeCache.txt":"d880104fdc3f1411119ce787c0ddb9a63db23de3f571ba2fedce1c56cb91085b"}
|
||||
for p,h in protected.items():assert hashlib.sha256((root/p).read_bytes()).hexdigest()==h,p
|
||||
canonical=Path("C:/git/FESADev/.codex/hooks.json")
|
||||
canonical_bytes=canonical.read_bytes()
|
||||
assert hashlib.sha256(canonical_bytes).hexdigest()=="c8065e7b60882da5db3f90d57b265da25b3c25980bf669d0b1da863e621871ca"
|
||||
path="phases/"+phase+"/index.json"
|
||||
before=json.loads(ex._run_git_checked("show","HEAD:"+path).stdout)
|
||||
assert before["steps"][0]["status"]=="blocked" and len(before["steps"][0]["attempt_history"])==5
|
||||
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,*protected,*definitions]}
|
||||
assert ex._commit_paths([path],"chore(mitc4-shell-feast-eigen-execution-prep): queue aligned local preset verification")
|
||||
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()
|
||||
assert canonical.read_bytes()==canonical_bytes
|
||||
ex._preflight_repository()
|
||||
print(json.dumps({"commit":new_head,"status":"pending","history_count":5,"clean":True}))
|
||||
'@ | & $mfePython -B -X utf8 -
|
||||
$mfeStatusExit = $LASTEXITCODE
|
||||
if ($null -eq $mfeStatusExit) { throw 'Native exit unavailable' }
|
||||
exit $mfeStatusExit
|
||||
```
|
||||
|
||||
Root/Coordinator는 actual invocation 동안 non-owned 편집·commit을 멈춘다.
|
||||
WIP나 checkpoint 실패 시 이미 만든 commit과 dirty bytes/원시 evidence를 보존하고 반환한다.
|
||||
이후 같은 [E11](implementation-environment.md#e11-실제-local-설정에-대한-정상-invocation)의
|
||||
workspace-write/terra/xhigh/유한14400 새 process를 별도 할당한다. Step에 직접 적힌
|
||||
local preset·직렬 clean-first·세 discovery·모든 Python/full CTest·fresh manual/reference·
|
||||
registered actual evidence를 완료해야 하며 자동 결과로 manual 실패를 대체하지 않는다.
|
||||
새 source key/DFA/policy/runner 변경이나 자동 재시도는 없다.
|
||||
|
||||
Reference in New Issue
Block a user