Skip to content

fix(worker): gate mcp discovery cache diagnostics#19

Merged
zebbern merged 1 commit into
mainfrom
codex/quiet-mcp-discovery-cache-logs
Jun 20, 2026
Merged

fix(worker): gate mcp discovery cache diagnostics#19
zebbern merged 1 commit into
mainfrom
codex/quiet-mcp-discovery-cache-logs

Conversation

@zebbern

@zebbern zebbern commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • route MCP discovery cache success diagnostics through workflowDiagnosticLog
  • keep cache behavior and Redis TTL unchanged
  • add a focused regression test proving successful cache writes stay quiet by default

Verification

  • bun test worker/src/temporal/activities/tests/mcp-discovery.activity.test.ts
  • bun test worker/src/temporal/activities
  • bun test worker
  • bun run typecheck
  • bun run lint
  • bun run test

Signed-off-by: zebbern <185730623+zebbern@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 20, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces noisy worker logs by routing MCP discovery cache “success” diagnostics through the existing workflowDiagnosticLog() gate (enabled via SENTRIS_DEBUG_WORKFLOW=1), while keeping the Redis cache format and TTL unchanged.

Changes:

  • Replace unconditional console.log on successful MCP discovery cache writes with workflowDiagnosticLog().
  • Add a regression test that proves successful cache writes do not call console.log by default.
  • Keep the Redis key format and 5-minute TTL (setex(..., 300, ...)) unchanged.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
worker/src/temporal/activities/mcp-discovery.activity.ts Gates the “cached discovery results” success log behind workflowDiagnosticLog() instead of always emitting to stdout.
worker/src/temporal/activities/__tests__/mcp-discovery.activity.test.ts Adds a focused test with a mocked Redis client to ensure no default console.log output on successful cache writes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@zebbern zebbern merged commit 6227377 into main Jun 20, 2026
6 checks passed
@zebbern zebbern deleted the codex/quiet-mcp-discovery-cache-logs branch June 20, 2026 20:10
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.

2 participants