What happens
cli/src/utils/__tests__/sponsored-agent.test.ts reads
freebuff-desktop/src/server/services/sponsored-run.ts
via readFileSync in the the mirrored in-place guidance block. The file's own
header comment explains that DESKTOP_IN_PLACE_SPONSORED_GUIDANCE lives in the
Desktop orchestrator and is copied into the CLI rather than imported, and that
the copy is "read back out of the production file as TEXT, so a copy that stops
matching fails here rather than in a run the two surfaces told different things".
freebuff-desktop/ is not part of the public export (CONTRIBUTING.md in-scope
paths: cli/, sdk/, common/, agents/, packages/*, freebuff/ excluding
the private web app, scripts/tmux/, public docs). The path does not exist here.
Repro
$ bun test cli/src/utils/__tests__/sponsored-agent.test.ts
Result on main (0cd284b):
error: ENOENT: no such file or directory, open
'...\freebuff-desktop\src\server\services\sponsored-run.ts'
0 pass
1 fail
Why it was not caught
.github/workflows/ci.yml builds the SDK, builds the binary and smoke-tests it.
It never runs bun test, so this file is red on main and CI is green.
Why it matters
The whole point of the block is drift detection between the CLI copy and
Desktop's source. In the public mirror the check cannot run, so it provides zero
protection while still being the first thing to fail when someone runs the CLI
suite. Skipping only the case that reads an omitted file keeps the rest of the
suite's signal trustworthy.
Environment
- Bun 1.3.14 (
.bun-version)
main at 0cd284b
- Fails identically on Linux and macOS: the path is absent from the export on
every platform, so this is not a platform artifact.
What happens
cli/src/utils/__tests__/sponsored-agent.test.tsreadsfreebuff-desktop/src/server/services/sponsored-run.tsvia
readFileSyncin thethe mirrored in-place guidanceblock. The file's ownheader comment explains that
DESKTOP_IN_PLACE_SPONSORED_GUIDANCElives in theDesktop orchestrator and is copied into the CLI rather than imported, and that
the copy is "read back out of the production file as TEXT, so a copy that stops
matching fails here rather than in a run the two surfaces told different things".
freebuff-desktop/is not part of the public export (CONTRIBUTING.mdin-scopepaths:
cli/,sdk/,common/,agents/,packages/*,freebuff/excludingthe private web app,
scripts/tmux/, public docs). The path does not exist here.Repro
$ bun test cli/src/utils/__tests__/sponsored-agent.test.tsResult on
main(0cd284b):Why it was not caught
.github/workflows/ci.ymlbuilds the SDK, builds the binary and smoke-tests it.It never runs
bun test, so this file is red onmainand CI is green.Why it matters
The whole point of the block is drift detection between the CLI copy and
Desktop's source. In the public mirror the check cannot run, so it provides zero
protection while still being the first thing to fail when someone runs the CLI
suite. Skipping only the case that reads an omitted file keeps the rest of the
suite's signal trustworthy.
Environment
.bun-version)mainat 0cd284bevery platform, so this is not a platform artifact.