Skip to content

fix(worker): gate workflow orchestration diagnostics#17

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

fix(worker): gate workflow orchestration diagnostics#17
zebbern merged 1 commit into
mainfrom
codex/quiet-workflow-orchestration-logs

Conversation

@zebbern

@zebbern zebbern commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

  • Route workflow orchestration success diagnostics through the existing SENTRIS_DEBUG_WORKFLOW-gated logger.
  • Keep warnings and errors visible while quieting normal lifecycle chatter in workflow, tool-mode, and human-input handlers.
  • Add regression coverage for quiet default behavior across those workflow paths.

Test Plan

  • bun test worker/src/temporal/workflows/tests/workflow-diagnostics.test.ts
  • bun test worker/src/temporal
  • bun test worker
  • bun run typecheck
  • bun --cwd worker eslint src/temporal/workflows/index.ts src/temporal/workflows/tool-mode-handler.ts src/temporal/workflows/human-input-handler.ts src/temporal/workflows/tests/workflow-diagnostics.test.ts
  • 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 19:28

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 Temporal workflow orchestration noise by routing routine lifecycle diagnostics through the existing SENTRIS_DEBUG_WORKFLOW-gated workflowDiagnosticLog() helper, and adds regression tests to ensure “quiet by default” behavior across core workflow paths.

Changes:

  • Replaced console.log workflow lifecycle messages in the main orchestrator, tool-mode handler, and human-input handler with workflowDiagnosticLog() (gated by SENTRIS_DEBUG_WORKFLOW=1).
  • Added regression tests ensuring successful workflow/tool/human-input paths do not write to console.log by default.

Reviewed changes

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

File Description
worker/src/temporal/workflows/tool-mode-handler.ts Gates tool-mode registration “happy-path” diagnostics behind workflowDiagnosticLog() instead of console.log.
worker/src/temporal/workflows/index.ts Gates most workflow orchestration lifecycle chatter behind workflowDiagnosticLog() and keeps existing warn/error logs for some cases.
worker/src/temporal/workflows/human-input-handler.ts Gates human-input lifecycle diagnostics behind workflowDiagnosticLog() instead of console.log.
worker/src/temporal/workflows/tests/workflow-diagnostics.test.ts Adds tests verifying no console.log output in successful workflow/tool/human-input paths when debug flag is unset.

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

Comment on lines +221 to +223
workflowDiagnosticLog(
`[Workflow] Tool call failed: callId=${request.callId}, error=${errorMessage}`,
);

if (!signalReceived) {
console.log(`[Workflow] Human input timeout for ${actionRef}`);
workflowDiagnosticLog(`[Workflow] Human input timeout for ${actionRef}`);
@zebbern zebbern merged commit 07ff730 into main Jun 20, 2026
6 checks passed
@zebbern zebbern deleted the codex/quiet-workflow-orchestration-logs branch June 20, 2026 19:32
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