Skip to content

chore(core): log replication-op emit failures in updateMemoryVisibility#1108

Merged
kunickiaj merged 1 commit into
mainfrom
fix/replication-emit-logging-visibility
May 20, 2026
Merged

chore(core): log replication-op emit failures in updateMemoryVisibility#1108
kunickiaj merged 1 commit into
mainfrom
fix/replication-emit-logging-visibility

Conversation

@kunickiaj
Copy link
Copy Markdown
Owner

Description

updateMemoryVisibility wraps recordReplicationOp in a silent try/catch with \"Non-fatal\" as the only comment. The intent (don't fail the visibility write on a replication hiccup) is correct, but the silence hides whatever actually broke the replication path — peers stop learning about the change and no signal reaches the operator.

Replace the swallow with a structured console.warn using the existing [codemem] prefix convention (matches db.ts, observer-client.ts, sync-discovery.ts, etc.). Includes the memory id and the error message so a failure leaves a forensic trail without crashing the caller. Behavior is otherwise unchanged.

This is a standalone re-do of the visibility-side change from the now-closed sticky-rules feature stack; the rest of that feature was scrapped.

Type of Change

  • 🔧 Maintenance (refactor, chore, CI, etc.)

Testing

  • Relevant checks pass locally (pnpm run tsc, pnpm run lint, pnpm run test) — workspace 1927/1927
  • Added/updated tests for changes — observability-only change, no new tests; the existing replication-op emit tests already exercise the happy path
  • Manually verified changes work as expected — log message format matches existing [codemem] log lines

Checklist

  • Code follows project style (pnpm run lint passes for touched files)
  • Self-review completed
  • Documentation updated (if needed) — N/A
  • No new warnings introduced

updateMemoryVisibility wraps recordReplicationOp in a silent try/catch
with "Non-fatal" as the only comment. The intent (don't fail the
visibility write on a replication hiccup) is correct, but the silence
hides whatever actually broke the replication path — peers stop
learning about the change and no signal reaches the operator.

Replace the swallow with a structured console.warn using the existing
[codemem] prefix convention (matches db.ts, observer-client.ts,
sync-discovery.ts, etc.). Includes the memory id and the error
message so a failure leaves a forensic trail without crashing the
caller. Behavior is otherwise unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Owner Author

kunickiaj commented May 20, 2026

Merge activity

  • May 20, 11:31 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 20, 11:31 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj kunickiaj merged commit f59ddaa into main May 20, 2026
8 checks passed
@kunickiaj kunickiaj deleted the fix/replication-emit-logging-visibility branch May 20, 2026 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant