Skip to content

refactor(dfir_rs): remove SubgraphId, SubgraphTag, LoopId, LoopTag, simplify StateLifespan#2812

Draft
MingweiSamuel wants to merge 6 commits intomainfrom
mingwei/delete-subgraph-id
Draft

refactor(dfir_rs): remove SubgraphId, SubgraphTag, LoopId, LoopTag, simplify StateLifespan#2812
MingweiSamuel wants to merge 6 commits intomainfrom
mingwei/delete-subgraph-id

Conversation

@MingweiSamuel
Copy link
Copy Markdown
Member

STACK: #2811 #2810

Remove SubgraphTag, SubgraphId, LoopTag, LoopId from
scheduled/mod.rs — no longer used after removing the sg_id parameter
from schedule_subgraph.

Simplify StateLifespan to only have Tick variant — Subgraph,
Loop, and Static variants were unused.

@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from acdbd18 to 96a30ad Compare April 24, 2026 23:38
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 24, 2026

Deploying hydro with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7374f32
Status: ✅  Deploy successful!
Preview URL: https://aa0008dd.hydroflow.pages.dev
Branch Preview URL: https://mingwei-delete-subgraph-id.hydroflow.pages.dev

View logs

@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from 96a30ad to 0551cd2 Compare April 28, 2026 17:09
MingweiSamuel added a commit that referenced this pull request Apr 28, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
MingweiSamuel added a commit that referenced this pull request Apr 30, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch 2 times, most recently from 0a18d5e to 60f7ac8 Compare April 30, 2026 23:18
MingweiSamuel added a commit that referenced this pull request Apr 30, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
MingweiSamuel added a commit that referenced this pull request May 1, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from 60f7ac8 to d39854f Compare May 1, 2026 16:43
MingweiSamuel added a commit that referenced this pull request May 1, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from d39854f to fb0c2a7 Compare May 1, 2026 18:02
MingweiSamuel added a commit that referenced this pull request May 1, 2026
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from fb0c2a7 to e7d9a3b Compare May 1, 2026 18:44
MingweiSamuel and others added 6 commits May 1, 2026 22:43
…urrent_subgraph

Remove the unused `sg_id: SubgraphId` parameter from
`Context::schedule_subgraph` — inline mode ignores it. Remove
`Context::current_subgraph` which always returned a dummy value.

Update all operator codegen call sites to drop the
`#context.current_subgraph()` argument.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2811
Remove all `schedule_subgraph(false)` calls from operator codegen —
these were no-ops since `schedule_subgraph` only acts when
`is_external` is `true`. Clean up the `schedule_subgraph(true)` call
in meta_graph.rs formatting.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2811
…m slot_vec tags

Replace custom `SecondarySlotVec<SubgraphTag, _>` and
`SecondarySlotVec<HandoffTag, _>` in DfirMetrics with
`slotmap::SecondaryMap<GraphSubgraphId, _>` and
`SecondaryMap<GraphNodeId, _>` from dfir_lang.

This eliminates the `slotmap_raw_idx` conversion hack in codegen —
keys are now reconstructed via `slotmap::KeyData::from_ffi()` which
preserves the full key (including version), not just the raw index.

Make `dfir_lang` a non-optional dependency of `dfir_rs` (it was already
always compiled via `dfir_macro`). Re-export `dfir_lang` and `slotmap`
from `dfir_rs` for use in generated code.

Remove `HandoffTag` and `HandoffId` from `scheduled/mod.rs` (no longer
needed). Update `hydro_lang/src/telemetry/emf.rs` to use `Debug`
formatting for slotmap keys instead of `Display`.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2810
Remove the `slotmap_key_ffi` helper and inline `key.data().as_ffi()` at
each call site. This makes the symmetry with the generated
`KeyData::from_ffi(ffi).into()` more visible.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2810
…ateLifespan

Remove `SubgraphTag`, `SubgraphId`, `LoopTag`, `LoopId` from
`scheduled/mod.rs` — no longer used after removing the `sg_id` parameter
from `schedule_subgraph`.

Simplify `StateLifespan` to only have `Tick` variant — `Subgraph`,
`Loop`, and `Static` variants were unused.

Co-authored-by: Infinity 🤖 <infinity@hydro.run>
PR: #2812
@MingweiSamuel MingweiSamuel force-pushed the mingwei/delete-subgraph-id branch from e7d9a3b to 7374f32 Compare May 1, 2026 22:48
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.

1 participant