# Complete - m-stream-evidence-gate-core/25+23,24_edge_observation_correlation

## 완료 일시

2026-07-28

## 요약

Edge FilterObservation의 식별자 호환성, recovery timeline 순서, log-safety evidence를 세 차례 리뷰 루프에서 보완했으며 최종 판정은 PASS다.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_local_G07_0.log` | `code_review_cloud_G07_0.log` | FAIL | actual target correlation, 실제 Edge observation integration, 신뢰 가능한 검증 evidence가 필요했다. |
| `plan_cloud_G09_1.log` | `code_review_cloud_G09_1.log` | FAIL | 기존 식별자 계약 호환성, exact chronological oracle, 실행한 source oracle 기록이 필요했다. |
| `plan_cloud_G08_2.log` | `code_review_cloud_G08_2.log` | PASS | 세 Required를 모두 해소하고 fresh unit/package/race/full-cycle 검증을 통과했다. |

## 구현/정리 내용

- 유효 UTF-8 256-byte 이하 attempt target은 verbatim 보존하고 장문 또는 invalid UTF-8 값은 결정적 `sha256:<hex>` join key로 bounded-normalize했다.
- 실제 Edge normalized-to-tunnel recovery fixture가 initial/recovery/rebound/release/terminal의 ordered subsequence와 attempt target, commit state, epoch 일관성 및 sink failure 격리를 검증하도록 보강했다.
- 실행하지 않은 source 검사를 주장하던 빈 test를 제거하고 production `_preview` zap field source oracle과 실제 검증 출력을 일치시켰다.

## 최종 검증

- `command -v go && readlink -f "$(command -v go)" && go version && go env GOROOT` 및 test list/source oracle - PASS; Go `1.26.2 linux/arm64`, GOROOT `/config/opt/go`, 선택된 대상 test와 production `_preview` no-match를 확인했다.
- `go test -count=1 -v ./packages/go/streamgate -run '^(TestObservationAttemptTarget_.*|TestRuntimeObservation_IdentifierCompatibilityDoesNotAffectRequestOutcome)$'` - PASS; 2개 regression test가 실행됐다.
- `go test -count=1 -v ./apps/edge/internal/openai -run '^(TestFilterObservationSink_.*|TestStreamGateProviderPoolObservation(CorrelationTimeline|SinkFailureIsolation)|TestLogNoPreviewFields|TestLogRetainsNonContentMetadata|TestNoPreviewFieldsOnSensitiveValues|TestLogOpenAICompatStreamOutputNoDeltaPreview)$'` - PASS; 11개 focused test가 실행됐다.
- `go test -count=1 ./packages/go/streamgate ./packages/go/observability ./apps/edge/internal/openai` - PASS.
- `go test -race -count=1 ./packages/go/streamgate ./apps/edge/internal/openai` - PASS.
- `IOP_VLLM_MODE=fake ./scripts/e2e-openai-vllm.sh` - PASS; 실제 Edge/Node fake OpenAI full-cycle과 observation log oracle을 통과했다.
- `test -z "$(gofmt -l packages/go/streamgate/filter_observation.go packages/go/streamgate/filter_observation_test.go apps/edge/internal/openai/stream_gate_vertical_slice_test.go apps/edge/internal/openai/log_safety_test.go)" && git diff --check` - PASS.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md`
- Milestone link: [Milestone 문서](agent-roadmap/phase/knowledge-tool-optimization-extension/milestones/stream-evidence-gate-core.md)
- Completed task ids:
  - `filter-observation`: PASS; evidence=`agent-task/archive/2026/07/m-stream-evidence-gate-core/25+23,24_edge_observation_correlation/plan_cloud_G08_2.log`, `agent-task/archive/2026/07/m-stream-evidence-gate-core/25+23,24_edge_observation_correlation/code_review_cloud_G08_2.log`; verification=focused Core/Edge tests, package/race regression, production source oracle, fake OpenAI full-cycle.
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
