<!-- task=m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence plan=10 tag=REVIEW_OFR-S07-DURABLE-TERMINAL-10 -->

# Capture durable S07 foreground evidence

## For the Implementing Agent

Filling implementation-owned sections in `CODE_REVIEW-cloud-G08.md` is mandatory. Execute only the scoped remote evidence recovery, run every applicable verification command, record actual notes and output in the review file, keep the active pair in place, and report ready for official review.

If blocked, record the exact blocker, attempted commands/output, mutation and invocation counts, and resume condition only in implementation-owned evidence fields. Do not ask the user, call user-input tools, create control-plane stop files, classify the next review state, archive logs, or write `complete.log`.

This plan authorizes no code, checkout, runtime, configuration, credential, provider, Control Plane, Node, or roadmap mutation. It authorizes one fresh immutable attempt 2 and, only after the exact transient classifier permits it, one fresh immutable attempt 3 against the already verified plan-9 overlay and unchanged deployed candidate. Preserve attempt 1 and all earlier artifacts.

## Background

The channel-aware repeat evidence, local tests, isolated remote profile, overlay identity, and attempt-1 summary are accepted. Attempt 1 cannot close S07 because its foreground command left no durable exit result or success-only accepted record. This follow-up adds no product behavior; it captures an atomic terminal record for a fresh attempt and accepts only a structurally validated successful summary.

## Archive Evidence Snapshot

- `plan_cloud_G08_9.log` / `code_review_cloud_G08_9.log`: FAIL with one Required finding and trusted local/remote audit evidence.
- The channel-aware content/reasoning parser, production alias precedence, deterministic fixtures, fresh local profiles, three-file overlay, unchanged deployed candidate, and zero restart result remain accepted.
- Preserved `plan-9/attempt-1` contains 15 raw SSE files and a structurally valid `reproduced` summary, but no durable terminal exit or `accepted-attempt`; it is not an accepted attempt and must not be modified or promoted.
- Reviewer preflight on 2026-07-30 confirmed clean base HEAD `750cb1d1cb88066a10d3c703c99f1326306d8e15`, overlay integrity, runtime hash `e0eff854e5c6841e6dd5cafcd7242254c91ece26b4ad328a2b937acca42122e5`, Edge PID `20646`, five listeners, four connected nodes, idle healthy `3+1` capacity, authenticated `/v1/models` HTTP 200, absent harness, absent accepted marker, and fresh attempt-2/attempt-3 paths.

## Roadmap Targets

- Milestone: `agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/openai-compatible-output-validation-filters.md`
- Milestone link: [Milestone document](agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/openai-compatible-output-validation-filters.md)
- Task ids:
  - `repeat-guard`: rolling content/history/action repetition detection and safe continuation
- Completion mode: check-on-pass

## Analysis

### Files Read

- `agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/PLAN-cloud-G08.md`
- `agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/CODE_REVIEW-cloud-G08.md`
- `agent-ops/rules/project/domain/edge/rules.md`
- `agent-ops/rules/project/domain/testing/rules.md`
- `agent-test/local/rules.md`
- `agent-test/local/edge-smoke.md`
- `agent-spec/runtime/stream-evidence-gate.md`
- `agent-spec/input/openai-compatible-surface.md`
- `agent-contract/outer/openai-compatible-api.md`
- `agent-roadmap/phase/knowledge-tool-optimization-extension/PHASE.md`
- `agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/openai-compatible-output-validation-filters.md`
- `agent-roadmap/sdd/knowledge-tool-optimization-extension/openai-compatible-output-validation-filters/SDD.md`

### SDD Criteria

- SDD: `agent-roadmap/sdd/knowledge-tool-optimization-extension/openai-compatible-output-validation-filters/SDD.md`; status `[승인됨]`, lock released, no active `USER_REVIEW.md`.
- S03 maps to `repeat-guard`; its deterministic channel-safe continuation, repeat detection, and single-terminal evidence is already accepted.
- S07 requires a capacity+1 `ornith:35b` three-run smoke with raw-free `reproduced` fingerprint/offset or `not_reproduced` evidence. The current task closes only the live-smoke portion embedded in `repeat-guard`; it must not claim the broader `ops-evidence` task.
- Evidence Map S03/S07 therefore requires one accepted immutable attempt with 15 logical provider responses, 15 correlated lifecycles, three capacity rows, a sanctioned result classification, idle cleanup, and no raw prompt/output/tool/auth in tracked evidence.

### Verification Context

- No separate verification handoff was supplied. Repository-native sources are `agent-test/local/rules.md`, `agent-test/local/edge-smoke.md`, the approved SDD, the active pair, the existing plan-9 overlay, and the current remote read-only preflight.
- No source change is planned. Prior fresh local and isolated-remote profiles remain accepted; this packet verifies overlay/runtime identity before every invocation and validates the accepted summary and cleanup afterward.
- Raw token, Authorization header, prompt, model output, raw SSE, status payload, and foreground log content must remain only on the remote ignored artifact path and must not enter tracked evidence or chat output.

#### External Verification Preflight

- Runner/workdir: `ssh toki@toki-labs.com`; base checkout `/Users/toki/agent-work/iop-dev`; Darwin/arm64; `/opt/homebrew/bin/go`.
- Base checkout is clean at `750cb1d1cb88066a10d3c703c99f1326306d8e15`. Existing source overlay is `/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-9-source/iop` with a verified three-file manifest.
- Runtime identity is Edge PID `20646`, binary/config under `/Users/toki/agent-work/iop-dev/build/dev-runtime`, five Edge listeners, and runtime hash `e0eff854e5c6841e6dd5cafcd7242254c91ece26b4ad328a2b937acca42122e5`, equal to the preserved plan-7 candidate.
- Four nodes are connected. Provider capacity is idle and healthy at `3+1`. Host-local SOPS token ref `toki-dev-pi` is usable without exposing the credential, and protected `/v1/models` returns HTTP 200.
- `attempt-1` and its summary are preserved; `accepted-attempt`, `attempt-2`, and `attempt-3` are absent; no S07 harness is running. Confidence is high that the automatic runner can execute the required foreground attempt. The live result remains probabilistic.

### Test Coverage Gaps

- No product-code or deterministic-test gap remains in this packet.
- The only gap is durable integrated evidence: attempt 1 has a valid summary but no trusted terminal exit or success-only accepted record.
- The new wrapper records either one atomic accepted record containing `run_rc=0` and the summary hash, or one atomic non-success terminal record. It never infers success from summary presence alone.

### Symbol References

- None. No source symbol is added, removed, or renamed.

### Split Judgment

Keep one packet. Foreground ownership, terminal capture, summary acceptance, cleanup, and immutable attempt identity form one evidence transaction; splitting them could again separate a valid summary from its trusted terminal result.

### Scope Rationale

- Modify only the active review evidence file.
- Reuse the existing plan-9 overlay; do not rebuild or edit it.
- Do not modify attempt 1, synthesize its marker, merge summaries, or reuse an attempt path.
- Do not build, replace, restart, stop, or reconfigure Edge/Node/Control Plane/provider processes.
- Do not change the remote checkout, tracked source, configuration, credentials, roadmap, contract, spec, or prior task logs.

### Final Routing

- `evaluation_mode=isolated-reassessment`
- `finalizer=finalize-task-policy.sh`, `finalizer_mode=pair`
- Build closures: scope/context/verification/evidence/ownership/decision are all true; no capability gap.
- Build scores: scope coupling 2, state/concurrency 2, blast/irreversibility 0, evidence/diagnosis 2, verification complexity 2; grade `G08`; base basis `local-fit`; final basis `recovery-boundary`; lane `cloud`; filename `PLAN-cloud-G08.md`.
- Review closures are all true. Review scores are `2/2/0/2/2`; grade `G08`; basis `official-review`; lane `cloud`; filename `CODE_REVIEW-cloud-G08.md`; adapter `codex`; model `gpt-5.6-sol`; reasoning effort `xhigh`.
- `large_indivisible_context=false`
- Positive loop-risk signatures: `temporal_state`, `concurrent_consistency`, `boundary_contract`, `structured_interpretation`, `variant_product`; `loop_risk_count=5`.
- `review_rework_count=10`
- `evidence_integrity_failure=true`

## Implementation Checklist

