The mock for next/server's after() detaches the callback regardless of
what production code does, which left the outer catch's fire-and-forget
fallback untested and the runQuoteMatch inner catch tested for nothing.
- New test 'falls back to an inline match when after() is unavailable'
forces after() to throw and asserts suggestQuoteForOrder was called
anyway, plus that the fallback log fired. Mutation: deleting the
'void runQuoteMatch()' line breaks it.
- 'never fails order creation when the matcher throws' now spies on
console.error and asserts the inner catch's swallow actually logged.
Mutation: deleting the inner console.error breaks it.
- The outer catch now logs [createOrder] after() unavailable... so a
silent switch to fire-and-forget (after upgrade, waitUntil missing on
deploy target) is impossible to miss in production logs.
- Comment names error code E468, Next 16.2.6, and
node_modules/next/dist/server/after/after.js, and corrects the
justification: createOrder is an exported service function reachable
from multiple layers, not 'a smoke script or another background job'.
Verified against the documented baseline — same single pre-existing
failure (splitOrderForContinuation > moves pending items...), no new
failures introduced.
Co-Authored-By: Claude <noreply@anthropic.com>