fix(hitl): re-read the full HITL row before mirroring an API approval
SyncLoop は store.Pending() の行(diagnosis を持たない)で埋め込みを描き直して いたため、API 承認を反映した直後のメッセージで推定原因・根拠・判断理由が <nil> になっていた(第 5 回 C-G2、2026-10-09)。編集前に GetHitl で全列を 読み直す。
This commit is contained in:
1 parent
f8e0aa9122
commit
fa9c08c778
1 file changed
+5
@@ -237,6 +237,11 @@ func (b *Bot) syncOne(ctx context.Context, m *rag.HitlMessage) bool {
|
||||
if err != nil || !st.Approved {
|
||||
return false
|
||||
}
|
||||
// Pending() carries no diagnosis; re-read the full row so the edited embed keeps label, evidence and rationale
|
||||
// (campaign 5 C-G2, 2026-10-09: the mirrored message showed <nil> for every diagnosis field)
|
||||
if full, err := b.store.GetHitl(ctx, m.Token); err == nil {
|
||||
m = full
|
||||
}
|
||||
by := "unknown"
|
||||
if st.ApprovedBy != nil && *st.ApprovedBy != "" {
|
||||
by = *st.ApprovedBy
|
||||
|
||||
Reference in new issue
Block a user