- [ ] [REVIEW_OFR-S07-DURABLE-TERMINAL-10-1] Preserve attempt 1; revalidate the immutable overlay, runtime, authentication, and idle capacity; run fresh foreground attempt 2 with atomic terminal capture and, only after one exact classified transient, fresh attempt 3; validate exactly one accepted summary and cleanup or preserve the terminal stop evidence.
- [ ] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [REVIEW_OFR-S07-DURABLE-TERMINAL-10-1] Capture one accepted immutable S07 attempt

#### Problem

`agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/CODE_REVIEW-cloud-G08.md:176` records a complete attempt-1 artifact with a structurally valid summary but `terminal_exit=unavailable` and `accepted_marker=absent`. Summary presence cannot prove that the foreground command exited successfully, so S07 remains incomplete.

#### Solution

Use the already verified plan-9 source overlay and unchanged runtime. Before an invocation, repeat the read-only identity, authentication, harness, and two-sample idle gates. Start only the next unused ordinal.

For each consumed attempt, redirect raw foreground output to that attempt's ignored remote directory. On exit, atomically write exactly one raw-free terminal artifact:

- Success: atomically create `accepted-attempt` with `attempt`, `run_rc=0`, `state=accepted`, and the accepted summary SHA-256 only after the summary and cleanup validators pass.
- Failure/interruption: atomically create `terminal-attempt-N` with the ordinal, numeric exit code, normalized class, and `state=stopped`.

Attempt 3 is allowed only when `terminal-attempt-2` says `class=retryable-transient` and no accepted marker exists. The classifier accepts exactly one of provider HTTP `429|502|503|504`, connection reset/EOF, or request-deadline families and rejects any ambiguous, contract, assertion, identity, capacity, cleanup, panic, or race signal. Any other result stops.

Before:

```text
attempt-1/summary.json exists
foreground exit unavailable
accepted-attempt absent
```

After:

```text
accepted-attempt: attempt=N run_rc=0 state=accepted summary_sha256=<sha256>
```

or:

```text
terminal-attempt-N: attempt=N run_rc=<nonzero> state=stopped class=<normalized>
```

#### Modified Files and Checklist

- [ ] `agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/CODE_REVIEW-cloud-G08.md` - record the safe preflight marker, raw-free attempt ledger, durable terminal/accepted record, accepted summary evidence, cleanup, invocation count, and zero-restart count.
- [ ] No product source, local/remote checkout, overlay, runtime binary/process/config, credential, provider, Control Plane, Node, roadmap, prior task log, or attempt-1 mutation.

#### Test Strategy

No new unit test is needed because no code changes. Reuse the existing uncached plan-9 overlay profile identity. The required integrated test is the foreground `TestDevRepeatGuardOrnithSmoke` invocation with exact `concurrency=5`, `runs=3`, `request timeout=25m`, and capacity+1 providers. The atomic accepted record is the success oracle; summary presence alone is not.

#### Verification

Run this read-only gate before each consumed attempt. Set only `attempt=2` first; set `attempt=3` only when the previous terminal record is the permitted transient:

