Files
sodalive-backend-spring-boot/docs/20260407_커밋footer자동추가차단.md

3.3 KiB

20260407 커밋 footer 자동 추가 차단

구현 계획

  • oh-my-openagent 기본 footer 동작과 저장소 로컬 커밋 워크플로우의 영향 범위를 문서화한다.
  • AGENTS.md에 커밋 본문에서 Sisyphus footer와 자동 Co-authored-by 라인을 허용하지 않는 규칙을 추가한다.
  • .opencode/skills/commit-policy/SKILL.md에 검증된 메시지를 그대로 git commit에 전달하고 자동 footer를 금지하는 절차를 반영한다.
  • .opencode/commands/commit.md/commit 커맨드가 자동 footer 없는 최종 메시지를 사용하도록 지시를 보강한다.
  • work/scripts/check-commit-message-rules.sh에 Sisyphus footer 및 자동 Co-authored-by 라인 차단 검증을 추가한다.
  • 변경 문서와 스크립트에 대해 진단 및 실행 검증을 수행한다.

검증 기록

  • 작업 완료 후 검증 결과를 기록한다.

  • 1차 구현

    • 무엇을: AGENTS.md, .opencode/skills/commit-policy/SKILL.md, .opencode/commands/commit.md, work/scripts/check-commit-message-rules.sh를 수정해 커밋 본문에서 Ultraworked with [Sisyphus]...Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai> 자동 footer를 금지하고, /commit 경로가 검증된 메시지를 그대로 git commit에 전달하도록 명시했다.
    • 왜: oh-my-openagent 기본 설정과 알려진 버그로 자동 footer가 붙을 수 있으므로, 저장소 로컬 규칙과 검증 스크립트에서 이를 명시적으로 차단해야 커밋 결과를 일관되게 통제할 수 있기 때문이다.
    • 어떻게: lsp_diagnosticsAGENTS.md, .opencode/skills/commit-policy/SKILL.md, .opencode/commands/commit.md, work/scripts/check-commit-message-rules.sh, docs/20260407_커밋footer자동추가차단.md에 대해 모두 No diagnostics found를 확인했다. bash -n work/scripts/check-commit-message-rules.sh로 문법을 검증했고, ./work/scripts/check-commit-message-rules.sh --message로 정상 메시지/Refs footer 허용 케이스는 PASS, Sisyphus footer와 자동 Co-authored-by 케이스는 FAIL을 확인했다. 추가로 ./gradlew tasks --all 실행 결과 BUILD SUCCESSFUL을 확인했다.
  • 2차 수정

    • 무엇을: Oracle 검토 의견을 반영해 .opencode/skills/commit-policy/SKILL.md.opencode/commands/commit.md에서 --message-file 검증 후 같은 파일을 git commit -F에 전달하는 경로를 권장하도록 보강했고, work/scripts/check-commit-message-rules.shCo-authored-by 차단 조건을 공백 변형까지 탐지하도록 확장했다.
    • 왜: exact string 하나만 금지하면 footer 형식이 조금만 달라져도 놓칠 수 있으므로, 외부 기본 동작이나 버그로 인한 변형까지 더 안정적으로 차단해야 하기 때문이다.
    • 어떻게: lsp_diagnostics.opencode/skills/commit-policy/SKILL.md, .opencode/commands/commit.md, work/scripts/check-commit-message-rules.sh에 대해 모두 No diagnostics found를 확인했다. bash -n work/scripts/check-commit-message-rules.sh를 다시 실행해 문법을 검증했고, ./work/scripts/check-commit-message-rules.sh --message로 기본 메시지와 Refs footer는 PASS, Sisyphus footer/기본 Co-authored-by/공백 변형 Co-authored-by 케이스는 모두 FAIL을 확인했다.