Skip to content

feat(turbo-tasks): expose completed task count - #187

Merged
fireairforce merged 1 commit into
utoofrom
codex/utoopack-task-progress
Sep 1, 2026
Merged

fireairforce merged 1 commit into
utoofrom
codex/utoopack-task-progress

Conversation

@yuzheng14

Copy link
Copy Markdown

Summary

  • Track the number of scheduled TurboTasks that have completed and expose it through TurboTasks::get_completed_scheduled_task_count.
  • Provide the Turbopack-side primitive used by utoopack to report live progress during both dev and build.
  • Support [Utoopack] Add a progress for dev / build process utoo#2327: [Utoopack] Add a progress for dev / build process.

Verification

  • cargo fmt --all
  • cargo clippy -p turbo-tasks --all-targets -- -D warnings --no-deps
  • Utoo integration: @utoo/pack unit tests and build/dev smoke checks passed with generated bindings.
  • Not run: pnpm build-all (next.js/node_modules is not installed in this checkout)

@yuzheng14
yuzheng14 marked this pull request as ready for review August 31, 2026 08:11
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 31, 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-08-31T08:16:42.983216Z 6b2dca9 Draft marked ready
🔒 Security Review ✅ Completed 2026-08-31T08:15:22.549027Z 6b2dca9 Draft marked ready
ℹ️ 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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b2dca9f21

ℹ️ 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 +1573 to +1574
this.completed_scheduled_tasks
.fetch_add(1, Ordering::Relaxed);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the downstream-only completion counter opt-in

When TurboTasks runs without Utoopack progress reporting—including every caller in this repository—each scheduled task now performs an additional atomic read-modify-write on one shared counter. Task-heavy builds execute these completions concurrently across workers, so this adds hot-path contention and overhead for a metric that is never read; gate the instrumentation behind a consumer-enabled feature/runtime option or use lower-contention aggregation.

AGENTS.md reference: turbopack/AGENTS.md:L1-L3

Useful? React with 👍 / 👎.

@yuzheng14
yuzheng14 requested a review from fireairforce August 31, 2026 08:18
@fireairforce
fireairforce merged commit 4bf8f4d into utoo Sep 1, 2026
17 of 30 checks passed
@yuzheng14
yuzheng14 deleted the codex/utoopack-task-progress branch September 1, 2026 03:06
fireairforce added a commit that referenced this pull request Sep 14, 2026
Rebased onto vercel/next.js canary 3c9d1ca. Includes the previous
utoo follow-ups:

- feat(turbo-tasks): expose completed task count (#187)
- fix(turbopack): preserve CSS chunk order in identity (#188)
- feat(turbopack): support React 17 compiler target (#189)
- fix(turbopack): honor default chunk content hashing (#190)
- fix(turbopack): fall back after filtering declaration path aliases (#191)
- fix(turbopack): handle undefined defaults in dynamic URLs (#192)

Adaptations for this sync:

- swc v77: build Function.body as FunctionBody in async_module.rs
- turbo-tasks GC roots: extend the wasm in-memory backing storage stub
- lazy dynamic imports: port the follow-reexports evaluation/side-effect
  semantics into module_canonicalization.rs
- strict factory chunks: keep browser_global_ident and compress options
  in the rewritten chunk emitters

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

2 participants