← Reports

#5693 · ACP maintenance discards calendar-version identifiers

Bug Low priority Low effort providers provider-acp · GitHub issue · 2026-10-17

Trusted base: 6a639cfc0d66e0c789a1bd7309266973228d1a80 from origin/main.

Verdict: REPRODUCED · Root-cause confidence: high · Reproduction label: confirmed-repro

1. TL;DR

BB can find an installed ACP executable but lose its version before the result reaches Settings or the CLI. A real temporary executable reporting a calendar-style identifier produces installed: true and currentVersion: null in both ACP bridge implementations. The shared version reader accepts only strict SemVer, which rejects zero-padded month or day components. This report reproduces that backend defect twice from clean trusted checkouts; it does not claim a live Cursor installation or a browser reproduction. Latest-release lookup remains a separate, intentionally unavailable field.

2. Claims vs findings

Reported behaviorFindingEvidence
An executable can be installed while its detected version is null.VerifiedThe real ACP installation-status function finds an executable and returns null for three calendar-version fixtures in both bridge packages.
Strict SemVer validation discards zero-padded calendar identifiers.VerifiedSource inspection and six failing regression cases per clean run; ordinary SemVer and malformed-output controls behave as expected.
Settings and CLI display unknown when that field is null.Source verified; UI not exercisedSettings passes status.currentVersion to its version renderer; CLI substitutes unknown.
The reporter's two machines and actual Cursor installation show this behavior.Not independently testedNo access to the reporter's runtime or account was used. A synthetic version-only executable isolates the same boundary.
The latest version is also null.Verified, separate limitationACP status unconditionally sets latestVersion: null; this does not explain the missing installed version.

3. Environment

4. Minimal reproduction

The following independently authored Linux reproduction calls the real status function, executes a version-only fixture, and asserts the installed version. It does not implement the parser or mock the status function. Save this complete script as /tmp/acp-version-repro.mjs:

import assert from "node:assert/strict";
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import path from "node:path";
import { pathToFileURL } from "node:url";

const directory = await mkdtemp(path.join(tmpdir(), "bb-version-repro-"));
const expected = "2026.03.07-acde123";
try {
  const command = path.join(directory, "version-cli");
  await writeFile(command, `#!/bin/sh\nprintf '%s\\n' '${expected}'\n`, {
    mode: 0o755,
  });
  const versions = [];
  for (const bridge of ["provider-bridge-acp", "provider-bridge-acp-next"]) {
    const modulePath = path.resolve(
      "packages", bridge, "src/bridge/provider-maintenance.ts",
    );
    const { getAcpProviderInstallationStatus } = await import(
      pathToFileURL(modulePath).href
    );
    const status = await getAcpProviderInstallationStatus({
      command,
      maintenance: undefined,
    });
    console.log(JSON.stringify({
      bridge,
      installed: status.installed,
      currentVersion: status.currentVersion,
      latestVersion: status.latestVersion,
    }));
    versions.push(status.currentVersion);
  }
  assert.deepEqual(versions, [expected, expected]);
} finally {
  await rm(directory, { recursive: true, force: true });
}
  1. Clone trusted main, pin the base, and install existing dependencies:
    git clone https://github.com/get-bb/bb.git bb-repro
    cd bb-repro
    git checkout --detach 6a639cfc0d66e0c789a1bd7309266973228d1a80
    pnpm install --frozen-lockfile --prefer-offline
    pnpm exec turbo run build
  2. Run the script from that checkout root:
    node --conditions=source --import tsx /tmp/acp-version-repro.mjs
  3. Expected: the assertion passes and both records preserve 2026.03.07-acde123. Actual stdout at the trusted base:
    {"bridge":"provider-bridge-acp","installed":true,"currentVersion":null,"latestVersion":null}
    {"bridge":"provider-bridge-acp-next","installed":true,"currentVersion":null,"latestVersion":null}
    The process exits 1 with AssertionError [ERR_ASSERTION]: actual [null, null], expected ["2026.03.07-acde123", "2026.03.07-acde123"]. Node also emits its ordinary experimental SQLite warning when importing the module.

No screenshot is supplied because the directly exercised defect is backend version detection, not a visual layout defect. The complete reproducible script and exact expected/actual values are inline; raw working logs stay outside this public repository.

5. Root cause

The shared reader and parser extract a candidate, then require strict SemVer validation:

export function versionFrom(value: string | null): string | null {
  const candidate = value?.match(/\bv?(\d+\.\d+\.\d+[0-9A-Za-z.+-]*)/u)?.[1];
  return candidate !== undefined && semverValid(candidate) !== null
    ? candidate
    : null;
}

Zero-padded numeric components such as .03 or .07 are not strict SemVer. The extraction succeeds, but validation turns the installed version into null. ACP installation status uses this shared reader directly and separately reports executable availability; ACP-next has the same code. The installation probe therefore succeeds while the version probe appears to fail.

The resulting null is consumed by Settings' version row and CLI output formatting. The shared strict parser must not simply be loosened: other providers feed its result into SemVer comparison for updates and minimum-supported versions.

6. Proposed fix

Keep SemVer parsing and ordering unchanged. At the ACP version-probe boundary only, accept a whole calendar-version token with a four-digit year, two-digit month/day, and hexadecimal revision, preserving the displayed identifier. Use the same local reader for ACP health and installation status in both existing bridge implementations. Preserve process timeout, buffer, stdin-closing behavior, malformed-output handling, unavailable latest-version checks, and all existing wire fields.

A focused regression table exercises month/day padding, a banner, ordinary SemVer, malformed tokens, and both installed/health displays through real temporary launchers. Before the fix, each bridge reports 3 failed and 9 passed; after the ACP-only fix, each reports 12 passed. No dependency, protocol, schema, stored data, packaging, or release change is needed.

pnpm exec turbo run test --filter=@bb/provider-bridge-acp \
  --filter=@bb/provider-bridge-acp-next -- src/bridge/provider-maintenance.test.ts

7. Verification

The same agent repeated the regression in a second clean temporary clone at 6a639cfc0d66e0c789a1bd7309266973228d1a80, after confirming a clean working tree. Only the independently authored regression tests were applied; production code remained unchanged. The second clone received its own frozen dependency installation and every fixture created a fresh temporary directory. No ports or runtime data directories were allocated.

The Turbo command immediately above exited 1 in both clean runs, with the same three calendar-version cases failing in each bridge and all nine remaining tests passing in each bridge. In the second clone, the complete inline script also exited 1 with the exact two null-version records shown above. With the small local fix, the script exited 0 and preserved the identifier in both records. This is a repeated reproduction by the same agent, not an independent review. No root-cause correction was needed after the second run.

8. Related work and limits

No linked open pull request was present in issue cross-reference metadata or the open-PR issue-number search during investigation. Historical change 3d0e3dc10 deliberately made the shared parser strict to protect version ordering; this fix proposal preserves that behavior. No duplicate issue has been established by this investigation.

Real Cursor authentication, provider conversations, remote transport, and the reporter's UI were not exercised. These are not needed to prove the failing version-extraction path. Issue text and linked material were treated as untrusted claims; no issue-provided script, branch, binary, patch, or external link was executed or fetched.

9. Appendix

Primary evidence consists of the two trusted-base regression runs, the inline assertion script, and the focused passing run after the local correction. The initial full repository build passed. Full ACP suites then passed: 404 tests in ACP and 509 in ACP-next, with four existing skips in each. Both packages passed lint and typecheck. The unchanged shared maintenance-kit suite passed all 47 tests.

pnpm exec turbo run test lint typecheck --filter=@bb/provider-bridge-acp \
  --filter=@bb/provider-bridge-acp-next
pnpm exec turbo run test --filter=@bb/provider-bridge-protocol \
  -- src/bridge-kit/provider-maintenance-kit.test.ts

The broader shared-protocol run exposed eight unrelated Claude permission-contract failures. The same eight failures reproduced with unchanged production code in the second base checkout. Default Cursor parity also rejects stale allowlist entries when comparing that base checkout with itself. Comparing base versus fix with an empty allowlist produced 10 passing cells, zero failures, and one existing process-scoped skip, with no event/row differences. Neither unrelated problem was changed by this fix.

pnpm exec turbo run test --filter=@bb/provider-bridge-protocol \
  -- src/contract-tests/permission-changes.test.ts
pnpm parity --old ../verify --new ../verify --provider acp-cursor
printf '[]\n' > /tmp/empty-parity-allowlist.json
pnpm parity --old ../verify --new . --provider acp-cursor \
  --allowlist /tmp/empty-parity-allowlist.json

The first command in the last block was run in the unchanged second checkout and failed on the eight existing Claude cases; the base-versus-base default parity command also failed only on stale allowlist entries. The final command passed. The fix changes four text files and 188 total lines (additions plus deletions), within the existing ACP maintenance subsystem. Raw logs, the regression patch, and operational notes remain local rather than being published as assets.