Skip to content

0.2.0#21

Open
kingwill101 wants to merge 299 commits intomasterfrom
feat/0.2.0
Open

0.2.0#21
kingwill101 wants to merge 299 commits intomasterfrom
feat/0.2.0

Conversation

@kingwill101
Copy link
Owner

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Mar 21, 2026

Important

Review skipped

Too many files!

This PR contains 212 files, which is 62 over the limit of 150.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ffdf0daf-0bb7-4736-89d7-71ff73f8a52e

📥 Commits

Reviewing files that changed from the base of the PR and between e22e1de and 8b6f030.

📒 Files selected for processing (212)
  • .site/docs/core-concepts/canvas.md
  • .site/docs/core-concepts/cli-control.md
  • .site/docs/core-concepts/observability.md
  • .site/docs/core-concepts/persistence.md
  • .site/docs/core-concepts/producer.md
  • .site/docs/core-concepts/queue-events.md
  • .site/docs/core-concepts/signing.md
  • .site/docs/core-concepts/stem-builder.md
  • .site/docs/core-concepts/tasks.md
  • .site/docs/getting-started/developer-environment.md
  • .site/docs/getting-started/first-steps.md
  • .site/docs/getting-started/production-checklist.md
  • .site/docs/workers/programmatic-integration.md
  • .site/docs/workers/worker-control.md
  • .site/docs/workflows/annotated-workflows.md
  • .site/docs/workflows/context-and-serialization.md
  • .site/docs/workflows/errors-retries-and-idempotency.md
  • .site/docs/workflows/flows-and-scripts.md
  • .site/docs/workflows/getting-started.md
  • .site/docs/workflows/index.md
  • .site/docs/workflows/starting-and-waiting.md
  • .site/docs/workflows/suspensions-and-events.md
  • .site/docs/workflows/troubleshooting.md
  • packages/dashboard/lib/src/server.dart
  • packages/dashboard/lib/src/services/models.dart
  • packages/dashboard/lib/src/services/stem_service.dart
  • packages/dashboard/lib/src/ui/content.dart
  • packages/dashboard/lib/src/ui/overview.dart
  • packages/dashboard/lib/src/ui/task_detail.dart
  • packages/dashboard/lib/src/ui/workflows.dart
  • packages/dashboard/pubspec.yaml
  • packages/dashboard/test/dashboard_browser_test.dart
  • packages/dashboard/test/dashboard_state_poll_test.dart
  • packages/dashboard/test/dashboard_state_property_test.dart
  • packages/dashboard/test/server_test.dart
  • packages/stem/CHANGELOG.md
  • packages/stem/README.md
  • packages/stem/example/annotated_workflows/README.md
  • packages/stem/example/annotated_workflows/bin/main.dart
  • packages/stem/example/annotated_workflows/lib/definitions.dart
  • packages/stem/example/annotated_workflows/lib/definitions.stem.g.dart
  • packages/stem/example/autoscaling_demo/bin/producer.dart
  • packages/stem/example/canvas_patterns/chain_example.dart
  • packages/stem/example/canvas_patterns/chord_example.dart
  • packages/stem/example/canvas_patterns/group_example.dart
  • packages/stem/example/dlq_sandbox/bin/producer.dart
  • packages/stem/example/dlq_sandbox/lib/shared.dart
  • packages/stem/example/docs_snippets/lib/best_practices.dart
  • packages/stem/example/docs_snippets/lib/canvas_batch.dart
  • packages/stem/example/docs_snippets/lib/canvas_chain.dart
  • packages/stem/example/docs_snippets/lib/canvas_chord.dart
  • packages/stem/example/docs_snippets/lib/canvas_group.dart
  • packages/stem/example/docs_snippets/lib/developer_environment.dart
  • packages/stem/example/docs_snippets/lib/first_steps.dart
  • packages/stem/example/docs_snippets/lib/observability.dart
  • packages/stem/example/docs_snippets/lib/persistence.dart
  • packages/stem/example/docs_snippets/lib/producer.dart
  • packages/stem/example/docs_snippets/lib/production_checklist.dart
  • packages/stem/example/docs_snippets/lib/queue_events.dart
  • packages/stem/example/docs_snippets/lib/quick_start.dart
  • packages/stem/example/docs_snippets/lib/quick_start_failure.dart
  • packages/stem/example/docs_snippets/lib/rate_limiting.dart
  • packages/stem/example/docs_snippets/lib/retry_backoff.dart
  • packages/stem/example/docs_snippets/lib/routing.dart
  • packages/stem/example/docs_snippets/lib/signals.dart
  • packages/stem/example/docs_snippets/lib/signing.dart
  • packages/stem/example/docs_snippets/lib/tasks.dart
  • packages/stem/example/docs_snippets/lib/troubleshooting.dart
  • packages/stem/example/docs_snippets/lib/uniqueness.dart
  • packages/stem/example/docs_snippets/lib/workers_programmatic.dart
  • packages/stem/example/docs_snippets/lib/workflows.dart
  • packages/stem/example/durable_watchers.dart
  • packages/stem/example/ecommerce/README.md
  • packages/stem/example/ecommerce/lib/src/app.dart
  • packages/stem/example/ecommerce/lib/src/workflows/annotated_defs.stem.g.dart
  • packages/stem/example/ecommerce/lib/src/workflows/checkout_flow.dart
  • packages/stem/example/email_service/bin/enqueuer.dart
  • packages/stem/example/encrypted_payload/docker/main.dart
  • packages/stem/example/encrypted_payload/enqueuer/bin/enqueue.dart
  • packages/stem/example/image_processor/bin/api.dart
  • packages/stem/example/microservice/enqueuer/bin/main.dart
  • packages/stem/example/mixed_cluster/enqueuer/bin/enqueue.dart
  • packages/stem/example/ops_health_suite/bin/producer.dart
  • packages/stem/example/otel_metrics/bin/worker.dart
  • packages/stem/example/persistent_sleep.dart
  • packages/stem/example/postgres_tls/bin/enqueue.dart
  • packages/stem/example/postgres_worker/enqueuer/bin/enqueue.dart
  • packages/stem/example/progress_heartbeat/bin/producer.dart
  • packages/stem/example/rate_limit_delay/bin/producer.dart
  • packages/stem/example/rate_limit_delay/lib/shared.dart
  • packages/stem/example/redis_postgres_worker/enqueuer/bin/enqueue.dart
  • packages/stem/example/retry_task/bin/producer.dart
  • packages/stem/example/routing_parity/bin/publisher.dart
  • packages/stem/example/signals_demo/bin/producer.dart
  • packages/stem/example/signals_demo/lib/shared.dart
  • packages/stem/example/signing_key_rotation/bin/producer.dart
  • packages/stem/example/stack_autowire.dart
  • packages/stem/example/stem_example.dart
  • packages/stem/example/task_context_mixed/README.md
  • packages/stem/example/task_context_mixed/bin/enqueue.dart
  • packages/stem/example/task_context_mixed/lib/shared.dart
  • packages/stem/example/task_usage_patterns.dart
  • packages/stem/example/unique_tasks/unique_task_example.dart
  • packages/stem/example/worker_control_lab/bin/producer.dart
  • packages/stem/example/workflows/basic_in_memory.dart
  • packages/stem/example/workflows/cancellation_policy.dart
  • packages/stem/example/workflows/custom_factories.dart
  • packages/stem/example/workflows/runtime_metadata_views.dart
  • packages/stem/example/workflows/sleep_and_event.dart
  • packages/stem/example/workflows/sqlite_store.dart
  • packages/stem/example/workflows/versioned_rewind.dart
  • packages/stem/lib/src/bootstrap/factories.dart
  • packages/stem/lib/src/bootstrap/stem_app.dart
  • packages/stem/lib/src/bootstrap/stem_client.dart
  • packages/stem/lib/src/bootstrap/stem_module.dart
  • packages/stem/lib/src/bootstrap/workflow_app.dart
  • packages/stem/lib/src/canvas/canvas.dart
  • packages/stem/lib/src/control/control_messages.dart
  • packages/stem/lib/src/core/clock.dart
  • packages/stem/lib/src/core/contracts.dart
  • packages/stem/lib/src/core/envelope.dart
  • packages/stem/lib/src/core/function_task_handler.dart
  • packages/stem/lib/src/core/payload_codec.dart
  • packages/stem/lib/src/core/payload_map.dart
  • packages/stem/lib/src/core/queue_events.dart
  • packages/stem/lib/src/core/stem.dart
  • packages/stem/lib/src/core/task_invocation.dart
  • packages/stem/lib/src/core/task_result.dart
  • packages/stem/lib/src/observability/heartbeat.dart
  • packages/stem/lib/src/observability/logging.dart
  • packages/stem/lib/src/signals/payloads.dart
  • packages/stem/lib/src/worker/isolate_messages.dart
  • packages/stem/lib/src/worker/worker.dart
  • packages/stem/lib/src/workflow/core/flow.dart
  • packages/stem/lib/src/workflow/core/flow_context.dart
  • packages/stem/lib/src/workflow/core/flow_step.dart
  • packages/stem/lib/src/workflow/core/run_state.dart
  • packages/stem/lib/src/workflow/core/workflow_checkpoint.dart
  • packages/stem/lib/src/workflow/core/workflow_definition.dart
  • packages/stem/lib/src/workflow/core/workflow_event_ref.dart
  • packages/stem/lib/src/workflow/core/workflow_execution_context.dart
  • packages/stem/lib/src/workflow/core/workflow_ref.dart
  • packages/stem/lib/src/workflow/core/workflow_result.dart
  • packages/stem/lib/src/workflow/core/workflow_resume.dart
  • packages/stem/lib/src/workflow/core/workflow_resume_context.dart
  • packages/stem/lib/src/workflow/core/workflow_runtime_metadata.dart
  • packages/stem/lib/src/workflow/core/workflow_script.dart
  • packages/stem/lib/src/workflow/core/workflow_script_context.dart
  • packages/stem/lib/src/workflow/core/workflow_step_entry.dart
  • packages/stem/lib/src/workflow/core/workflow_store.dart
  • packages/stem/lib/src/workflow/core/workflow_watcher.dart
  • packages/stem/lib/src/workflow/runtime/workflow_introspection.dart
  • packages/stem/lib/src/workflow/runtime/workflow_manifest.dart
  • packages/stem/lib/src/workflow/runtime/workflow_runtime.dart
  • packages/stem/lib/src/workflow/runtime/workflow_views.dart
  • packages/stem/lib/src/workflow/workflow.dart
  • packages/stem/lib/stem.dart
  • packages/stem/pubspec.yaml
  • packages/stem/test/bootstrap/module_bootstrap_test.dart
  • packages/stem/test/bootstrap/stem_app_test.dart
  • packages/stem/test/bootstrap/stem_client_test.dart
  • packages/stem/test/bootstrap/stem_stack_test.dart
  • packages/stem/test/bootstrap/workflow_module_bootstrap_test.dart
  • packages/stem/test/unit/canvas/canvas_test.dart
  • packages/stem/test/unit/control/control_messages_test.dart
  • packages/stem/test/unit/core/contracts_test.dart
  • packages/stem/test/unit/core/fake_stem_test.dart
  • packages/stem/test/unit/core/function_task_handler_test.dart
  • packages/stem/test/unit/core/payload_codec_test.dart
  • packages/stem/test/unit/core/payload_map_test.dart
  • packages/stem/test/unit/core/queue_events_test.dart
  • packages/stem/test/unit/core/stem_core_test.dart
  • packages/stem/test/unit/core/stem_event_test.dart
  • packages/stem/test/unit/core/task_context_enqueue_test.dart
  • packages/stem/test/unit/core/task_enqueue_builder_test.dart
  • packages/stem/test/unit/core/task_invocation_test.dart
  • packages/stem/test/unit/core/task_registry_test.dart
  • packages/stem/test/unit/core/task_result_test.dart
  • packages/stem/test/unit/observability/heartbeat_test.dart
  • packages/stem/test/unit/observability/logging_test.dart
  • packages/stem/test/unit/signals/payloads_test.dart
  • packages/stem/test/unit/worker/task_context_enqueue_integration_test.dart
  • packages/stem/test/unit/workflow/flow_context_test.dart
  • packages/stem/test/unit/workflow/flow_step_test.dart
  • packages/stem/test/unit/workflow/in_memory_event_bus_test.dart
  • packages/stem/test/unit/workflow/workflow_manifest_test.dart
  • packages/stem/test/unit/workflow/workflow_metadata_views_test.dart
  • packages/stem/test/unit/workflow/workflow_result_test.dart
  • packages/stem/test/unit/workflow/workflow_resume_test.dart
  • packages/stem/test/workflow/workflow_runtime_call_extensions_test.dart
  • packages/stem/test/workflow/workflow_runtime_ref_test.dart
  • packages/stem/test/workflow/workflow_runtime_test.dart
  • packages/stem/tool/proxy_runtime_check.dart
  • packages/stem_adapter_tests/pubspec.yaml
  • packages/stem_builder/CHANGELOG.md
  • packages/stem_builder/README.md
  • packages/stem_builder/example/README.md
  • packages/stem_builder/example/bin/main.dart
  • packages/stem_builder/example/bin/runtime_metadata_views.dart
  • packages/stem_builder/example/lib/definitions.dart
  • packages/stem_builder/example/lib/definitions.stem.g.dart
  • packages/stem_builder/lib/src/stem_registry_builder.dart
  • packages/stem_builder/pubspec.yaml
  • packages/stem_builder/test/stem_registry_builder_test.dart
  • packages/stem_cli/lib/src/cli/workflow.dart
  • packages/stem_cli/lib/src/cli/workflow_agent_help.dart
  • packages/stem_cli/pubspec.yaml
  • packages/stem_cli/test/unit/cli/cli_workflow_test.dart
  • packages/stem_memory/pubspec.yaml
  • packages/stem_postgres/pubspec.yaml
  • packages/stem_redis/pubspec.yaml
  • packages/stem_sqlite/pubspec.yaml

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/0.2.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can customize the tone of the review comments and chat replies.

