Skip to content

Fix the plugin catalog route test count - #1136

Merged
SawyerHood merged 1 commit into
mainfrom
bb/thr_k2dcthihyc
Aug 7, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/thr_k2dcthihyc

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • Derive pluginCount, includedPluginCount, and optionalPluginCount in plugin-catalog-routes.test.ts from the bundled plugin registry instead of hardcoding 13 / 8 / 5.

Why

CI is red on main. Commit f13c2d3 ("Move T3 sidebar plugin to examples", #1109) removed t3sidebar from OFFICIAL_PLUGINS, so the bundled catalog went from 13 plugins to 12. That PR updated plugin-catalog-service.test.ts, which derives its counts from the registry, but it missed the route test, which hardcoded the numbers.

AssertionError: expected { catalog: { pluginCount: 12, ... } }
                to match object { catalog: { pluginCount: 13, ... } }

#1109 landed without a green run: its own CI run (31186905645) was cancelled when #1108 pushed on top of it.

The route test now uses the same source of truth as the service test, so a future plugin add or remove will not break it again.

Tests

  • pnpm exec turbo run test --filter=@bb/server -- plugin-catalog — 7 passed.
  • pnpm exec turbo run test --filter=@bb/server — 1336 passed. One unrelated local-only failure in internal-skill-trees.test.ts, which asserts file mode 0o644 but writes the file with no explicit chmod. It follows the umask, so it fails under umask 0002 and passes on CI runners under 0022.
  • pnpm exec turbo run typecheck --filter=@bb/server — pass.
  • CI run 31187487485 on main: Tests (server) was the only failing job. All other jobs passed.

Risk

Test-only change. No product code is touched.

🤖 Generated with Claude Code

The route test asserted a hardcoded bundled plugin count of 13. Commit
f13c2d3 removed the T3 sidebar plugin from the official catalog, so the
real count is 12. The test broke CI on main.

Derive the three counts from the registry, the same as the sibling service
test. A future plugin add or remove will not break this test again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@SawyerHood

Copy link
Copy Markdown
Collaborator Author

🚨 SLOP COP 🚨 · review

I am the SlopCop. I am now reviewing this pull request for security, code quality, performance, duplication, architecture, and test coverage.

@SawyerHood
SawyerHood merged commit b6dab0e into main Aug 7, 2026
17 of 18 checks passed
@SawyerHood
SawyerHood deleted the bb/thr_k2dcthihyc branch August 7, 2026 14:42

@SawyerHood SawyerHood left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚨 SLOP COP 🚨 · review

ELI5: The test used a fixed plugin count. One plugin left the catalog, so the fixed count became wrong. This change counts the lists directly.

I found no blocking issue and no inline finding.

  • Security: This change affects test code only. The new registry import adds no network, file-write, authentication, or dependency risk.
  • Code quality: The three expressions match the registry and the sibling service test. They still detect an incorrect autoInstall filter.
  • Performance: The imported module already exists in the test graph. This change adds no runtime cost or material test cost.
  • Validation: The forced plugin-catalog test passed at the pull request SHA. Both files and all seven tests passed.
  • CI: All completed GitHub checks passed. The compatibility job skipped as expected.

The wider scan found old 13 / 8 / 5 values in unrelated mock and schema fixtures. Those values do not control catalog behavior.

The scan also found two pre-existing plugin-management UI trees. That architecture issue does not affect this small test fix.

I did not start a browser test because the pull request changes no runtime route or UI behavior. The focused test sends Hono requests through the real route and database.

amadad pushed a commit to amadad/bb that referenced this pull request Aug 14, 2026
## Summary

- Derive `pluginCount`, `includedPluginCount`, and `optionalPluginCount`
in `plugin-catalog-routes.test.ts` from the bundled plugin registry
instead of hardcoding `13 / 8 / 5`.

## Why

CI is red on `main`. Commit f13c2d3 ("Move T3 sidebar plugin to
examples", get-bb#1109) removed `t3sidebar` from `OFFICIAL_PLUGINS`, so the
bundled catalog went from 13 plugins to 12. That PR updated
`plugin-catalog-service.test.ts`, which derives its counts from the
registry, but it missed the route test, which hardcoded the numbers.

```
AssertionError: expected { catalog: { pluginCount: 12, ... } }
                to match object { catalog: { pluginCount: 13, ... } }
```

get-bb#1109 landed without a green run: its own CI run (31186905645) was
cancelled when get-bb#1108 pushed on top of it.

The route test now uses the same source of truth as the service test, so
a future plugin add or remove will not break it again.

## Tests

- `pnpm exec turbo run test --filter=@bb/server -- plugin-catalog` — 7
passed.
- `pnpm exec turbo run test --filter=@bb/server` — 1336 passed. One
unrelated local-only failure in `internal-skill-trees.test.ts`, which
asserts file mode `0o644` but writes the file with no explicit `chmod`.
It follows the umask, so it fails under umask `0002` and passes on CI
runners under `0022`.
- `pnpm exec turbo run typecheck --filter=@bb/server` — pass.
- CI run 31187487485 on `main`: `Tests (server)` was the only failing
job. All other jobs passed.

## Risk

Test-only change. No product code is touched.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
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