fix(observability): enrich CommitMemory plugin error log with workspace/scope/namespace context (#2398) #2402
Reference in New Issue
Block a user
Delete Branch "fix/2398-enrich-commit-memory-log"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces the generic CommitMemory error log with operator-diagnosis context so recurring main incidents can be triaged without ssh+zstdcat.
Changes
Constraints
Test plan
Fixes #2398.
Generated with Claude Code
Replace the generic log.Printf with operator-diagnosis context: - workspace=%s — the calling workspace - scope=%s — requested scope (LOCAL|TEAM|GLOBAL) - namespace=%s — resolved v2 plugin namespace - err_class=%T — Go concrete type for log-aggregator filtering - err=%q — full quoted error message The HTTP 500 response body is unchanged ('failed to store memory') to preserve the no-client-leak discipline. Fixes #2398. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>5-axis review on current head
abfb1fc1: APPROVED. Correctness: enriches only the CommitMemory plugin server log with workspace/scope/namespace and error class/detail, matching the observability intent. Robustness: no write-path behavior change; the existing 500 response remains the same generic failed-to-store-memory JSON. Security/no-leak: raw err is server-log-only in log.Printf, not returned through c.JSON and no WS/SSE/broadcast path is touched. Performance/readability: negligible error-path-only formatting; scoped one-line change. BP-required contexts are green; qa/security/sop reds are advisory for this review context.APPROVE on #2402 @abfb1fc1. Diff is a single server-side CommitMemory plugin log enrichment in memories.go; client response remains the generic "failed to store memory", so no underlying error leaks to clients. No gate/auth/merge-control changes; BP-required contexts are present+success and mergeable=true.