Skip to content

docs(eval): define terminal observation boundary - #3

Merged
jgoneit merged 1 commit into
mainfrom
codex/eval-terminal-boundary
Aug 28, 2026
Merged

docs(eval): define terminal observation boundary#3
jgoneit merged 1 commit into
mainfrom
codex/eval-terminal-boundary

Conversation

@jgoneit

@jgoneit jgoneit commented Aug 28, 2026

Copy link
Copy Markdown
Owner

목적

assistant 턴 종료를 Task terminal로 오인하면, 사용자 입력이나 설정을 기다렸다가 재개되는 Task에서 Eval 관찰이 너무 일찍 기록되거나 누락될 수 있습니다. 이 PR은 CLI·JSON 스키마·Journal 형식·20행 제한을 바꾸지 않고 Native Agent와 Host가 적용할 terminal 판정 경계를 문서화합니다.

변경 내용

  • 사용자 입력·승인·설정·권한 대기와 재개 가능한 Ward/Seal 중단을 nonterminal로 정의했습니다.
  • completed, failed, abandoned의 terminal 의미를 좁히고, 사용자 침묵으로 abandoned를 추론하지 않도록 명시했습니다.
  • nonterminal 턴에서는 evalctl observe를 호출하지 않고, 같은 Task가 재개되면 최종 terminal에서 한 번만 호출하도록 명시했습니다.
  • ward profile의 Eval 전용 writable root preflight와 실패한 실험 run의 중단·격리·새 activation 경계를 문서화했습니다.
  • terminal 기록 뒤 같은 목적이 다시 열리는 경우 correction을 지원하지 않는 최소 실험의 한계를 명시했습니다.

설계 판단

  • 선택한 방식:
    • 기존 Native Agent/Host 정책 계약을 README에 명시하고 현재 CLI 및 저장 형식은 유지합니다.
  • 대안:
    • Hook, Plugin, Task ID, 중복 보정 또는 correction 스키마를 추가하는 방식입니다.
  • 선택 이유:
    • 이번 20-Task 실험은 terminal 경계와 최소 저장 권한만 검증하며, 새 런타임 책임이나 식별자 수집을 추가하지 않는 범위입니다.
  • 포기한 것:
    • Host terminal callback이 없는 abandoned의 Agent 기록과 terminal 이후 reopen correction은 지원하지 않습니다.

검증 방법

  • 단위 테스트 실행
  • 통합 테스트 실행
  • 로컬 수동 테스트
  • 회귀 영향 확인
  • 문서 확인

검증 결과

  • gofmt -l . 결과 없음
  • go vet ./... 통과
  • go test ./... 통과
  • go test -race ./... 통과
  • go build ./cmd/evalctl 통과
  • fresh root Task에서 ward profile과 Eval exact writable root 적용 확인
  • 분리된 preflight state root에서 status=recorded, slot=1, durability=confirmed, 디렉터리 0700, 파일 0600 확인
  • 다중 턴 Host E2E에서 nonterminal 0회, 재개 후 completed 1회, 재개 경로 없는 failed 1회, 사용자 무응답 시 abandoned 미생성을 확인
  • production Journal은 preflight 및 E2E에서 변경하지 않음

영향 범위

  • README.md의 Host experiment 운영 계약
  • Native Agent의 terminal 판정 및 관찰 호출 시점
  • Host의 ward profile preflight와 실험 run 재시작 절차
  • CLI, JSON 스키마, Journal 형식, 버전에는 변경 없음
  • 사용자 전역 ~/.codex/config.toml~/.codex/AGENTS.md는 Host별 설정이므로 이 PR에 포함하지 않음

리스크

  • 실제 동작은 Native Agent가 README/AGENTS 정책을 따르고 Host가 preflighted ward profile을 선택하는 데 의존합니다.
  • Host terminal callback이 없으면 abandoned는 Journal에 Agent observation으로 남지 않습니다.
  • terminal 기록 후 같은 목적이 다시 열리면 correction 없이 해당 실험 run을 중단해야 합니다.
  • 런타임 코드는 바뀌지 않아 코드 회귀 위험은 낮지만, Host 운영 절차를 잘못 적용하면 missed attempt가 발생할 수 있습니다.

롤백 방법

  • 이 문서 커밋을 revert하면 이전 Host experiment 설명으로 되돌릴 수 있습니다.
  • 이미 활성화된 실험 run은 이전 activation timestamp로 재사용하지 않고, 해당 Journal subtree를 격리한 뒤 새 activation으로 시작해야 합니다.

리뷰어가 중점적으로 봐야 할 부분

  • terminal/nonterminal 경계가 재개 가능한 Task lifecycle을 충분히 구분하는지
  • failed와 Host-supplied abandoned의 권한 경계가 명확한지
  • preflight 실패와 terminal 이후 reopen을 실험 run 중단으로 처리하는 범위가 적절한지
  • CLI·스키마·Task identity를 추가하지 않는 최소 실험 범위가 유지됐는지

Agent Note

  • Agent 책임:
    • Task의 eventual terminal outcome을 판정하고 terminal에서 한 번만 관찰을 시도합니다.
  • State 변경:
    • 제품 state/schema 변경은 없으며 Host experiment lifecycle 문구만 보강합니다.
  • Tool 호출:
    • nonterminal에서는 호출하지 않고 terminal 확정 뒤 evalctl observe를 한 번만 호출합니다.
  • Retry / fallback:
    • 저장 실패를 재시도·수리하지 않으며, terminal 이후 reopen도 보정하지 않습니다.
  • Human-in-the-loop 필요 여부:
    • Host가 activation, permission profile, 명시적 abandoned, run 중단·격리를 관리해야 합니다.
  • 비용/지연 리스크:
    • terminal 시점의 단일 로컬 호출 외 추가 실행 비용은 없지만, fresh-task E2E와 20건 수동 대조가 필요합니다.
  • 벤더 종속 리스크:
    • 실험 운영은 Codex의 global AGENTS.md 로딩과 managed permission profile 동작에 의존합니다.

Why:
- Assistant turn completion could be mistaken for a terminal task outcome, causing premature or missing observations across resumable tasks.

What:
- Define nonterminal waiting and recoverable Ward or Seal stop states.
- Narrow completed, failed, and Host-supplied abandoned outcomes.
- Require one observation only after the eventual terminal outcome.
- Document the Ward state-root preflight and aborted-run restart boundary.

Validation:
- gofmt -l .
- go vet ./...
- go test ./...
- go test -race ./...
- go build ./cmd/evalctl
- Ward exact-root permission smoke and multi-turn Host E2E
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-28T23:19:18.385263Z b9b5ecb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jgoneit jgoneit self-assigned this Aug 28, 2026
@jgoneit

jgoneit commented Aug 28, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: b9b5ecb059

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@jgoneit
jgoneit merged commit 8df83c2 into main Aug 28, 2026
5 checks passed
@jgoneit
jgoneit deleted the codex/eval-terminal-boundary branch August 28, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant