fix: add step_type to default approve/reject/timeout callbacks (not just multi-choice)

This commit is contained in:
2026-03-10 15:29:55 +09:00
parent 26c19fb6be
commit 0470c03ab3
5 changed files with 9 additions and 3 deletions

3
bot.py
View File

@@ -110,6 +110,7 @@ class ApprovalView(discord.ui.View):
self.responded = True
self.bridge.write_response(UserResponse(
request_id=self.request.request_id, approved=True,
step_type=getattr(self.request, 'step_type', ''),
))
embed = interaction.message.embeds[0] if interaction.message.embeds else None
if embed:
@@ -128,6 +129,7 @@ class ApprovalView(discord.ui.View):
self.responded = True
self.bridge.write_response(UserResponse(
request_id=self.request.request_id, approved=False,
step_type=getattr(self.request, 'step_type', ''),
))
embed = interaction.message.embeds[0] if interaction.message.embeds else None
if embed:
@@ -139,6 +141,7 @@ class ApprovalView(discord.ui.View):
if not self.responded:
self.bridge.write_response(UserResponse(
request_id=self.request.request_id, approved=False,
step_type=getattr(self.request, 'step_type', ''),
))

View File

@@ -2097,7 +2097,7 @@ async function processResponseFile(filePath) {
}
const content = fs.readFileSync(filePath, 'utf-8');
const resp = JSON.parse(content);
const msg = `[RESPONSE] rid=${resp.request_id} approved=${resp.approved}`;
const msg = `[RESPONSE] rid=${resp.request_id} approved=${resp.approved} step_type=${resp.step_type || '(missing)'} keys=[${Object.keys(resp).join(',')}]`;
console.log(`Gravity Bridge: ${msg}`);
logToFile(msg);
// Find matching pending request

File diff suppressed because one or more lines are too long

View File

@@ -2051,7 +2051,7 @@ async function processResponseFile(filePath: string) {
}
const content = fs.readFileSync(filePath, 'utf-8');
const resp = JSON.parse(content);
const msg = `[RESPONSE] rid=${resp.request_id} approved=${resp.approved}`;
const msg = `[RESPONSE] rid=${resp.request_id} approved=${resp.approved} step_type=${resp.step_type || '(missing)'} keys=[${Object.keys(resp).join(',')}]`;
console.log(`Gravity Bridge: ${msg}`);
logToFile(msg);

View File

@@ -5,3 +5,6 @@
## 수정 내역
- 초기 생성: Accept all 리뷰 바 트리거 테스트
- 2차 수정: Diff review 누적 감지 테스트 (14:45)
- 3차 수정: step_type 패스스루 검증 테스트 (15:18)
- 4차 수정: ApprovalRequest + 단일 봇 인스턴스 테스트 (15:21)
- 5차 수정: 진단 로그 추가 — step_type 확인 (15:25)