Skip to content

expose DatabaseScanner::ingest_batch as public ingestion API#3358

Open
shayne-fletcher wants to merge 5 commits intometa-pytorch:mainfrom
shayne-fletcher:export-D99477096
Open

expose DatabaseScanner::ingest_batch as public ingestion API#3358
shayne-fletcher wants to merge 5 commits intometa-pytorch:mainfrom
shayne-fletcher:export-D99477096

Conversation

@shayne-fletcher
Copy link
Copy Markdown
Contributor

Summary:
this diff adds the narrow public ingestion seam needed by the snapshot bridge without changing telemetry ingestion semantics. it exposes DatabaseScanner::ingest_batch as a thin public wrapper over the existing internal named-batch insertion path, keeping ingestion ownership in monarch_distributed_telemetry while avoiding direct construction or manipulation of LiveTableData from the bridge crate.

it also adds focused unit tests that pin down the contract of that public seam: first ingest creates a table from the batch schema, empty batches still register schema without appending rows, repeated ingests to the same table reuse the existing entry and accumulate rows, and the “empty first, non-empty later” path works correctly. that empty-batch schema-registration behavior is the key guarantee the snapshot ingestion path needs so all snapshot tables can be registered in DataFusion even when a given capture has zero rows for some table.

Differential Revision: D99477096

Summary:

pesky lints. we hates them precious.

Differential Revision: D99460173
…eta-pytorch#3353)

Summary:

this diff adds the monarch_introspection_snapshot conversion layer from typed mesh-admin NodePayload values into the normalized snapshot row schema. it introduces convert.rs, with a typed ConvertedNode / NodeKindRow algebra, one conversion entry point for all node variants, link-level child classification, fallible time conversion to microseconds, and focused conversion tests covering subtype selection, failure projection, child ordering, child classification, and the fact that parent is not materialized into the snapshot schema.

it also tightens and corrects the source invariants in hyperactor_mesh that the snapshot projection depends on. in particular, it fixes the navigation docs to distinguish canonical containment parent from the admin navigation graph, records the link-classification invariants for system_children and stopped_children, removes stale root-node documentation, and adds assertions for the root and host empty-classification cases. the snapshot schema docs are updated to explain that ChildRow models the admin navigation graph rather than a strict tree, and the snapshot crate docs and BUCK deps are updated accordingly.

Differential Revision: D99452318
…t with proc membership (meta-pytorch#3355)

Summary:

this diff adds a live integration proof for the mesh-admin supervision invariants over the existing Rust sieve workload. it extends mesh_admin_integration with a new supervision.rs scenario that launches sieve, discovers a concrete proc -> actor A -> actor B chain, and proves the two intended facts together: actor-to-actor supervision edges and proc-to-actor membership edges coexist in children, while resolving B still yields parent = Some(NodeRef::Proc(...)) rather than the supervising actor.

it also wires the new proof into the integration suite by adding the sieve binary as a Buck resource, exposing it from the test harness, and registering the new MIT-71 / MIT-72 invariants and test entrypoint in main.rs. the test is kept typed internally, filters explicitly to sieve actors, and uses bounded readiness/retry constants so the proof remains focused on the NI-2 / NI-3 contract rather than incidental topology details.

Differential Revision: D99456727
…set dedup (meta-pytorch#3357)

Summary:

this diff adds the capture layer in monarch_introspection_snapshot. it introduces capture.rs, defines SnapshotData as the typed per-snapshot accumulator, and adds capture_snapshot, which performs a bfs from NodeRef::Root, resolves each typed node reference at most once, projects each NodePayload through the existing convert_node path, and folds the result through a single SnapshotData::push_converted seam. the traversal stays imperative, while subtype routing is confined to the fold target.

the new module also documents and tests the capture invariants directly. the tests use stub resolvers rather than a live mesh and cover the intended semantics: one snapshot row per capture, capture-start timestamp distinct from node as_of, typed visited-set dedup, per-parent edge emission order, duplicate nodes producing one node row but multiple child edges, full NodeKindRow routing through the fold seam, resolver failures aborting capture, and successfully resolved NodeProperties::Error payloads producing ResolutionErrorRow rather than failing capture. lib.rs, BUCK, and the shared to_micros visibility were updated accordingly to wire the new module in cleanly.

Differential Revision: D99473110
Summary:
this diff adds the narrow public ingestion seam needed by the snapshot bridge without changing telemetry ingestion semantics. it exposes DatabaseScanner::ingest_batch as a thin public wrapper over the existing internal named-batch insertion path, keeping ingestion ownership in monarch_distributed_telemetry while avoiding direct construction or manipulation of LiveTableData from the bridge crate.

it also adds focused unit tests that pin down the contract of that public seam: first ingest creates a table from the batch schema, empty batches still register schema without appending rows, repeated ingests to the same table reuse the existing entry and accumulate rows, and the “empty first, non-empty later” path works correctly. that empty-batch schema-registration behavior is the key guarantee the snapshot ingestion path needs so all snapshot tables can be registered in DataFusion even when a given capture has zero rows for some table.

Differential Revision: D99477096
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 3, 2026

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

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Apr 3, 2026
…torch#3358)

Summary:

this diff adds the narrow public ingestion seam needed by the snapshot bridge without changing telemetry ingestion semantics. it exposes DatabaseScanner::ingest_batch as a thin public wrapper over the existing internal named-batch insertion path, keeping ingestion ownership in monarch_distributed_telemetry while avoiding direct construction or manipulation of LiveTableData from the bridge crate.

it also adds focused unit tests that pin down the contract of that public seam: first ingest creates a table from the batch schema, empty batches still register schema without appending rows, repeated ingests to the same table reuse the existing entry and accumulate rows, and the “empty first, non-empty later” path works correctly. that empty-batch schema-registration behavior is the key guarantee the snapshot ingestion path needs so all snapshot tables can be registered in DataFusion even when a given capture has zero rows for some table.

Differential Revision: D99477096
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 meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant