Skip to content

Stabilize empty plugin update scheduler regression - #2338

Merged
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-plugin-update-empty-set-interval-ti-thr_mkwitqde5r
Aug 24, 2026
Merged

Stabilize empty plugin update scheduler regression#2338
ymichael merged 1 commit into
mainfrom
bb/ci-flake-fix-plugin-update-empty-set-interval-ti-thr_mkwitqde5r

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

What was wrong

The empty-plugin scheduler regression inherited the file's heavyweight Git-plugin integration fixture. Before it could assert the scheduled delay, the test installed and loaded a Git plugin, then called the public removal path solely to manufacture an empty database. That removal performs lifecycle disposal, managed-file cleanup, and CLI-skill synchronization unrelated to periodic scheduling. The passing main run already spent about 3.3 seconds in this test; locally it reached 4.790 seconds, and under ordinary contention the removal did not finish before Vitest's 5-second default timeout. The scheduler assertion itself is synchronous and deterministic.

What changed

Move the empty-set scheduling regression into a small fixture that owns an in-memory SQLite database with no installed plugins and injects the scheduler callback directly. The assertion remains exact: starting periodic checks with no eligible rows must schedule one six-hour delay. The fixture explicitly stops its service and closes its database.

This is test-only. There is no server/daemon wire change, CLI or configuration surface, or documentation change.

How you verified

  • Before the change, the focused test took 4.790 seconds locally; an instrumented rerun reproduced the Test timed out in 5000ms failure before service.remove("updater") completed.
  • After the change, the focused regression passed in 61ms. With 24 CPU workers started alongside Vitest, it passed in 74ms while retaining the exact six-hour assertion.
  • pnpm exec turbo run test --filter=@bb/server --force -- test/services/plugins/plugin-update.test.ts — 27 tests passed.
  • pnpm exec turbo run test --filter=@bb/server --force — 210 test files passed, 1 skipped; 2,002 tests passed.
  • pnpm exec turbo run typecheck --filter=@bb/server — passed.
  • pnpm exec turbo run build --filter=@bb/server — passed.
  • git diff --check — passed.

No matching GitHub issue was found, so this PR does not include a Fixes #N reference.

AGENT GENERATED: by GPT-5.6-Sol

@ymichael
ymichael merged commit 0cb39a5 into main Aug 24, 2026
15 checks passed
@ymichael
ymichael deleted the bb/ci-flake-fix-plugin-update-empty-set-interval-ti-thr_mkwitqde5r branch August 24, 2026 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant