fix(bridge): workbench.html inline v3 script injection + both-HTML loop patch #task-264

This commit is contained in:
2026-03-09 19:36:09 +09:00
parent 23bd8f4613
commit 5971a524ea
6 changed files with 101 additions and 33 deletions

View File

@@ -6,3 +6,4 @@
| 002 | 09:21~15:07 | SDK 승인 명령 미등록 확정 + Renderer DOM Click 구현 | `4497e96` | 🔧 |
| 003 | 15:32~17:59 | Renderer v3 deep DOM traversal (iframe/webview/shadow 관통) | `32bf5ae` | 🔧 |
| 004 | 18:08~18:23 | Deep inspect HTTP endpoint (/deep-inspect) + 렌더러 재귀 인스펙터 | `a07d9d3` | 🔧 |
| 005 | 18:30~19:28 | workbench.html inline v3 패치 누락 수정 + pre-patch 검증 | `b61cff1` | 🔧 |

View File

@@ -0,0 +1,43 @@
# workbench.html inline v3 패치 누락 수정
- **시작**: 18:30 KST
- **종료**: 19:28 KST
- **상태**: 🔧 미완료 (AG 재시작 후 /deep-inspect 검증 필요)
## 핵심 발견
### Root cause: workbench.html에 v3 inline 스크립트 미삽입
- 이전 세션에서 AG 재시작 후 `/deep-inspect` timeout 발생
- Bridge 서버(port 34332)는 정상 (`/ping→pong`)
- Extension 코드(v3)도 정상 배포됨 (동일 94986 bytes, 동일 timestamp)
- **원인**: `setupApprovalObserver()``workbench-jetski-agent.html`에만 inline 삽입, `workbench.html`에는 외부 `<script src>` 태그만 삽입
- `vscode-file://` 프로토콜은 커스텀 .js 파일 서빙 불가 → 사실상 스크립트 미로딩
### 수정 내용
1. **extension.ts**: HTML 패치 로직을 `htmlFiles` 배열 루프로 변경 → 양쪽 HTML 모두 동일한 inline `<script>` 삽입
2. **수동 pre-patch**: Python 스크립트로 `workbench.html`에 jetski HTML의 inline 블록 복사 + product.json 체크섬 업데이트
3. **검증 스크립트** (`/tmp/verify_patch.py`) 실행 → ALL CHECKS PASSED
## 검증 결과
```
workbench.html: GB Observer=OK, deepFindButtons=OK, deep-inspect=OK (35422 bytes)
workbench-jetski-agent.html: OK (35379 bytes)
Checksums: MATCH (both files)
Extension: deployed, md5 match, both-HTML loop fix present
FINAL VERDICT: ALL CHECKS PASSED
```
## 다음 단계 (다음 세션)
1. **AG 완전 재시작** (File → Exit → 재실행)
2. `curl.exe http://127.0.0.1:34332/deep-inspect` 호출
3. webview iframe 접근성 확인 → ACCESSIBLE이면 즉시 E2E 테스트
4. BLOCKED이면 `executeJavaScript()` 결과 확인
## 파일 변경
| 파일 | 변경 |
|------|------|
| `extension/src/extension.ts` | HTML 패치 로직을 htmlFiles 루프로 리팩터링 (양쪽 HTML 동일 inline 삽입) |
| `.agents/references/known-issues.md` | workbench.html inline 미삽입 이슈 + 승인 전략 상태 업데이트 |