MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / SetMessageScreening

Method SetMessageScreening

internal/identity/screening.go:191–198  ·  view source on GitHub ↗

SetMessageScreening denormalizes a screening verdict onto an already-created message row (review_reason / scan_score / scan_action). The inbound path sets these at INSERT time; the outbound path creates the row first (send or HITL hold) and annotates after, so it needs this UPDATE. Agent-scoped to k

(ctx context.Context, messageID, agentID, reviewReason string, scanScore *float64, scanAction string)

Source from the content-addressed store, hash-verified

189// hold) and annotates after, so it needs this UPDATE. Agent-scoped to keep the
190// write within the owning tenant. scanScore may be nil (gate-only verdicts).
191func (s *Store) SetMessageScreening(ctx context.Context, messageID, agentID, reviewReason string, scanScore *float64, scanAction string) error {
192 _, err := s.pool.Exec(ctx,
193 `UPDATE messages
194 SET review_reason = $3, scan_score = $4, scan_action = $5
195 WHERE id = $1 AND agent_id = $2`,
196 messageID, agentID, nullIfEmptyString(reviewReason), scanScore, nullIfEmptyString(scanAction))
197 return err
198}

Callers 1

annotateAndAuditMethod · 0.80

Implementers 1

Storeinternal/identity/store.go

Calls 2

nullIfEmptyStringFunction · 0.85
ExecMethod · 0.65

Tested by

no test coverage detected