Skip to content

fix(worker): gate workflow diagnostic logs#8

Merged
zebbern merged 1 commit into
mainfrom
codex/quiet-workflow-runner-logs
Jun 20, 2026
Merged

fix(worker): gate workflow diagnostic logs#8
zebbern merged 1 commit into
mainfrom
codex/quiet-workflow-runner-logs

Conversation

@zebbern

@zebbern zebbern commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • gate routine workflow runner and runWorkflow activity console.log diagnostics behind SENTRIS_DEBUG_WORKFLOW=1
  • keep warning/error logging paths unchanged
  • add a regression test that executeWorkflow does not write workflow diagnostics by default

Verification

  • git diff --check
  • bun test worker/src/temporal/tests/workflow-runner.test.ts
  • bun test worker/src/temporal/activities/tests/run-workflow.activity.test.ts
  • bun test worker/src/temporal
  • 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 16:03

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 noise from the worker’s workflow execution path by gating routine console.log-based diagnostics behind SENTRIS_DEBUG_WORKFLOW=1, while leaving warning/error logging behavior unchanged. It also adds a regression test to ensure executeWorkflow() is quiet by default.

Changes:

  • Added workflowDiagnosticLog() helper that conditionally emits diagnostics when SENTRIS_DEBUG_WORKFLOW === '1'.
  • Replaced routine console.log diagnostics in executeWorkflow() and runWorkflowActivity() with workflowDiagnosticLog().
  • Added a regression test asserting executeWorkflow() does not write to console.log by default.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
worker/src/temporal/workflow-runner.ts Routes workflow-runner diagnostic logs through the new gated diagnostic logger.
worker/src/temporal/workflow-diagnostics.ts Introduces the env-gated diagnostic logging helper.
worker/src/temporal/activities/run-workflow.activity.ts Gates activity start/end diagnostic logs behind SENTRIS_DEBUG_WORKFLOW.
worker/src/temporal/tests/workflow-runner.test.ts Adds a regression test ensuring diagnostics don’t hit console.log by default.

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

workflowDiagnosticLog(`📋 Run ID: ${input.runId}`);
workflowDiagnosticLog(`📋 Workflow ID: ${input.workflowId}`);
workflowDiagnosticLog(`📋 Actions count: ${input.definition.actions.length}`);
workflowDiagnosticLog(`📋 Action refs: ${input.definition.actions.map((a) => a.ref).join(', ')}`);
@zebbern zebbern merged commit 79a7425 into main Jun 20, 2026
6 checks passed
@zebbern zebbern deleted the codex/quiet-workflow-runner-logs branch June 20, 2026 16:07
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