Configure the tone_instructions setting to customize the tone of the review comments and chat replies. For example, you can set the tone to Act like a strict teacher, Act like a pirate and more.

@github-actions
Copy link

Package publishing

Package Version Status Publish tag (post-merge)
package:stem 0.2.0 ready to publish stem-v0.2.0
package:stem_adapter_tests 0.1.1 ready to publish stem_adapter_tests-v0.1.1
package:stem_builder 0.2.0 ready to publish stem_builder-v0.2.0
package:stem_cli 0.1.0 already published at pub.dev
package:stem_memory 0.1.0 ready to publish stem_memory-v0.1.0
package:stem_postgres 0.1.1 ready to publish stem_postgres-v0.1.1
package:stem_redis 0.1.1 ready to publish stem_redis-v0.1.1
package:stem_sqlite 0.1.1 ready to publish stem_sqlite-v0.1.1

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Future<void> shutdown() async {
await runtime.dispose();
await app.shutdown();
await _disposeBus();

P1 Badge Preserve ownership when shutting down a borrowed StemApp

StemWorkflowApp.create(..., stemApp: existingApp) and StemApp.createWorkflowApp() are documented as ways to layer workflows onto an existing task app, but shutdown() always calls app.shutdown(). In that shared-app scenario, closing the workflow wrapper will also stop the host worker and dispose any broker/backend resources owned by the original StemApp, which can take down unrelated task processing. This wrapper needs to distinguish between an app it created and one it merely borrowed.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +975 to 983
final resolvedWorkerConfig = _resolveWorkflowWorkerConfig(
workerConfig,
module: StemModule.combine(module: module, modules: modules),
tasks: tasks,
continuationQueue: continuationQueue,
executionQueue: executionQueue,
);
final appInstance = await StemApp.fromClient(
client,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Fall back to client.module in StemWorkflowApp.fromClient

When callers use the static StemWorkflowApp.fromClient(client: client) helper without re-passing a module, _resolveWorkflowWorkerConfig sees module == null and infers a subscription from only the workflow queues. That subscription is then forwarded into StemApp.fromClient, so any task handlers bundled in client.module on non-default queues are never subscribed, and workflows that enqueue those tasks will stall indefinitely. The instance helper StemClient.createWorkflowApp() already passes this.module, so this inconsistency looks accidental.

Useful? React with 👍 / 👎.

@@ -73,6 +86,86 @@ class StemWorkflowApp {
await app.start();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reset startup state when StemWorkflowApp.start() fails

start() flips _started to true before awaiting runtime.start() and app.start(), but it never clears that flag on error. If either startup step throws once (for example, a transient broker/store failure), every later start() or lazy startWorkflow() call will believe the app is already running and skip initialization, leaving the instance permanently unusable until it is rebuilt.

Useful? React with 👍 / 👎.

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