Skip to content

Revert "Report CPU limits hit in a microtask at startup and dynamic import (#8216)" - #8488

Merged
dcarney-cf merged 1 commit into
mainfrom
dcarney/revert-microtask-cpu-limits
Nov 16, 2026
Merged

dcarney-cf merged 1 commit into
mainfrom
dcarney/revert-microtask-cpu-limits

Conversation

@dcarney-cf

Copy link
Copy Markdown
Contributor

This reverts commit dcc41ac.

Paired with the edgeworker branch of the same name, which drops the patch that currently carries this revert.

🤖 Generated with Claude Code

…mport (#8216)"

This reverts commit dcc41ac.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@dcarney-cf
dcarney-cf requested review from a team as code owners November 16, 2026 09:13

@clanky-the-clanker clanky-the-clanker 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.

💬 Approved with comments — Clean, intentional revert of #8216. The only note is informational: in the restored main-module startup code, the limit check runs before the limit is recorded, so it never fires, and CPU limits hit in microtasks at startup and during dynamic import go unreported again, as they did before #8216.

Findings: 1 info (1 is an inline comment on the diff)

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


📋 Code Quality: 💬 1 info

Exact revert; restored main-module limit check is effectively inert

Recommendation: 💬 Optional Nits

  • [INFO] Restored KJ_DEFER is declared after limitScope, so it runs before the limit error is recorded and won't catch microtask limit hits at startup (src/workerd/io/worker.c++:2303)
View full review

This reverts #8216 exactly and brings back the earlier behaviour. CPU-limit errors raised while microtasks drain are again not reported:

  • on non-module startup (no check after the limit scope closes);
  • during dynamic import (no check after handler());
  • at main-module startup, where the restored KJ_DEFER is declared after limitScope.

That last point is noted inline. If the revert is intended, none of this is a defect, but a short rationale in the description would help.


✅ All other checks passed

📝 Documentation: ✅ LGTM

No documentation concerns.


Reviewed commit: ac43e081

Comment thread src/workerd/io/worker.c++ Resolved
@dcarney-cf
dcarney-cf merged commit 805cb9c into main Nov 16, 2026
23 of 29 checks passed
@dcarney-cf
dcarney-cf deleted the dcarney/revert-microtask-cpu-limits branch November 16, 2026 11:44
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