Skip to content

Conversation

@shayne-fletcher
Copy link
Contributor

Summary: this refactors the python-side config helpers to make Runtime-layer overrides explicit and reversible, replaces the previous "restore from snapshot" approach with a clearer model that writes into the Runtime layer on entry and clears it on exit, and exposes a Rust-backed clear() to support that. the main functional change is adding configured_with_redirected_stdio(), which composes configuration overrides with stdio redirection in a single context manager so the tests don't need nested with blocks. all affected tests are updated to use the combined form, but the underlying logging behaviour is unchanged.

Differential Revision: D87795973

@meta-codesync
Copy link

meta-codesync bot commented Nov 24, 2025

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87795973.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 24, 2025
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 24, 2025
…orch#1982)

Summary:

this refactors the Python-side config helpers so `configured()` actually behaves like a "save/restore Runtime overrides" wrapper instead of copying the merged config back into the Runtime layer. it introduces Runtime-only helpers and rewrites `configured()` / `configured_with_redirected_stdio()` to snapshot and restore just the Runtime layer while composing cleanly with stdio redirection. the logging semantics and test expectations are unchanged; only the way we stage and clean up runtime overrides is different (and now deterministic / nestable).

Differential Revision: D87795973
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Nov 24, 2025
…orch#1982)

Summary:

this refactors the Python-side config helpers so `configured()` actually behaves like a "save/restore Runtime overrides" wrapper instead of copying the merged config back into the Runtime layer. it introduces Runtime-only helpers and rewrites `configured()` / `configured_with_redirected_stdio()` to snapshot and restore just the Runtime layer while composing cleanly with stdio redirection. the logging semantics and test expectations are unchanged; only the way we stage and clean up runtime overrides is different (and now deterministic / nestable).

Differential Revision: D87795973
…orch#1982)

Summary:

this refactors the Python-side config helpers so `configured()` actually behaves like a "save/restore Runtime overrides" wrapper instead of copying the merged config back into the Runtime layer. it introduces Runtime-only helpers and rewrites `configured()` / `configured_with_redirected_stdio()` to snapshot and restore just the Runtime layer while composing cleanly with stdio redirection. the logging semantics and test expectations are unchanged; only the way we stage and clean up runtime overrides is different (and now deterministic / nestable).

Differential Revision: D87795973
@meta-codesync
Copy link

meta-codesync bot commented Nov 25, 2025

This pull request has been merged in c98cade.

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants