Skip to content

Provider-literal ratchet counts untracked files that a test run leaves behind #8527

Description

@lanjak

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, main at 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/main

How 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

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-package turbo run test can also hit it while the bb-app test'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

  1. added theissue type on Dec 2, 2026
  2. added
    workspaces
    confirmed-repro
    on Dec 2, 2026
  3. bb-slop-cop commented on Dec 2, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Bug · Priority: Low · Effort: Low · workspaces

    Reproduction 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.

  4. added a commit that references this issue on Dec 2, 2026
    1db0e6e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproworkspaces

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions