fix(step-probe): ensure fast AI responses and tool calls are captured by real-time block
This commit is contained in:
36
scratch_devlog.py
Normal file
36
scratch_devlog.py
Normal file
@@ -0,0 +1,36 @@
|
||||
import os, datetime
|
||||
now = datetime.datetime.now()
|
||||
date_str = now.strftime('%Y-%m-%d')
|
||||
time_str = now.strftime('%H:%M')
|
||||
|
||||
with open(r'c:\Users\Variet-Worker\Desktop\gravity_control\.agents\references\known-issues.md', 'a', encoding='utf-8') as f:
|
||||
f.write('\n### ['+date_str+'] [Probe Logging] — AI응답 텍스트 & WAITING 스텝 동시 누락 버그\n')
|
||||
f.write('- **증상**: 굉장히 빠른 AI 응답(또는 즉각적인 툴 호출) 시 `step-probe.ts`가 메시지와 승인 다이얼로그를 모두 Discord로 릴레이하지 못함.\n')
|
||||
f.write('- **원인**: 실시간 텍스트 캡처(`delta > 0`) 조건에 `isRunning &&`이 걸려있어, 상태가 `WAITING`이나 `IDLE`로 즉시 넘어가면 텍스트를 캡처하는 루틴이 전부 스킵됨. 또한 이 순간 `isStall` 조건도 타지 않아 `WAITING` 디텍션도 증발함.\n')
|
||||
f.write('- **해결**: 실시간 캡처 로직에서 `isRunning &&` 조건을 제거하고, `delta > 0`일 때 추가된 최신 스텝을 스캔하면서 `PLANNER_RESPONSE`와 `WAITING` 스텝을 모두 처리하도록 수정함.\n')
|
||||
f.write('- **주의**: LS Backend 10개 Session 제한 버그가 있어, 다른 창에서 수동 채팅(`1fbca84c`)이 IDLE로 남아있으면 자동화 에이전트의 워크스페이스 세션과 헷갈릴 수 있으나, 이 버그는 polling 타이밍 문제였음.\n')
|
||||
|
||||
print('known-issues updated.')
|
||||
|
||||
log_dir = r'c:\Users\Variet-Worker\Desktop\gravity_control\docs\devlog'
|
||||
index_file = os.path.join(log_dir, date_str + '.md')
|
||||
|
||||
try:
|
||||
with open(index_file, 'r', encoding='utf-8') as f:
|
||||
lines = f.readlines()
|
||||
nnn = len([l for l in lines if '|' in l])
|
||||
except:
|
||||
os.makedirs(log_dir, exist_ok=True)
|
||||
with open(index_file, 'w', encoding='utf-8') as f:
|
||||
f.write('| NNN | 시간 | 작업 설명 | 커밋해시 | 완료여부 |\n|---|---|---|---|---|\n')
|
||||
nnn = 1
|
||||
|
||||
entry_num = f'{nnn:03d}'
|
||||
entry_file = os.path.join(log_dir, 'entries', f'{date_str.replace("-", "")}-{entry_num}.md')
|
||||
|
||||
with open(index_file, 'a', encoding='utf-8') as f:
|
||||
f.write(f'| {entry_num} | {time_str} | step-probe.ts 의 isRunning 조건 누락으로 인한 릴레이 증발 버그 픽스 | COMMITTING | ✅ |\n')
|
||||
|
||||
os.makedirs(os.path.dirname(entry_file), exist_ok=True)
|
||||
with open(entry_file, 'w', encoding='utf-8') as f:
|
||||
f.write(f'# step-probe.ts 의 isRunning 조건 누락으로 인한 릴레이 증발 버그 픽스\n\n- **시간**: {date_str} {time_str}\n- **Commit**: `COMMITTING`\n- **Vikunja**: #125 → done\n\n## 결정 사항\n- AI 응답이 비정상적으로 빠를 경우 `RUNNING` 상태의 2초 polling 창을 우회하여 `IDLE` / `WAITING`로 진입해버리는 버그가 있었습니다.\n- 기존에는 `isRunning && currentCount > ...`로만 Real-time Capture가 동작하여 전부 스킵되는 증상 확인.\n- `isRunning` 조건을 삭제하고, `delta > 0`인 경우 `GetCascadeTrajectorySteps`를 페치하여 `PLANNER_RESPONSE`와 `WAITING` 스텝을 동시에 처리하도록 개선했습니다.\n\n## 미완료\n- 없음.\n')
|
||||
Reference in New Issue
Block a user