Skip to content

feat: run usage scans through host workers with the plugin-sdk host contract - #36

Closed
MayankBansal12 wants to merge 3 commits into
mainfrom
bb/review-pull-request-32-thr_z4ddfaifv9
Closed

feat: run usage scans through host workers with the plugin-sdk host contract#36
MayankBansal12 wants to merge 3 commits into
mainfrom
bb/review-pull-request-32-thr_z4ddfaifv9

Conversation

@MayankBansal12

Copy link
Copy Markdown
Owner

Summary

  • Migrate to @get-bb/plugin-sdk 0.4.47 and BB >= 0.42, removing the vendored types/bb-plugin-sdk*.d.ts stubs and the @bb/plugin-sdk tsconfig path aliases.
  • Add a bb.host entry (host.ts, host-contract.ts) that runs usage scans in a non-PTY host worker instead of held terminals: short validated polling calls, with cancellation and timeouts terminating the command process group.
  • Cap scans at three per machine via a shared runWithConcurrency helper, and allow scans longer than 30s by retaining running jobs across poll calls.
  • Add unit tests (host.test.ts), host worker RPC integration tests (host.integration.test.ts), and a usage refresh compatibility integration test (usage.integration.test.ts).
  • Extend CI with an ubuntu/macos matrix pinned to bb-app 0.42.0; bump plugin version to 0.3.7.

Test plan

  • npm run check — clean
  • npm test — 16 files, 133 tests, all passing (including the 30s+ host worker integration test)

…ontract

Migrate to @get-bb/plugin-sdk 0.4.47 (BB >= 0.42), dropping the vendored
type stubs. Add a bb.host entry (host.ts, host-contract.ts) that executes
usage scans in a non-PTY host worker instead of long-lived terminals:
short polling calls, cancellation and timeouts kill the command process
group, and scans run with a concurrency limit of three per machine.

Also add unit/integration tests for the host worker, a CI matrix over
ubuntu/macos, and bump the version to 0.3.7.
…code-go test

macOS keeps cat and rm in /bin, so the nodeOnly symlinks dangled and the
fake curl saw an empty auth header (exit 9). Resolve cat, mktemp, and rm
via command -v at test setup.
@MayankBansal12

Copy link
Copy Markdown
Owner Author

Superseded by #32: these changes have been merged onto fix/issue-28-terminal-lifecycle via 97cf306, so PR #32 now carries the complete implementation (CI green on both ubuntu and macos).

@MayankBansal12
MayankBansal12 deleted the bb/review-pull-request-32-thr_z4ddfaifv9 branch September 9, 2026 11:41
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