Repository navigation
Description
Summary
The provider-literal ratchet (scripts/check-provider-literal-ratchet.mjs) counts files that are not part of the repository. When a bb-app test run is cancelled, it leaves packages/bb-app/.managed-json-cli-*/bb-app.mjs in the tree. The ratchet then fails with "core gained provider-id references" on every later run, until someone deletes the folder by hand.
Versions and environment
- bb from source,
mainat 4d7a9af. - Linux, Node 26.13.1, pnpm 9.15.0.
Steps to reproduce
The same state that a cancelled test run leaves:
mkdir -p packages/bb-app/.managed-json-cli-PROBE
printf 'export const p = "codex";\n' > packages/bb-app/.managed-json-cli-PROBE/bb-app.mjs
node scripts/check-provider-literal-ratchet.mjs --base origin/mainHow it happened here: pnpm exec turbo run typecheck lint test --filter=bb-app --filter=@bb/scripts stopped after a failure in another task and cancelled bb-app#test before its afterAll ran.
Expected vs actual
Expected: exit 0. The folder is not tracked and is not core code.
Actual:
Provider-literal ratchet FAILED vs origin/main — core gained provider-id references:
↑ packages/bb-app/.managed-json-cli-PROBE/bb-app.mjs: 0 → 1
The test suite fails the same way: provider-literal-ratchet.test.mjs "passes against the committed baseline" reports + packages/bb-app/.managed-json-cli-fGILQS/bb-app.mjs: 3.
Evidence
scanTreewalks the file system, so it sees untracked files: check-provider-literal-ratchet.mjs#L133-L196.managed-json-process.test.tscreates its temp root inside the package: managed-json-process.test.ts#L32..gitignoredoes not ignore it.- Two earlier artifacts of this kind got their own exclusions:
.packaged-plugin-build-and.runtime-test-(L77-L78), and.wrangler(L62).
What you ruled out
- CI does not show it: CI runs
bb-app(packages-build shard) and@bb/scripts(packages-other shard) on separate machines from a clean checkout. A local all-packageturbo run testcan also hit it while thebb-apptest's temp root exists. - On a clean tree, counting only git-tracked files gives the same result as the walk (13 references in 6 files).
Suggested priority and effort
Low priority, small effort. It affects local runs after an interrupted bb-app test. The workaround is to delete the folder.
AGENT GENERATED
Activity
bb-slop-cop commentedon Dec 2, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotClassification: Bug · Priority: Low · Effort: Low ·
workspacesReproduction report — REPRODUCED, high confidence, in two clean checkouts of
origin/main. The scanner walks the working tree without checking which files Git tracks, so an untracked test bundle is counted as new core code. The check passed again after the bundle was removed. Label:confirmed-repro.No duplicate PR opened: #8528 already links to this issue.
Count only git-tracked files in the provider-literal ratchet (get-bb#…