Skip to content

[EXPERIMENTAL] feat(dag): migrate DAG support to extension SPI - #611

Draft
zhongkechen wants to merge 3 commits into
codex/extension-operation-refactorfrom
codex/experimental-dag-extension-spi
Draft

[EXPERIMENTAL] feat(dag): migrate DAG support to extension SPI#611
zhongkechen wants to merge 3 commits into
codex/extension-operation-refactorfrom
codex/experimental-dag-extension-spi

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Warning

Experimental stacked PR. This work depends on draft PR #607 and is not intended for production use. The DAG API, checkpoint shape, and implementation may change before merge or release.

Issue Link, if available

Stacked on #607.

Description

Migrates the experimental DAG implementation to the extension operation SPI introduced by #607.

  • Adds static DurableDagOperation.dag(...) and dagAsync(...) entry points following the new Durable*Operation facade style.
  • Removes DAG-specific methods and internal hooks from DurableContext.
  • Schedules DAG containers and tasks through ExtensionContext and ExtensionOperation.
  • Preserves stable name-based DAG task IDs.
  • Reuses unchanged map, parallel, and wait-for-condition facades through a DAG-internal reserved-context adapter.
  • Leaves all other Durable*Operation classes and their implementation tests unchanged from the stacked base.
  • Handles large DAG results with extension child replay state.
  • Updates examples, conformance handlers, integration tests, and DAG documentation.

Demo/Screenshots

Not applicable. This is an SDK API and execution implementation change.

Checklist

  • I have filled out every section of the PR template
  • I have thoroughly tested this change

Testing

Unit Tests

Yes. Added focused coverage for DurableDagOperation and the DAG-internal reserved-context adapter.

Integration Tests

Yes. DAG integration and conformance tests were updated for the static operation facade. The complete Maven reactor passes.

Commands run:

mvn spotless:apply
mvn -pl sdk -Dtest=DurableDagOperationTest,ReservedOperationContextTest test \
  -DargLine=-javaagent:$HOME/.m2/repository/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar
mvn test \
  -DargLine=-javaagent:$HOME/.m2/repository/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar

Cloud example tests remain disabled by default.

Examples

Existing DAG examples were migrated to DurableDagOperation; no additional example was required.

@zhongkechen
zhongkechen deployed to ai-pr-review August 10, 2026 17:29 — with GitHub Actions Active
@zhongkechen
zhongkechen requested a deployment to ai-pr-review-runtime August 10, 2026 17:29 — with GitHub Actions Waiting
@zhongkechen
zhongkechen requested a deployment to ai-pr-review-runtime August 10, 2026 17:29 — with GitHub Actions Waiting
@zhongkechen
zhongkechen force-pushed the codex/experimental-dag-extension-spi branch 2 times, most recently from ecf0c30 to e25ea9c Compare August 10, 2026 20:05
@zhongkechen
zhongkechen force-pushed the codex/experimental-dag-extension-spi branch 2 times, most recently from 25cf931 to b08588f Compare August 10, 2026 23:59
@zhongkechen
zhongkechen force-pushed the codex/experimental-dag-extension-spi branch from 6a8bbc1 to 818b256 Compare August 11, 2026 05:19
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