```bash
attempt=2
case "$attempt" in 2|3) ;; *) exit 2 ;; esac
ssh -o BatchMode=yes -o ConnectTimeout=15 toki@toki-labs.com \
  "IOP_S07_ATTEMPT=$attempt /bin/zsh -lc 'exec /bin/zsh -s'" <<'REMOTE'
set -euo pipefail
set +x
attempt=${IOP_S07_ATTEMPT:?}
remote_repo=/Users/toki/agent-work/iop-dev
stage_root=/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-9-source
source_root="$stage_root/iop"
artifact_root=/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-9
artifact_dir="$artifact_root/attempt-$attempt"
terminal_record="$artifact_root/terminal-attempt-$attempt"
runtime_root=/Users/toki/agent-work/iop-dev
plan7_source=/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-7-source
secret=/Users/toki/.config/iop/secrets/dev-openai-toki.sops.yaml
age_key=/Users/toki/.config/sops/age/keys.txt
api_key=''

test ! -e "$artifact_root/accepted-attempt"
test ! -e "$artifact_dir"
test ! -e "$terminal_record"
test -d "$artifact_root/attempt-1"
test -f "$artifact_root/attempt-1/summary.json"
if (( attempt == 3 )); then
  test -f "$artifact_root/terminal-attempt-2"
  /usr/bin/grep -qx 'state=stopped' "$artifact_root/terminal-attempt-2"
  /usr/bin/grep -qx 'class=retryable-transient' "$artifact_root/terminal-attempt-2"
fi
test "$(cd "$remote_repo" && git rev-parse HEAD)" = 750cb1d1cb88066a10d3c703c99f1326306d8e15
test -z "$(cd "$remote_repo" && git status --porcelain)"
test "$(<"$stage_root/base-head")" = 750cb1d1cb88066a10d3c703c99f1326306d8e15
(cd "$source_root" && /usr/bin/shasum -a 256 -c "$stage_root/overlay.sha256" >/dev/null)
runtime_hash=$(/usr/bin/shasum -a 256 "$runtime_root/build/dev-runtime/bin/edge" | /usr/bin/awk '{print $1}')
candidate_hash=$(/usr/bin/shasum -a 256 "$plan7_source/edge.candidate" | /usr/bin/awk '{print $1}')
test "$runtime_hash" = "$candidate_hash"
test "$(( $(/bin/ps -p 20646 -o pid= | /usr/bin/wc -w) ))" -eq 1
listeners=$(/usr/sbin/lsof -nP -a -p 20646 -iTCP -sTCP:LISTEN | /usr/bin/awk 'NR>1{print $9}' | /usr/bin/sort | /usr/bin/tr '\n' ',')
test "$listeners" = '*:18082,*:18083,*:18084,*:19101,127.0.0.1:19093,'
! /usr/bin/pgrep -fl '[T]estDevRepeatGuardOrnithSmoke' >/dev/null

for sample in 1 2; do
  /usr/bin/curl -fsS http://127.0.0.1:18001/edges/edge-toki-labs-dev/status |
    /opt/homebrew/bin/jq -e '
      def provider($id): first(.nodes[]?.provider_snapshots[]? | select(.id == $id));
      ((.nodes // []) | length == 4) and (all(.nodes[]; .connected == true)) and
      (provider("onexplayer-lemonade").capacity == 3) and
      (provider("onexplayer-lemonade").health == "healthy") and
      (provider("onexplayer-lemonade").in_flight == 0) and
      (provider("onexplayer-lemonade").queued == 0) and
      (provider("rtx5090-lemonade").capacity == 1) and
      (provider("rtx5090-lemonade").health == "healthy") and
      (provider("rtx5090-lemonade").in_flight == 0) and
      (provider("rtx5090-lemonade").queued == 0)
    ' >/dev/null
  /bin/sleep 2
done

test -x /opt/homebrew/bin/sops
test -r "$age_key"
test -r "$secret"
test "$(/usr/bin/stat -f %Lp "$secret")" = 600
api_key=$(SOPS_AGE_KEY_FILE="$age_key" /opt/homebrew/bin/sops decrypt --extract '["tokens"]["toki-dev-pi"]' "$secret")
test -n "$api_key"
http_status=$(
  {
    print -r -- 'silent'
    print -r -- 'show-error'
    print -r -- 'output = "/dev/null"'
    print -r -- "header = \"Authorization: Bearer $api_key\""
  } | /usr/bin/curl --config - --write-out '%{http_code}' http://127.0.0.1:18083/v1/models
)
test "$http_status" = 200

/bin/mkdir "$artifact_dir"
print -r -- "attempt=$attempt" >"$artifact_dir/foreground-start"
run_rc=125
terminal_class=wrapper-incomplete
accepted=0

write_terminal_record() {
  trap - EXIT HUP INT TERM
  unset api_key
  if (( accepted == 0 )) && [[ ! -e "$terminal_record" ]]; then
    tmp="$artifact_root/.terminal-attempt-$attempt.$$"
    {
      print -r -- "attempt=$attempt"
      print -r -- "run_rc=$run_rc"
      print -r -- "state=stopped"
      print -r -- "class=$terminal_class"
    } >"$tmp"
    /bin/mv "$tmp" "$terminal_record"
  fi
}
trap write_terminal_record EXIT
trap 'run_rc=129; terminal_class=interrupted; write_terminal_record; exit 129' HUP
trap 'run_rc=130; terminal_class=interrupted; write_terminal_record; exit 130' INT
trap 'run_rc=143; terminal_class=interrupted; write_terminal_record; exit 143' TERM

print -r -- "remote_live_start invocation_count=$attempt attempt=$attempt ownership=foreground artifact=plan-9/attempt-$attempt edge_restart_count=0"
set +e
IOP_OPENAI_API_KEY="$api_key" \
IOP_OPENAI_BASE_URL=http://127.0.0.1:18083 \
IOP_OPENAI_MODEL=ornith:35b \
IOP_OPENAI_SMOKE_CONCURRENCY=5 \
IOP_OPENAI_SMOKE_RUNS=3 \
IOP_OPENAI_SMOKE_REQUEST_TIMEOUT=25m \
IOP_OPENAI_SMOKE_PROMPT_FILE=/tmp/iop-repeat-guard-live/repeat-prompt.txt \
IOP_OPENAI_SMOKE_ARTIFACT_DIR="$artifact_dir" \
IOP_OPENAI_SMOKE_OBSERVATION_FILE=/tmp/iop-repeat-guard-live/edge-observations.jsonl \
IOP_OPENAI_SMOKE_STATUS_URL=http://127.0.0.1:18001/edges/edge-toki-labs-dev/status \
IOP_OPENAI_SMOKE_PROVIDER_IDS=onexplayer-lemonade,rtx5090-lemonade \
/opt/homebrew/bin/go test -timeout 90m -count=1 -v ./apps/edge/internal/openai \
  -run '^TestDevRepeatGuardOrnithSmoke$' >"$artifact_dir/foreground.log" 2>&1
run_rc=$?
set -e
unset api_key

if (( run_rc == 0 )); then
  summary="$artifact_dir/summary.json"
  test -f "$summary"
  /opt/homebrew/bin/jq -e '
    (.model == "ornith:35b") and (.concurrency == 5) and (.runs == 3) and
    ((.provider_responses | length) == 15) and
    (all(.provider_responses[];
      ((.provider_response_ids | type) == "array") and
      ((.provider_response_ids | length) >= 1) and
      ((.provider_response_ids | length) <= 4))) and
    (([.provider_responses[].provider_response_ids[]] | unique | length) ==
     ([.provider_responses[].provider_response_ids[]] | length)) and
    ((.lifecycles | length) == 15) and
    (([.lifecycles[].correlation_id] | unique | length) == 15) and
    ((.capacity_runs | length) == 3) and
    (all(.capacity_runs[];
      (.configured_capacity == 4) and (.peak_in_flight == 4) and
      (.peak_queued >= 1) and (.final_in_flight == 0) and (.final_queued == 0))) and
    ((.result == "not_reproduced") or
      ((.result == "reproduced") and
       any(.lifecycles[];
         (.result == "reproduced") and
         (((.fingerprint // "") | length) > 0) and (.offset >= 0))))
  ' "$summary" >/dev/null
  /usr/bin/curl -fsS http://127.0.0.1:18001/edges/edge-toki-labs-dev/status |
    /opt/homebrew/bin/jq -e '
      def provider($id): first(.nodes[]?.provider_snapshots[]? | select(.id == $id));
      (provider("onexplayer-lemonade").in_flight == 0) and
      (provider("onexplayer-lemonade").queued == 0) and
      (provider("rtx5090-lemonade").in_flight == 0) and
      (provider("rtx5090-lemonade").queued == 0)
    ' >/dev/null
  ! /usr/bin/pgrep -fl '[T]estDevRepeatGuardOrnithSmoke' >/dev/null
  test "$(/usr/bin/shasum -a 256 "$runtime_root/build/dev-runtime/bin/edge" | /usr/bin/awk '{print $1}')" = "$candidate_hash"
  test -z "$(cd "$runtime_root" && git status --porcelain)"
  summary_hash=$(/usr/bin/shasum -a 256 "$summary" | /usr/bin/awk '{print $1}')
  accepted_tmp="$artifact_root/.accepted-attempt.$$"
  {
    print -r -- "attempt=$attempt"
    print -r -- "run_rc=0"
    print -r -- "state=accepted"
    print -r -- "summary_sha256=$summary_hash"
  } >"$accepted_tmp"
  /bin/mv "$accepted_tmp" "$artifact_root/accepted-attempt"
  accepted=1
  terminal_class=accepted
  trap - EXIT HUP INT TERM
  print -r -- "remote_live_finish=PASS invocation_count=$attempt accepted_attempt=$attempt durable_terminal=accepted-attempt edge_restart_count=0"
  exit 0
fi

transient_classes=0
if /usr/bin/grep -Eqi 'HTTP[^0-9]*(429|502|503|504)|status[^0-9]*(429|502|503|504)' "$artifact_dir/foreground.log"; then
  transient_classes=$((transient_classes + 1))
fi
if /usr/bin/grep -Eqi 'connection reset|unexpected EOF|connection.*EOF' "$artifact_dir/foreground.log"; then
  transient_classes=$((transient_classes + 1))
fi
if /usr/bin/grep -Eqi 'context deadline exceeded|Client\\.Timeout exceeded|request deadline' "$artifact_dir/foreground.log"; then
  transient_classes=$((transient_classes + 1))
fi
if (( transient_classes == 1 )) &&
   ! /usr/bin/grep -Eqi 'released repeated downstream content|provider response identit|correlat|capacity evidence|terminal grammar|duplicate|summary validation|checkout|runtime hash|overlay|panic:|WARNING: DATA RACE' "$artifact_dir/foreground.log"; then
  terminal_class=retryable-transient
else
  terminal_class=non-retryable
fi
print -r -- "remote_live_finish=FAIL invocation_count=$attempt terminal_class=$terminal_class durable_terminal=terminal-attempt-$attempt edge_restart_count=0"
exit "$run_rc"
REMOTE
```

Expected: preflight exits do not create an attempt. Once `remote_live_start` is printed, the ordinal is consumed. A successful command atomically writes `accepted-attempt`; a non-success writes `terminal-attempt-N`. Never infer transient status from nonzero alone and never start attempt 3 after an ambiguous/non-retryable result.

After one accepted attempt, run the raw-free summary and cleanup validator:

```bash
ssh -o BatchMode=yes -o ConnectTimeout=15 toki@toki-labs.com '/bin/zsh -lc "exec /bin/zsh -s"' <<'REMOTE'
set -euo pipefail
artifact_root=/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-9
runtime_root=/Users/toki/agent-work/iop-dev
plan7_source=/tmp/iop-repeat-guard-live/repeat-guard-task-03-plan-7-source
accepted_record="$artifact_root/accepted-attempt"
test -f "$accepted_record"
accepted_attempt=$(/usr/bin/awk -F= '$1=="attempt"{print $2}' "$accepted_record")
accepted_rc=$(/usr/bin/awk -F= '$1=="run_rc"{print $2}' "$accepted_record")
accepted_state=$(/usr/bin/awk -F= '$1=="state"{print $2}' "$accepted_record")
accepted_hash=$(/usr/bin/awk -F= '$1=="summary_sha256"{print $2}' "$accepted_record")
case "$accepted_attempt" in 2|3) ;; *) exit 2 ;; esac
test "$accepted_rc" = 0
test "$accepted_state" = accepted
summary="$artifact_root/attempt-$accepted_attempt/summary.json"
test -f "$summary"
test "$(/usr/bin/shasum -a 256 "$summary" | /usr/bin/awk '{print $1}')" = "$accepted_hash"
/opt/homebrew/bin/jq -e '
  (.model == "ornith:35b") and (.concurrency == 5) and (.runs == 3) and
  ((.provider_responses | length) == 15) and
  (all(.provider_responses[];
    ((.provider_response_ids | type) == "array") and
    ((.provider_response_ids | length) >= 1) and
    ((.provider_response_ids | length) <= 4))) and
  (([.provider_responses[].provider_response_ids[]] | unique | length) ==
   ([.provider_responses[].provider_response_ids[]] | length)) and
  ((.lifecycles | length) == 15) and
  (([.lifecycles[].correlation_id] | unique | length) == 15) and
  ((.capacity_runs | length) == 3) and
  (all(.capacity_runs[];
    (.configured_capacity == 4) and (.peak_in_flight == 4) and
    (.peak_queued >= 1) and (.final_in_flight == 0) and (.final_queued == 0))) and
  ((.result == "not_reproduced") or
    ((.result == "reproduced") and
     any(.lifecycles[];
       (.result == "reproduced") and
       (((.fingerprint // "") | length) > 0) and (.offset >= 0))))
' "$summary" >/dev/null
result_evidence=$(/opt/homebrew/bin/jq -r '
  if .result == "reproduced" then
    first(.lifecycles[] | select(.result == "reproduced") |
      "result=reproduced fingerprint=\(.fingerprint) offset=\(.offset)")
  else "result=not_reproduced" end
' "$summary")
/usr/bin/curl -fsS http://127.0.0.1:18001/edges/edge-toki-labs-dev/status |
  /opt/homebrew/bin/jq -e '
    def provider($id): first(.nodes[]?.provider_snapshots[]? | select(.id == $id));
    ((.nodes // []) | length == 4) and (all(.nodes[]; .connected == true)) and
    (provider("onexplayer-lemonade").in_flight == 0) and
    (provider("onexplayer-lemonade").queued == 0) and
    (provider("rtx5090-lemonade").in_flight == 0) and
    (provider("rtx5090-lemonade").queued == 0)
  ' >/dev/null
! /usr/bin/pgrep -fl '[T]estDevRepeatGuardOrnithSmoke' >/dev/null
test "$(/usr/bin/shasum -a 256 "$runtime_root/build/dev-runtime/bin/edge" | /usr/bin/awk '{print $1}')" = \
  "$(/usr/bin/shasum -a 256 "$plan7_source/edge.candidate" | /usr/bin/awk '{print $1}')"
test -z "$(cd "$runtime_root" && git status --porcelain)"
test -d "$artifact_root/attempt-1"
print -r -- "accepted_summary=PASS attempt=$accepted_attempt run_rc=0 $result_evidence logical_provider_responses=15 edge_correlations=15 capacity_runs=3 configured_capacity=4 peak_in_flight=4 queued_pressure=present providers=idle harness=absent candidate=unchanged checkout=clean attempt1=preserved edge_restart_count=0"
REMOTE
```

