Relationships
#4565 serve: on macOS a webhook routes directory that does not exist yet under extensions/ escapes the 'holds extension code' refusal
Opened by stack72 · 11/9/2026· Shipped 11/9/2026
Summary
checkWebhookRoutesDir (src/serve/webhook_route_files.ts) refuses a webhook routes directory that is, or sits inside, a directory holding extension code. It canonicalises both paths with realOrResolved, which returns Deno.realPath for a path that exists and path.resolve for one that does not. When the routes directory does not exist yet, the two sides are spelled differently wherever the parent path contains a symlink: on macOS the temp dir and /tmp resolve through /private, so the extensions dir becomes /private/var/... while the routes dir stays /var/.... isInside then says the routes dir is outside, and the refusal does not fire.
Reproduction
deno run test src/serve/webhook_route_files_test.ts on macOS (also on origin/main at 2c24fe25b):
- checkWebhookRoutesDir: refuses a directory that is or sits inside an extension directory - FAILED (expected rejection for extensions/webhooks/routes, which does not exist)
- checkRouteFiles: a routes directory inside extension code is reported, not thrown - FAILED
This blocks verify-build on macOS hosts.
Expected
A routes directory that does not exist yet is compared in the same canonical spelling as the extension directory: realpath the nearest existing ancestor and re-append the remaining segments.
Found while verifying swamp-club#4507; fixed in the same PR.
Shipped
Click a lifecycle step above to view its details.
Sign in to post a ripple.