From fa9c08c77839a5932395f4f61972a655e05d09fd Mon Sep 17 00:00:00 2001 From: seonNoh Date: Fri, 9 Oct 2026 10:12:03 +0900 Subject: [PATCH] fix(hitl): re-read the full HITL row before mirroring an API approval MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SyncLoop は store.Pending() の行(diagnosis を持たない)で埋め込みを描き直して いたため、API 承認を反映した直後のメッセージで推定原因・根拠・判断理由が になっていた(第 5 回 C-G2、2026-10-09)。編集前に GetHitl で全列を 読み直す。 --- ai/internal/hitl/bot.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ai/internal/hitl/bot.go b/ai/internal/hitl/bot.go index c41a62c..7c14f87 100644 --- a/ai/internal/hitl/bot.go +++ b/ai/internal/hitl/bot.go @@ -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 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