Conversation
.dal/.gitattributes | 4 + .dal/template/dal.spec.cue | 38 ++++++ .dal/template/dal/charter.md | 25 ++++ .dal/template/dal/dal.cue | 15 +++ .dal/template/dalops/charter.md | 28 +++++ .dal/template/dalops/dal.cue | 13 ++ .dal/template/decisions-archive.md | 3 + .dal/template/decisions.md | 13 ++ .dal/template/skills/escalation/SKILL.md | 3 + .dal/template/skills/git-workflow/SKILL.md | 3 + .dal/template/skills/history-hygiene/SKILL.md | 3 + .dal/template/skills/inbox-protocol/SKILL.md | 3 + .dal/template/skills/leader-protocol/SKILL.md | 4 + .dal/template/skills/pre-flight/SKILL.md | 3 + .dal/template/skills/reviewer-protocol/SKILL.md | 3 + .dal/template/wisdom.md | 11 ++ internal/daemon/notify.go | 126 +++++++++++++++++++ internal/daemon/notify_test.go | 155 ++++++++++++++++++++++++ internal/daemon/task.go | 25 ++-- 19 files changed, 461 insertions(+), 17 deletions(-) Co-Authored-By: dal-test-dal <dal-test-dal@dalcenter.local>
dalsoop
left a comment
There was a problem hiding this comment.
코드 리뷰: 알림 시스템 리팩토링 (notify.go 분리 및 HTTP 알림 추가)
전반적으로 잘 구성된 PR입니다. 기존 notifyDalroot 함수를 notify.go로 분리하고, HTTP POST 기반 알림 채널을 추가한 것은 좋은 설계입니다.
긍정적인 점
- 관심사 분리: 알림 로직을
notify.go로 깔끔하게 분리했습니다. - 하위 호환성 유지: 기존
notify-dalrootCLI 방식을sendNotifyCLI로 그대로 보존했습니다. - 테스트 커버리지:
httptest.NewServer를 활용한 HTTP 알림 테스트, payload 빌드 테스트, PR URL 추출 테스트 등 주요 경로가 잘 커버되어 있습니다. - 조건 제거 개선:
task.go에서CallbackPane != ""조건 분기를 제거하고,notifyTaskComplete내부에서 통합 처리하는 것이 더 깔끔합니다. .dal/template/구조: DAL 프로필 스키마(CUE), charter, skill 정의 등 템플릿 구조가 잘 정리되어 있습니다.
경미한 참고 사항 (차단 사유 아님)
-
notify.go:24—Output필드 미사용:NotifyPayload에Output string필드가 선언되어 있지만,buildNotifyPayload에서 값을 설정하지 않습니다. 의도적으로 출력 전체를 전송하지 않는 것으로 보이나, 사용하지 않는다면omitempty태그가 이미 있으므로 큰 문제는 아닙니다. 향후 사용 계획이 없다면 필드 제거를 고려해 볼 수 있습니다. -
notify.go:39-41— goroutine 에러 추적:sendNotifyHTTP와sendNotifyCLI가 goroutine으로 실행되어 에러가 로그에만 남습니다. 현재 설계 의도에 부합하지만, 알림 실패가 중요한 경우 재시도 메커니즘을 추후 고려할 수 있습니다. -
notify.go:113-126—extractPRUrlURL 검증: 현재github.com/과/pull/을 포함하는 단어를 PR URL로 간주합니다. 악의적이거나 잘못된 형식의 output이 들어올 경우를 대비해strings.HasPrefix(word, "https://")체크를 추가하면 더 안전합니다. 단, 내부 시스템이므로 심각한 보안 이슈는 아닙니다. -
notify.go:80—sendNotifyHTTP의 HTTP 응답 상태 코드 미검증: 응답 코드를 로그에 출력하지만 비정상 응답(4xx/5xx)에 대한 별도 처리가 없습니다. 현 단계에서는 충분하지만 참고 사항으로 남깁니다.
결론
코드 품질이 좋고, 기존 동작을 깨뜨리지 않으면서 확장성을 높인 변경입니다. 주요 이슈 없이 승인 가능한 수준입니다.
dal-test-dal 작업 결과.