Skip to content

fix(modes-processor): await assignToApiPath's now-async syncWrapper, thread await through every caller - #376

Merged
Shinrai merged 1 commit into
nextfrom
fix/369-await-syncwrapper
Sep 13, 2026
Merged

Shinrai merged 1 commit into
nextfrom
fix/369-await-syncwrapper

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

  • fix(modes-processor): await assignToApiPath's now-async syncWrapper, thread await through every caller (4597211)

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

…thread await through every caller

assignToApiPath's Case 1 (both existing+value are wrapper proxies,
mutateExisting supplied) called the now-async syncWrapper() without
awaiting it, then returned synchronously — syncWrapper became async when
it started force-materializing both sides of a collision (#364), but
assignToApiPath was never updated to match. A caller regained control
(and reported success) before syncWrapper's real work had actually
finished, and any error thrown inside syncWrapper became an unhandled
promise rejection instead of propagating to the caller.

Made assignToApiPath itself async and await syncWrapper in Case 1;
awaited its own call inside mergeApiObjects (previously unawaited); made
#assignWithRoutineRevert (modes-processor.mjs) async and await its
assign() callback, since a Promise is truthy regardless of what it
resolves to — an un-awaited call there would never revert a rejected
(skip/warn) candidate; and awaited all 12 of #assignWithRoutineRevert's
own call sites plus the one inline pre-existing truthy-Promise check
inside the multi-export assign callback.

Fixes #369
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure labels Sep 13, 2026
@Shinrai

Shinrai commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Resolves #369 — closed when this ships to the default branch.

@Shinrai
Shinrai merged commit db4dd47 into next Sep 13, 2026
26 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/369-await-syncwrapper branch September 13, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant