fix: v2.2.203 — 기업모드 dev-impl 빈 깡통 99% 버그 (hollow check 기본 ON)

증상: 사용자가 기획서 + 폴더 주고 "여기 개발해줘" 요청 → ASTRA 가 파일 만들고
"개발 완료" 보고 → 실제 파일을 열면 class/함수 본문이 비어 있음
(def foo(): pass · 빈 class · imports only). 99% 확률 재발.

원인:
- 안전망 이미 존재 (selfReflectorHollow.ts 가 정규식으로 빈 깡통 감지)
- BUT 두 개 config 모두 OFF — selfReflectorEnabled (Phase A) +
  selfReflectorExternalEnabled (Phase B)
- Phase A 켜면 [Self-Reflector Check] 블록이 답변에 노출 (UX 부작용),
  Phase B 는 +1 LLM 호출 비용 — 부작용 때문에 기본 OFF
- 결과: 다수 사용자가 안전망 전혀 없는 상태로 코드 작성 → 빈 깡통 통과

Fix 3종:

1. Hollow check 를 selfReflector 와 분리 — 신규 설정 2개:
   - g1nation.hollowCheck.enabled (boolean, 기본 ON) — action-tag 있는 모든
     응답에 무조건 hollow 스캔. LLM 호출 0.
   - g1nation.hollowCheck.autoRetry (boolean, 기본 ON) — 검출 시 1회 자동
     재작업. Phase B 와 분리.
   - dispatcher.ts 게이트 조건 교체

2. dev-impl 프롬프트 강화 (pipelineTemplates.ts) — [빈 깡통 금지] 5개 규칙:
   - 파일은 하나씩 생성, 모든 함수 본문 완전 구현 후 다음 파일로
   - 금지 패턴 명시: pass · ... · NotImplementedError · # TODO · 빈 class
   - 인터페이스/추상 메서드만 빈 본문 OK
   - 각 파일 생성 직후 자가 검증
   - 최종 요약에 파일별 핵심 동작 한 줄씩

3. 기본값 변경 — 사용자 행동 없이 안전망 작동. 옛 selfReflector Phase A/B 는
   그대로 OFF (UX 부작용 보존).

예상 효과: ~70-85% stub 감소. 남은 ~15% (작은 모델 attention 한계 / 큰 프로젝트)
는 per-file 순차 생성으로 v2.2.204+ 검토.

