Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 16, 2026

Summary

  • What: Fix unreliable orchestrator failure detection in orchestrate-test.yml workflow
  • Why: continue-on-error: true caused the step to always succeed, preventing the conditional check from working

Changes

  • Remove continue-on-error: true from orchestrator validation step
  • Explicitly capture exit code using set +e and shell variable
  • Set orchestrator_failed environment variable only on actual failure
  • Use exit 0 to allow workflow continuation without masking failures

Before

- name: Orchestrator dry-run validation
  run: |
    python scripts/orchestrate_content.py ... || echo "orchestrator_failed=true" >> $GITHUB_ENV
  continue-on-error: true

- name: Comment PR on validation failures
  if: env.orchestrator_failed == 'true'  # Never triggered reliably

After

- name: Orchestrator dry-run validation
  id: orchestrator
  run: |
    set +e
    python scripts/orchestrate_content.py ...
    exit_code=$?
    if [ $exit_code -ne 0 ]; then
      echo "orchestrator_failed=true" >> $GITHUB_ENV
    fi
    exit 0

- name: Comment PR on validation failures
  if: env.orchestrator_failed == 'true'  # Now works correctly

Testing

  • Workflow syntax validated
  • CodeQL security scan passed with 0 alerts

Checklist

  • Workflow updated to properly detect failures
  • Environment variable set reliably on non-zero exit
  • Conditional check now triggers correctly
  • Security scan passed

Reviewers


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Remove continue-on-error and properly capture exit code to set orchestrator_failed env variable. This ensures the conditional check on line 50 works correctly.

Co-authored-by: 73junito <86015877+73junito@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback from PR 158 Fix orchestrator failure detection in GitHub Actions workflow Jan 16, 2026
Copilot AI requested a review from 73junito January 16, 2026 01:50
@73junito 73junito requested a review from Copilot January 16, 2026 09:27
Copy link
Owner

@73junito 73junito left a comment

Choose a reason for hiding this comment

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

viewed

@73junito 73junito marked this pull request as ready for review January 16, 2026 09:27
@73junito 73junito merged commit d2295f8 into merge/pr-158-local Jan 16, 2026
2 of 5 checks passed
Copy link
Contributor

Copilot AI left a comment

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 fixes unreliable orchestrator failure detection in the GitHub Actions workflow by properly capturing and handling exit codes from the orchestrator validation script. The previous implementation used continue-on-error: true, which caused the step to always succeed, preventing the conditional failure check from working.

Changes:

  • Removed continue-on-error: true from the orchestrator validation step
  • Implemented explicit exit code capture using shell variables and set +e
  • Added conditional logic to set orchestrator_failed environment variable only on actual failures

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants