Skip to content

feat(core): expose runtime root start notifications - #102

Merged
medz merged 1 commit into
mainfrom
feat/runtime-start-hook
Oct 28, 2026
Merged

medz merged 1 commit into
mainfrom
feat/runtime-start-hook

Conversation

@medz

@medz medz commented Oct 28, 2026

Copy link
Copy Markdown
Member

Summary

Applications can now track unfinished user-submitted roots from one Runtime.onFiberStart callback, including tasks submitted through run whose callers never receive a Fiber. Pair the hook with passive Fiber.onExit and a Dart collection:

final pending = <Fiber<Object?, Object?>>{};
final runtime = Runtime(onFiberStart: (fiber) {
  pending.add(fiber);
  fiber.onExit((_) => pending.remove(fiber));
});

Notification runs after initial evaluation, before the entry point returns. Completed or rejected work, children and internal service construction are excluded. Runtime.create retains the same hook for subsequent user roots. The callback runs in its configuration Zone; its exceptions do not change execution, cleanup or failure responsibility.

Related issues

Closes #55

Validation

  • dart pub get
  • dart format --output=none --set-exit-if-changed .
  • dart analyze --fatal-infos
  • dart test — 1,384 tests passed.

Thirteen focused tests cover all execution entry points, cleanup lifetime, rejected and completed executions, service construction, child exclusion, callback Zones, failure routing, cancellation and reentrant submissions. Concurrency ordering uses explicit completion gates.

@medz medz added the enhancement New feature or request label Oct 28, 2026 — with ChatGPT Codex Connector
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T19:21:36.192093Z 2b61389 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 33 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 27975cb8-1adf-45bd-89e2-d2832f4640e3
Commits

Reviewing files that changed from the base of the PR and between 62c66c7 and 2b61389.

Files selected for processing: 2
  • lib/src/core/runtime.dart
  • test/core/runtime_tracking_test.dart
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

medz commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 2b61389bc9

ℹ️ 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".

@medz
medz merged commit 2098e03 into main Oct 28, 2026
3 checks passed
@medz
medz deleted the feat/runtime-start-hook branch October 28, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose a runtime start hook for composing root-task tracking

1 participant