mesh admin runtime ports refactor#2708
Open
shayne-fletcher wants to merge 2 commits intometa-pytorch:mainfrom
Open
mesh admin runtime ports refactor#2708shayne-fletcher wants to merge 2 commits intometa-pytorch:mainfrom
shayne-fletcher wants to merge 2 commits intometa-pytorch:mainfrom
Conversation
|
@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D93864958. |
f193575 to
ecd6c9d
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Feb 20, 2026
Summary: this refactor moves actor introspection off the actor message loop and into a dedicated runtime task per instance, served via a pre-registered message port. IntrospectMessage no longer goes through handler dispatch; the introspect task reads InstanceCell directly and replies via the mailbox. this eliminates the heisenberg artifact (introspection showing itself as the last handler) and allows wedged actors to remain introspectable. the blanket Handler<IntrospectMessage> and Actor::handle_introspect override path are removed. structural data now comes from live cell state (live_actor_payload), and domain-specific metadata is provided via published properties and an optional query_child callback stored on InstanceCell. the pre-dispatch snapshot fields and related plumbing are deleted since they are no longer needed. Instance::new now pre-registers the introspect port with its own receiver, and Instance::start (and actor_instance) spawn the introspect task. this keeps routing unchanged while ensuring introspect messages do not produce WorkCells or interfere with handler ordering. a new InstanceReceivers struct threads the actor loop, work queue, and introspect receiver to their respective consumers, and ActorInstance groups the return values from Proc::actor_instance. Host and proc mesh agents are updated to publish properties instead of overriding introspection handlers, and to register query_child callbacks for non-addressable children. NodePayload now includes an as_of timestamp propagated through the stack and surfaced in the TUI. tests are updated to target the runtime path and new invariants, including wedged actor introspection and non-perturbation guarantees. Differential Revision: D93864958
ecd6c9d to
c3c05ed
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Feb 20, 2026
Summary: this refactor moves actor introspection off the actor message loop and into a dedicated runtime task per instance, served via a pre-registered message port. IntrospectMessage no longer goes through handler dispatch; the introspect task reads InstanceCell directly and replies via the mailbox. this eliminates the heisenberg artifact (introspection showing itself as the last handler) and allows wedged actors to remain introspectable. the blanket Handler<IntrospectMessage> and Actor::handle_introspect override path are removed. structural data now comes from live cell state (live_actor_payload), and domain-specific metadata is provided via published properties and an optional query_child callback stored on InstanceCell. the pre-dispatch snapshot fields and related plumbing are deleted since they are no longer needed. Instance::new now pre-registers the introspect port with its own receiver, and Instance::start (and actor_instance) spawn the introspect task. this keeps routing unchanged while ensuring introspect messages do not produce WorkCells or interfere with handler ordering. a new InstanceReceivers struct threads the actor loop, work queue, and introspect receiver to their respective consumers, and ActorInstance groups the return values from Proc::actor_instance. Host and proc mesh agents are updated to publish properties instead of overriding introspection handlers, and to register query_child callbacks for non-addressable children. NodePayload now includes an as_of timestamp propagated through the stack and surfaced in the TUI. tests are updated to target the runtime path and new invariants, including wedged actor introspection and non-perturbation guarantees. Differential Revision: D93864958
…ta-pytorch#2698) Summary: this diff adds the data plumbing needed for runtime introspection without changing behavior yet: introduces PublishedProperties{ published_at, kind: Host|Proc } in introspect.rs, adds published_properties and query_child_handler slots to InstanceCellState in proc.rs with accessors (set_published_properties, published_properties, set_query_child_handler, query_child), and exposes Instance::publish_properties() / Instance::set_query_child_handler() as the public API. it also adds an is_system: bool field to NodeProperties::Actor (defaulted to false in default_actor_payload) and updates the TUI actor-detail match to ignore the new field. two unit tests validate properties round-trip and callback round-trip at the cell level. Differential Revision: D93768689
Summary: this refactor moves actor introspection off the actor message loop and into a dedicated runtime task per instance, served via a pre-registered message port. IntrospectMessage no longer goes through handler dispatch; the introspect task reads InstanceCell directly and replies via the mailbox. this eliminates the heisenberg artifact (introspection showing itself as the last handler) and allows wedged actors to remain introspectable. the blanket Handler<IntrospectMessage> and Actor::handle_introspect override path are removed. structural data now comes from live cell state (live_actor_payload), and domain-specific metadata is provided via published properties and an optional query_child callback stored on InstanceCell. the pre-dispatch snapshot fields and related plumbing are deleted since they are no longer needed. Instance::new now pre-registers the introspect port with its own receiver, and Instance::start (and actor_instance) spawn the introspect task. this keeps routing unchanged while ensuring introspect messages do not produce WorkCells or interfere with handler ordering. a new InstanceReceivers struct threads the actor loop, work queue, and introspect receiver to their respective consumers, and ActorInstance groups the return values from Proc::actor_instance. Host and proc mesh agents are updated to publish properties instead of overriding introspection handlers, and to register query_child callbacks for non-addressable children. NodePayload now includes an as_of timestamp propagated through the stack and surfaced in the TUI. tests are updated to target the runtime path and new invariants, including wedged actor introspection and non-perturbation guarantees. Differential Revision: D93864958
c3c05ed to
2e0b48d
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Feb 20, 2026
Summary: this refactor moves actor introspection off the actor message loop and into a dedicated runtime task per instance, served via a pre-registered message port. IntrospectMessage no longer goes through handler dispatch; the introspect task reads InstanceCell directly and replies via the mailbox. this eliminates the heisenberg artifact (introspection showing itself as the last handler) and allows wedged actors to remain introspectable. the blanket Handler<IntrospectMessage> and Actor::handle_introspect override path are removed. structural data now comes from live cell state (live_actor_payload), and domain-specific metadata is provided via published properties and an optional query_child callback stored on InstanceCell. the pre-dispatch snapshot fields and related plumbing are deleted since they are no longer needed. Instance::new now pre-registers the introspect port with its own receiver, and Instance::start (and actor_instance) spawn the introspect task. this keeps routing unchanged while ensuring introspect messages do not produce WorkCells or interfere with handler ordering. a new InstanceReceivers struct threads the actor loop, work queue, and introspect receiver to their respective consumers, and ActorInstance groups the return values from Proc::actor_instance. Host and proc mesh agents are updated to publish properties instead of overriding introspection handlers, and to register query_child callbacks for non-addressable children. NodePayload now includes an as_of timestamp propagated through the stack and surfaced in the TUI. tests are updated to target the runtime path and new invariants, including wedged actor introspection and non-perturbation guarantees. Differential Revision: D93864958
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Differential Revision: D93864958