Skip to content

fix(engine): inherit background mode in subworkflows - #525

Merged
Jason Robert (jrob5756) merged 1 commit into
microsoft:mainfrom
arturleao:fix/subworkflow-run-context
Sep 11, 2026
Merged

fix(engine): inherit background mode in subworkflows#525
Jason Robert (jrob5756) merged 1 commit into
microsoft:mainfrom
arturleao:fix/subworkflow-run-context

Conversation

@arturleao

Copy link
Copy Markdown
Contributor

Summary

  • Propagate background-mode context from parent workflows into child workflow engines.
  • Prevent nested human_gate steps from racing a CLI stdin prompt under --web-bg.
  • Add regression coverage for a dashboard-backed nested gate with TTY-like stdin.

Why

Only the CLI builds RunContext. Child engines previously saw bg_mode=False, so a nested gate could call Prompt.ask, raise EOFError, and fail a background workflow even while a web dashboard was available.

Testing

  • tests/test_engine/test_subworkflow.py (42 passed)
  • Scoped Ruff and formatting checks

@arturleao
Artur Leao (arturleao) marked this pull request as ready for review September 11, 2026 09:14
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@f7f444c). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #525   +/-   ##
=======================================
  Coverage        ?   92.00%           
=======================================
  Files           ?      165           
  Lines           ?    27335           
  Branches        ?        0           
=======================================
  Hits            ?    25149           
  Misses          ?     2186           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jrob5756 Jason Robert (jrob5756) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks for contributing!

@jrob5756
Jason Robert (jrob5756) merged commit 64b7167 into microsoft:main Sep 11, 2026
13 checks passed
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.

3 participants