fix: make stdio redirection scoped and exception-safe - #243
fix: make stdio redirection scoped and exception-safe#243Ayoubbelguellaoui wants to merge 1 commit into
Conversation
c522e25 to
6bdc310
Compare
|
Thank you for your contribution! However, does this PR have any overlapping parts with #236? |
6bdc310 to
0fc270b
Compare
|
There is some overlap at the step-execution/runtime level, particularly around EngineFlow and failure cleanup, but the two PRs address different issues. PR #236 focuses on containing tool failures, persisting Incomplete, interrupted-operation recovery, and terminal failure state propagation. This PR focuses specifically on making process-global stdout/stderr redirection scoped and exception-safe, isolating concurrent redirects, and guaranteeing runtime operation cleanup when event publishing fails. The overlap is therefore limited to the surrounding execution/cleanup paths; the implementations address separate failure modes. |
Got it, I just merged #236. Could you rebase and resolve the conflicts? |
0fc270b to
4e47409
Compare
What Changed
Updated chipcompiler/engine/flow.py, chipcompiler/engine/rerun.py, and agent/engine.py to ensure step-level log redirects close cleanly.
Updated chipcompiler/runtime/operations.py to treat event publisher exceptions as non-fatal and wrapped active operation tracking in finally blocks to guarantee cleanup.
Added and updated tests in test/cli/rendering/test_progress.py, test/runtime/test_events.py, and test/runtime/test_operations.py to cover stdio restoration, thread isolation under concurrency, and resilient operation tracking.
Scope
Select the areas touched by this PR:
uv.lock, or release artifacts.Runtime And Packaging Impact
ecc-toolsorecc-dreamplacedependency changedNotes:
Validation
List the commands you ran. Mark checks that are not applicable as N/A.
uv run pytest test/uv run ruff check chipcompiler testuv run ruff format --check chipcompiler testecc --help,ecc --version,ecc version --jsonnix run .#cli -- --helpuv run pytest test/— 1460 passed, 8 skipped, 4 xfailed, 2 environment-related failures.Skipped checks and reason:
Checklist