모델 한계 vs 로직 fix: 대부분 로직 fix 가능. 매우 작은 모델 (≤4B) 은 한계 더
빠름 — 더 큰 모델 (gemma-12b, qwen-32b) 권장.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 11:52:12 +09:00
parent c27cd823a9
commit ebfce17b03
14 changed files with 120 additions and 39 deletions
@@ -1,5 +1,5 @@
{
"result": "직답 결과 — single-pass mock 응답입니다.",
"createdAt": 1780366882252,
"createdAt": 1780367973993,
"modelVersion": "unknown"
}
@@ -1,5 +1,5 @@
{
"result": "---\nid: wiki_on\ndate: 2026-06-02T02:21:22.254Z\ntype: knowledge_artifact\nstandard: P-Reinforce v3.0\ntags: [automated, connect_ai, brain_sync]\n---\n\n## 📌 Brief Summary\n직답 결과 — single-pass mock 응답입니다.\n\n직답 결과 — single-pass mock 응답입니다.\n---\n## 🛡️ Reliability & Audit Summary\n> [!NOTE]\n> 이 문서는 ConnectAI의 **Intelligent Resilience** 엔진에 의해 검증 및 정제되었습니다.\n\n| Metric | Value | Status |\n| :--- | :--- | :--- |\n| **Conflict Risk** | `0/100` | ✅ Low |\n| **Fallbacks Used** | `0` | ✅ None |\n| **Auto Retries** | `0` | ✅ Stable |\n| **Deduplication** | `0` | Standard |\n| **Processing Time** | `0.0s` | ✅ Fast |\n\n### 🔍 Decision Audit Trail\n- **[DIRECT]** 답변 작성 중... (단일 호출 fast-path) (21ms)\n",
"createdAt": 1780366882254,
"result": "---\nid: wiki_on\ndate: 2026-06-02T02:39:33.994Z\ntype: knowledge_artifact\nstandard: P-Reinforce v3.0\ntags: [automated, connect_ai, brain_sync]\n---\n\n## 📌 Brief Summary\n직답 결과 — single-pass mock 응답입니다.\n\n직답 결과 — single-pass mock 응답입니다.\n---\n## 🛡️ Reliability & Audit Summary\n> [!NOTE]\n> 이 문서는 ConnectAI의 **Intelligent Resilience** 엔진에 의해 검증 및 정제되었습니다.\n\n| Metric | Value | Status |\n| :--- | :--- | :--- |\n| **Conflict Risk** | `0/100` | ✅ Low |\n| **Fallbacks Used** | `0` | ✅ None |\n| **Auto Retries** | `0` | ✅ Stable |\n| **Deduplication** | `0` | Standard |\n| **Processing Time** | `0.0s` | ✅ Fast |\n\n### 🔍 Decision Audit Trail\n- **[DIRECT]** 답변 작성 중... (단일 호출 fast-path) (25ms)\n",
"createdAt": 1780367973995,
"modelVersion": "unknown"
}
@@ -1,8 +1,8 @@
{
"missionId": "wiki_on",
"status": "completed",
"startTime": "2026-06-02T02:21:22.229Z",
"totalElapsedMs": 26,
"startTime": "2026-06-02T02:39:33.967Z",
"totalElapsedMs": 28,
"results": {
"direct": "직답 결과 — single-pass mock 응답입니다."
},
@@ -12,16 +12,16 @@
{
"from": "idle",
"to": "direct",
"durationMs": 21,
"durationMs": 25,
"message": "답변 작성 중... (단일 호출 fast-path)",
"ts": "2026-06-02T02:21:22.250Z"
"ts": "2026-06-02T02:39:33.992Z"
},
{
"from": "direct",
"to": "completed",
"durationMs": 5,
"durationMs": 3,
"message": "미션 완료",
"ts": "2026-06-02T02:21:22.255Z"
"ts": "2026-06-02T02:39:33.995Z"
}
],
"resilienceMetrics": {
@@ -1,5 +1,5 @@
{
"result": "Final report with inconsistencies. This should be long enough to pass validation.",
"createdAt": 1780366888974,
"createdAt": 1780367980792,
"modelVersion": "unknown"
}
@@ -1,5 +1,5 @@
{
"result": "Final report with inconsistencies. This should be long enough to pass validation.",
"createdAt": 1780366888973,
"createdAt": 1780367980791,
"modelVersion": "unknown"
}
@@ -1,5 +1,5 @@
{
"result": "[{\"heading\":\"본문\",\"scope\":\"전체 답변\"}]",
"createdAt": 1780366888969,
"createdAt": 1780367980787,
"modelVersion": "unknown"
}
@@ -1,5 +1,5 @@
{
"result": "[CONFLICT WARNING] 성능이 200% 증가했습니다. vs 그러나 동시에 50% 감소했습니다. 최적화와 성능 저하가 동시에 발견됨.",
"createdAt": 1780366888971,
"createdAt": 1780367980789,
"modelVersion": "unknown"
}
@@ -1,8 +1,8 @@
{
"missionId": "stress_conflict_1780366888954",
"missionId": "stress_conflict_1780367980767",
"status": "completed",
"startTime": "2026-06-02T02:21:28.954Z",
"totalElapsedMs": 21,
"startTime": "2026-06-02T02:39:40.767Z",
"totalElapsedMs": 26,
"results": {
"outline": "[{\"heading\":\"본문\",\"scope\":\"전체 답변\"}]",
"section_0": "[CONFLICT WARNING] 성능이 200% 증가했습니다. vs 그러나 동시에 50% 감소했습니다. 최적화와 성능 저하가 동시에 발견됨.",
@@ -14,30 +14,30 @@
{
"from": "idle",
"to": "outline",
"durationMs": 14,
"durationMs": 19,
"message": "답변 구조 잡는 중...",
"ts": "2026-06-02T02:21:28.968Z"
"ts": "2026-06-02T02:39:40.786Z"
},
{
"from": "outline",
"to": "section",
"durationMs": 2,
"durationMs": 3,
"message": "본문 작성 중...",
"ts": "2026-06-02T02:21:28.970Z"
"ts": "2026-06-02T02:39:40.789Z"
},
{
"from": "section",
"to": "polish",
"durationMs": 2,
"durationMs": 1,
"message": "최종 다듬기 중...",
"ts": "2026-06-02T02:21:28.972Z"
"ts": "2026-06-02T02:39:40.790Z"
},
{
"from": "polish",
"to": "completed",
"durationMs": 2,
"message": "미션 완료",
"ts": "2026-06-02T02:21:28.974Z"
"ts": "2026-06-02T02:39:40.792Z"
}
],
"resilienceMetrics": {