[verified] Canonicalize native review publication journals

This commit is contained in:
2026-10-11 09:51:49 +00:00
parent 18222f2ca8
commit 17751f65fe
12 changed files with 1444 additions and 57 deletions
+9
View File
@@ -569,3 +569,12 @@ Command deadline 계약: 새 plan의 각 command는 `timeout_seconds`를 명시
`evidence-manifest/v3`는 실제 timeout, `execution_status`, `termination`의 `term_sent`·`kill_sent`·`direct_child_reaped`·`group_cleanup_completed` boolean 기록과 안전한 bounded 부분 출력을 결합한다. 새 claim pointer는 기존 6개에 timeout·실행 상태·종료 기록을 추가한 9개다. Linux `/proc`로 같은 group의 non-zombie 프로세스를 확인하며 확인·정리에 실패하면 `cleanup_failed`로 차단한다. TERM grace는 0.25 초, KILL 후 group 종료·direct-child 회수 예산은 0.5 초이며 오류 fallback wait도 0.1 초로 제한한다. 새 command의 `max_output_bytes`는 0–1048576 범위의 non-boolean 정수만 허용한다. `execution_status`는 `completed|timeout|output_limit|cleanup_failed|descendant_cleanup`이다. 정상 종료 leader 뒤의 살아 있는 descendant를 신호로 정리한 경우도 `descendant_cleanup` 실패이며, `completed`에는 TERM/KILL 신호가 있을 수 없다. Timeout·출력 한도 초과·정리 실패는 expected exit code와 같아도 성공이 아니며 **TDD RED** 또는 제품 assertion 실패로 분류하지 않는다. 해당 실행은 실패로 보존하고 뒤의 command를 실행하지 않으며, 실행된 prefix의 claim만 기록한다. Partial output에도 기존 secret 탐지를 적용하고 인증정보 유출은 fail-closed한다. 자동 재실행은 하지 않으며 새로 승인된 실행에는 새 run-id를 사용한다.
기존 `evidence-manifest/v2`는 명시적 `validate-archived-v2 --contract-path <canonical-contract> --repo-root <checkout> --artifact-root <canonical-run> --manifest <run-relative-manifest>`로 read-only 호환 검증한다. Canonical identity, exact current HEAD, source/plan/output binding을 유지하지만 과거 기록에 없던 timeout이나 종료 보장을 추론하지 않는다. 새 `run`/`validate`에는 v2 fallback이 없다. v1은 기존 `validate-legacy`만 사용한다. 두 archive 경로의 성공은 새 실행·TDD RED·fresh publication proof가 아니며 기존 artifact를 수정하거나 새 schema로 자동 변환하지 않는다.
## Canonical native-review journal
Native publication의 retained root는 `<harness-root>/harness/.runtime/native-review-journals`이며 repository cache/worktree 및 caller의 run directory와 별개의 binding registry다. `canonical_journal_path(plan)` 계산은 권한 증명이 아니다. Authenticated origin/repository/Issue/PR/head/contract/reviewer binding, full-plan 충돌, durable presence anchors, mode0700/0600 및 nonblocking mutex 정책을 적용한다. Alternate path와 missing/interrupted 상태를 자동 repair하거나 새 POST의 근거로 사용하지 않는다.
기존 intent의 재개는 read-only reconciliation뿐이며 legacy는 사전 digest·현재 role/lease/adoption 검증 후 명시적 `register_legacy_journal`로만 등록한다. Import pending receipt를 복사 전에 fsync하고 완료 receipt 전 게시를 차단한다. 원본 journal을 자동 이동·삭제하지 않는다. 외부 write와 canonical Issue lease의 acquire/renew/final verification/release/cleanup 계약은 그대로 유지한다. Same-install cooperative filesystem만 보호하며 cross-host global exactly-once를 주장하지 않는다.
구체적인 registry/legacy/retention 계약은 [native review reference](../agents/review/skills/gitea-code-review/references/native-review.md#canonical-native-review-journal)를 정본으로 따른다. `.gitignore`의 `/harness/.runtime/` 보호를 유지하며 journal을 Git commit·source evidence bundle에 포함하지 않는다.