• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / mcp / 40561563459
98%

Build:
DEFAULT BRANCH: main
Ran 27 Oct 2026 06:39PM UTC
Jobs 1
Files 45
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

27 Oct 2026 06:36PM UTC coverage: 97.615%. Remained the same
40561563459

push

github

web-flow
fix(mcp-server-supabase): use POSIX path resolution for edge function filenames (#393)

## What kind of change does this PR introduce?

Bug fix

## What is the current behavior?

`normalizeFilename` in
`packages/mcp-server-supabase/src/edge-function.ts` imports `resolve`
from `node:path`, which is platform-dispatched. The function only ever
sees POSIX-shaped strings: `getPathPrefix` returns the hardcoded
`/tmp/user_fn_<id>/`, and Deno's local dev server always emits
forward-slash paths.

On Windows the platform-default `node:path` rewrites the leading slash
to a drive letter and the slashes to backslashes, so:

- the absolute-path merge `resolve('/tmp/user_fn_…/',
'/tmp/user_fn_…/source/index.ts')` produces
`C:\tmp\user_fn_…\source\index.ts` (dropping `/tmp/…` entirely because
the second arg is absolute and platform-default),
- the downstream `value.startsWith(pathPrefix)` strip never matches, and
- the second `withoutPrefix(…, 'source/')` strip actually fires on a
Windows path and returns the truncated value.

A developer running the MCP server locally on Windows therefore sees
`get_edge_function` and `list_edge_functions` return `entrypoint_path`
and `files[].name` as `C:\tmp\user_fn_<id>\index.ts` rather than
`index.ts`. The bug is invisible to the hosted server (Linux) and to CI
(Linux-only).

The five failing unit tests in the issue's reproduction all show the
same root cause:
- `edge-function.test.ts > normalizeFilename > handles deno 1 paths`
- `edge-function.test.ts > normalizeFilename > handles deno 2 paths`
- `edge-function.test.ts > normalizeFilename > doesn't interfere with
nested directories`
- `server.test.ts > tools > list edge functions`
- `server.test.ts > tools > get edge function`

## What is the new behavior?

Switch the single import to `node:path/posix`:

```ts
-import { resolve } from 'node:path';
+import { resolve } from 'node:path/posix';
```

`getPathPrefix` still returns `/tmp/user_fn_<id>/` and the
`withoutPrefix` strip sti... (continued)

1063 of 1120 branches covered (94.91%)

Branch coverage included in aggregate %.

5648 of 5755 relevant lines covered (98.14%)

168.86 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40561563459.1 27 Oct 2026 06:39PM UTC 45
97.61
GitHub Action Run
Source Files on build 40561563459
  • Tree
  • List 45
  • Changed 3
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40561563459
  • 55d2d24d on github
  • Prev Build on main (#40527718555)
  • Next Build on main (#40676491998)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc