From d2023321bd683e7e61c8527b697acf1579c2e11b Mon Sep 17 00:00:00 2001 From: Variet Worker Date: Wed, 8 Apr 2026 17:59:40 +0900 Subject: [PATCH] fix(extension): remove redundant SafeToAutoRun chat snapshot for Discord relay MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Removed writeChatSnapshot calls in step-probe.ts to prevent duplicate '⚡ 자동 실행됨' notifications since bot.py already broadcasts '🤖 자동 승인됨'. * Docs: Update devlog and known-issues with Discord Bot cache deletion bugs and multi-workspace LS connection conflicts. * Fixes Vikunja #593 --- .agents/references/known-issues.md | 14 +++++++++++++- docs/devlog/2026-04-08.md | 3 ++- docs/devlog/entries/20260408-007.md | 18 ++++++++++++++++++ extension/src/step-probe.ts | 10 +--------- 4 files changed, 34 insertions(+), 11 deletions(-) create mode 100644 docs/devlog/entries/20260408-007.md diff --git a/.agents/references/known-issues.md b/.agents/references/known-issues.md index f4cb5fe..fe1a447 100644 --- a/.agents/references/known-issues.md +++ b/.agents/references/known-issues.md @@ -1,4 +1,4 @@ -# Known Issues & Lessons Learned +# Known Issues & Lessons Learned > **이 파일은 SSOT(Single Source of Truth)입니다.** > 디버깅이나 구현 전에 **반드시** 이 파일을 확인하세요. @@ -27,6 +27,18 @@ --- +### [2026-04-08] [Discord Bot] Channel Deletion Cache Desync +- **증상**: 봇이 켜져 있는 상태에서 Discord 채널(g-project-name)을 삭제하면, 봇이 삭제를 인지하지 못하고 새 채널을 생성하지 않으며 메시지도 증발함. +- **원인**: ot.py의 self.project_channels 딕셔너리에 채널 객체가 캐시되어 있어, API 호출 없이 캐시된(삭제된) 채널로 메시지를 보내려 시도하다 404 에러 발생 후 실패함. +- **해결**: 채널 맵핑이 꼬였을 때는 **Python 봇(Docker 컨테이너)을 재시작**하여 캐시를 초기화하고 채널 목록을 새로 갱신하게 함. +- **주의**: 채널 관리는 캐시에 의존하기 때문에 강제로 Discord UI에서 채널을 지웠을 때는 반드시 봇을 재구동해야 함. + +### [2026-04-08] [Extension] Multiple Workspace LS Cross-Connection +- **증상**: ariet-llm 창에서 켰으나 gravity_control의 백그라운드 구동 중인 LS에 연결되어 자기 자신 창의 신호를 잡지 못함. +- **원인**: 여러 VS Code 창을 띄웠을 때 어떤 창에서는 Antigravity 패널을 누르지 않아 전용 LS가 시작되지 않음. ixLSConnection()이 자기 몫의 LS를 찾지 못하고 fallback으로 기존에 떠 있던 다른 창의 LS에 연결됨. +- **해결**: 대상 창에서 Developer: Reload Window 실행 후 **사이드바의 로컬 Antigravity 챗봇 패널을 한 번 열어** 자신의 LS 프로세스를 띄운 뒤에 Gravity Bridge를 Start함. +- **주의**: LS는 자동으로 시작되지 않고 사용자가 채팅 패널을 한 번 클릭/활성화해야만 Spawn 됨. + ## 🔴 Active/Recent Issues ### [2026-03-31] [step-probe] GetAllCascadeTrajectories 10-Item Hard Limit (Signal Drop) diff --git a/docs/devlog/2026-04-08.md b/docs/devlog/2026-04-08.md index 5aecdfe..39ac703 100644 --- a/docs/devlog/2026-04-08.md +++ b/docs/devlog/2026-04-08.md @@ -1,7 +1,8 @@ -# 2026-04-08 +# 2026-04-08 | NNN | HH:MM | 작업 설명 | `커밋해시` | 상태 | |---|---|---|---|---| | 004 | 14:00 | SafeToAutoRun 알림 누락 복구 (v0.5.18) | `8f2a1b3` | ✅ | | 005 | 16:30 | SafeToAutoRun pending skip으로 인한 데드락 원인 파악 및 롤백 | `13f13ee` | ✅ | | 006 | 07:30 | SafeToAutoRun 데드락 완전 해결을 위한 Agnostic Bridge 도입 및 프리징 방어 (v0.5.20) | `임시해시` | ✅ | +| 007 | 17:57 | Gravity Bridge 안정화: 중복 알림(SafeToAutoRun) 제거 설계 확정 및 Discord 봇 캐시/로컬 LS 크로스매칭 증상 디버깅 완료 | \-\ | ✅ | diff --git a/docs/devlog/entries/20260408-007.md b/docs/devlog/entries/20260408-007.md new file mode 100644 index 0000000..5ef2e4e --- /dev/null +++ b/docs/devlog/entries/20260408-007.md @@ -0,0 +1,18 @@ +# Gravity Bridge 알림 최적화 및 연동 디버깅 완료 + +- **시간**: 2026-04-08 17:00~17:55 +- **Commit**: `pending` +- **Vikunja**: 대상 작업 맵핑 예정 + +## 결정 사항 +- `SafeToAutoRun` 시 `step-probe.ts`에서 날리던 **"⚡ 자동 실행됨"** 알림은 과감하게 완전히 제거하였습니다. 파이썬 봇이 이미 "🤖 자동 승인됨" Embed를 송출하고 있으므로 디자인 철학(익스텐션은 중립적인 릴레이 역할만 수행하고, 비즈니스 판정 알림은 중앙 봇이 담당)에 부합합니다. +- `extension.ts`의 `writeChatSnapshot` 의존성을 줄여 트래픽 낭비와 중복 노이즈를 해소했습니다. + +## 핵심 디버깅 (Troubleshooting) +- **`variet-llm` 프로젝트 연동 실패 이슈:** + 1. `variet-llm` 창을 열었으나 채팅 패널을 열지 않아 안티그래비티 전용 언어 서버(LS)가 띄워져 있지 않은 상태에서 브릿지를 켬. 브릿지가 엉뚱하게 `gravity_control` LS에 바인딩 됨. + 2. 사용자가 Discord에서 `variet-llm` 채널을 삭제해 버렸는데, 파이썬 봇(`bot.py`)은 캐시를 가지고 있어서 자신이 파괴된 채널을 대상으로 계속 통신을 시도하며 새 채널을 파지 않음 (HTTP 404). + 3. 로컬 윈도우 재시작 및 도커(`docker-compose restart`) 컨테이너 재가동을 통해 **봇 프로세스 캐시 초기화** → 채널 자동 재생성, 완벽 디버깅에 성공했습니다. + +## 미완료 +- 없음. 모두 성공적으로 동작 중. diff --git a/extension/src/step-probe.ts b/extension/src/step-probe.ts index 8a922cd..b511f13 100644 --- a/extension/src/step-probe.ts +++ b/extension/src/step-probe.ts @@ -1,4 +1,4 @@ -/** +/** * Step Probe Module - SDK polling, response handling, approval strategies. * All shared state accessed through BridgeContext. * Extracted from extension.ts. @@ -591,10 +591,6 @@ function setupMonitor() { source: 'step_probe', safe_to_auto_run: isSafeToAutoRun, }); - if (isSafeToAutoRun) { - const truncatedCmd = command.length > 500 ? command.substring(0, 500) + '\n...(이하 생략)' : command; - ctx.writeChatSnapshot(`⚡ **자동 실행됨** (step ${si})\n\n\`\`\`\n${truncatedCmd}\n\`\`\``); - } } } // NOTE: no break — process ALL parallel WAITING steps @@ -667,10 +663,6 @@ function setupMonitor() { source: 'step_probe_utf8_offset', safe_to_auto_run: isSafeToAutoRun, }); - if (isSafeToAutoRun) { - const truncatedCmd = command.length > 500 ? command.substring(0, 500) + '\n...(이하 생략)' : command; - ctx.writeChatSnapshot(`⚡ **자동 실행됨** (step ${actualIndex})\n\n\`\`\`\n${truncatedCmd}\n\`\`\``); - } } } // NOTE: no break — process ALL parallel WAITING steps