Skip to content

fix: drop wrapper frames from schedule stacks when schedule is overridden - #25

Merged
sderrow merged 3 commits into
mainfrom
sean/more-error
Oct 5, 2026
Merged

sderrow merged 3 commits into
mainfrom
sean/more-error

Conversation

@sderrow

@sderrow sderrow commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Schedule-location stacks now start at the caller even when a limiter overrides schedule() with a subclass method (including async) or an arrow function on the instance. Previously, the override's wrapper frames appeared at the top of every section.

If the override isn't on the stack, for example when the base method is called directly, a fallback capture keeps the section intact. Overrides made with .bind() keep their wrapper frames, because V8 can't cut a stack at a bound function.

The schedule-stack code also moves out of async-context.ts into its own schedule-stack.ts module, with its tests in a matching file. That move doesn't change behaviour.

sderrow commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner Author

@sderrow sderrow changed the title fix: schedule stack trace fix: drop wrapper frames from schedule stacks when schedule is overridden Oct 4, 2026
@sderrow
sderrow marked this pull request as ready for review October 5, 2026 02:22

sderrow commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner Author

Merge activity

  • Oct 5, 3:02 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 5, 3:03 AM UTC: @sderrow merged this pull request with Graphite.

@sderrow
sderrow merged commit cc0f27e into main Oct 5, 2026
22 checks passed
@sderrow
sderrow deleted the sean/more-error branch October 5, 2026 03:03
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