# Complete - m-external-integration/04+01,02,03_adapter_boundary

## 완료 일시

2026-06-03

## 요약

Adapter boundary audit follow-up completed after 2 review loops; final verdict PASS.

## 루프 이력

| Plan | Review | Verdict | 메모 |
|------|--------|---------|------|
| `plan_local_G06_0.log` | `code_review_local_G06_0.log` | FAIL | Predecessor evidence and search output were unreliable, and `internal/notification` directly depended on the Mattermost adapter. |
| `plan_local_G07_1.log` | `code_review_local_G07_1.log` | PASS | Mattermost notification was moved behind an adapter-owned `TaskEventSink`, evidence was recovered with corrected searches, and reviewer gofmt cleanup plus verification passed. |

## 구현/정리 내용

- Confirmed predecessor archive complete logs for Plane, Jira, and Mattermost subtasks.
- Removed Mattermost adapter imports and DTO construction from `internal/notification`.
- Added an adapter-owned Mattermost `TaskNotificationSink` and wired it from `cmd/server/main.go`.
- Updated notification and scheduler tests for the new provider-neutral service constructor.
- Recovered boundary audit evidence with corrected broad and strict searches.

## 최종 검증

- `gofmt -l services/core/cmd/server/main.go services/core/internal/notification/service.go services/core/internal/notification/service_test.go services/core/internal/scheduler/jobs_test.go services/core/internal/adapters/mattermost/task_notification_sink.go services/core/internal/adapters/mattermost/task_notification_sink_test.go` - PASS; output empty after reviewer `gofmt -w`.
- `cd services/core && go test ./internal/notification ./internal/adapters/mattermost ./cmd/server` - PASS; targeted packages passed, `cmd/server` reported no test files.
- `cd services/core && go test ./...` - PASS; all core packages passed or reported no test files.
- `cd services/core && go vet ./...` - PASS; no output, exit 0.
- `rg --sort path -n "internal/adapters/(plane|jira|mattermost)|mattermost\\.TaskNotificationInput|\\*mattermost\\.Client|plane\\.WorkItemRef|jira\\.IssueRef" services/core/internal/notification services/core/internal/workitem services/core/internal/workitempipeline services/core/internal/http services/core/internal/scheduler` - PASS; no output, exit 1, confirming no strict adapter import/type leakage in audited non-adapter packages.
- `rg --sort path -n "plane\\.|jira\\.|mattermost\\.|WorkItemRef|IssueRef|comment_html|/api/v4/posts|/rest/api/3" services/core/internal --glob '!**/adapters/**'` - PASS; remaining hits are config/test data and provider-neutral examples only.

## Roadmap Completion

- Milestone: `agent-roadmap/phase/external-integration/milestones/external-integration.md`
- Completed task ids:
  - `adapter-boundary`: PASS; evidence=`plan_local_G07_1.log`, `code_review_local_G07_1.log`; verification=`cd services/core && go test ./...`, `cd services/core && go vet ./...`, corrected broad and strict `rg` boundary searches
- Not completed task ids: 없음

## 잔여 Nit

- 없음

## 후속 작업

- 없음
