# Complete - m-operation-event-outbox/03+01_operation_event_store

## 완료 일시

2026-06-13

## 요약

Operation event store boundary 구현과 review follow-up을 2회 리뷰 루프로 완료했다. Final verdict: PASS.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_local_G06_0.log` | `code_review_cloud_G05_0.log` | FAIL | operation event list ordering index와 Postgres integration test precision/round-trip coverage 보완 필요. |
| `plan_local_G06_1.log` | `code_review_cloud_G05_1.log` | PASS | operation-specific ordering index, migration snippet check, timestamp precision, payload/metadata round-trip, invalid payload/field coverage 보강 완료. |

## 구현/정리 내용

- `PgStore.OperationEvents()`가 Postgres-backed `OperationEventStore`를 반환하도록 연결하고 append/list/pending-list/mark-published boundary를 구현했다.
- `operation_events`에 `published_at`, operation-specific ordering index, pending partial index를 추가했다.
- Postgres integration test가 event metadata, JSON payload round-trip, pending 상태, mark-published timestamp, invalid input, nil payload normalization을 검증하도록 보강했다.

## 최종 검증

- `git diff --check` - PASS; no output.
- `cd services/core && go test -count=1 ./internal/storage` - PASS; `ok git.toki-labs.com/toki/gito/services/core/internal/storage`.
- `cd services/core && go test -count=1 -run TestPostgresOperationEventStoreAppendsListsMarksPublishedAndValidates -v ./internal/storage` - PASS with expected SKIP because `GITO_TEST_DATABASE_URL` is unset; output includes `GITO_TEST_DATABASE_URL not set; skipping Postgres integration test`.
- `cd services/core && go test -count=1 ./...` - PASS; all packages passed or reported `[no test files]`.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/control-plane-foundation/milestones/operation-event-outbox.md`
- Completed task ids:
  - `event-store`: PASS; evidence=`plan_local_G06_0.log`, `code_review_cloud_G05_0.log`, `plan_local_G06_1.log`, `code_review_cloud_G05_1.log`; verification=`git diff --check`, `cd services/core && go test -count=1 ./internal/storage`, `cd services/core && go test -count=1 -run TestPostgresOperationEventStoreAppendsListsMarksPublishedAndValidates -v ./internal/storage`, `cd services/core && go test -count=1 ./...`
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