Expected: exit `0` and one raw-free `accepted_summary=PASS` line.

## Modified Files Summary

| File | Items |
|------|-------|
| `agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/CODE_REVIEW-cloud-G08.md` | REVIEW_OFR-S07-DURABLE-TERMINAL-10-1 |

## Dependencies and Execution Order

1. Revalidate the immutable overlay, checkout, runtime hash/PID/listeners, absent harness, authentication, and two idle capacity samples.
2. Run attempt 2 once with the durable terminal wrapper.
3. If and only if attempt 2 atomically records `class=retryable-transient`, repeat the full gate and run fresh attempt 3. Otherwise stop.
4. Validate exactly one atomic accepted record, its summary hash and structure, idle cleanup, absent harness, unchanged candidate, clean checkout, and preserved attempt 1.
5. Fill the active review with raw-free output only and stop for official review.

## Final Verification

Run:

```bash
git diff --check
git status --short
git grep -lE 'sk-[A-Za-z0-9_-]{16,}|Authorization: Bearer [^$]' -- . \
  ':(exclude)agent-task/archive/**' \
  ':(exclude)agent-task/m-openai-compatible-output-validation-filters/03_repeat_guard_s07_remote_evidence/*.log'
```

Expected: `git diff --check` exits `0`; status preserves unrelated user/task changes; the path-only secret-like scan does not name the active review or scoped source. Do not print matching content.

PASS requires: no code/runtime/config/credential/provider/roadmap mutation; preserved attempt 1; verified overlay/base/runtime identity; exact five listeners; four connected nodes; idle healthy `3+1` capacity; authenticated `/v1/models` HTTP 200; no concurrent harness; at most one fresh attempt 2 and one exactly authorized attempt 3; an atomic accepted record with `run_rc=0`; a matching summary hash; 15 logical provider-response rows with globally disjoint bounded identity lists; 15 unique lifecycle correlations; three capacity rows at configured capacity 4 with peak in-flight 4 and queue pressure; accepted `reproduced` fingerprint/offset or `not_reproduced`; idle cleanup; absent harness; unchanged candidate; clean checkout; prior artifacts preserved; zero Edge restarts; and no raw secret/prompt/model output in tracked evidence.

After completing all code changes, fill implementation-owned sections in `CODE_REVIEW-*-G??.md`.
