sponsored-consent.test.ts fails with ENOENT: it reads freebuff-desktop/ files this export omits
What happens
common/src/ads/sponsored-consent.test.ts reads two files that live in the Desktop
Electron app:
freebuff-desktop/electron/mcp-consent-bridge.cjsfreebuff-desktop/electron/consent-window.html
Those files are not part of the public export. CONTRIBUTING.md lists
freebuff/, cli/, sdk/, common/, agents/, packages/*, scripts/tmux/
and public docs as the in-scope paths, and freebuff-desktop/ is not among them.
The directory does not exist in this repository at all.
Every test in the every surface asks the same question block therefore dies with
ENOENT before it can assert anything.
Repro
$ bun test common/src/ads/sponsored-consent.test.tsResult on main (0cd284b9):
error: ENOENT: no such file or directory, open
'...\freebuff-desktop\electron\mcp-consent-bridge.cjs'
error: ENOENT: no such file or directory, open
'...\freebuff-desktop\electron\consent-window.html'
... (8 occurrences)
5 pass
8 failWhy it was not caught
.github/workflows/ci.yml installs dependencies, builds the SDK, builds the
Freebuff binary and smoke-tests the binary. It never runs bun test, so a
red test file in the public mirror produces a green check on every PR.
Why this matters even though the assertion cannot run here
The block exists to stop Desktop and the CLI asking the user two different questions — the comment above it says so explicitly. In the public mirror the guard is not merely failing, it is inert: it can never detect drift, and it fails loudly enough to mask a real red signal in the rest of the file, so anyone running the suite learns to ignore this file entirely.
The fix should skip the cases whose source file this export omits, while keeping
every case that only touches exported code — for example the Windows sentence says the three things, in plain words, which needs no external file.
Environment
- Bun 1.3.14 (
.bun-version) mainat 0cd284b9- Fails identically on Linux and macOS: the path is absent from the export on every platform, so this is not a platform artifact.
Source: CodebuffAI/codebuff