Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

test: cover plugin catalog epoch skip and provider auth gates

open
Stack 2/2
#347 opened by cursor[bot]cursor/missing-test-coverage-a6ab→main
Conversation0
cursor[bot]
Commits
0
Files changed…
opened this pull request
Author
· 6 days ago

Risky behavior now covered

  • Plugin catalog staleness / partial marketplace: local or failed remote refreshes must mark availablePluginsPartial so clients keep cached marketplace rows; successful remote refreshes must not.
  • Epoch invalidation: in-flight remote catalog emits with a stale onlyIfEpoch are dropped; invalidate-during-refresh queues a follow-up refresh at the new epoch.
  • Remote refresh failures: build errors surface as internal_error and never emit a clearing plugins_catalog.
  • Plugin detail fail-closed: workspace-scoped misses skip remote lookup; ambiguous/missing ids emit validation_failed; remote fallback only when local catalog misses without a workspace scope.
  • Provider auth / model selection gates: blank model id, unsupported provider, busy setModel, blank/unknown auth method ids, OpenCode-only API-key copy sibling gate, and persist-after-apply failure reporting.

Test files added/updated

  • test/session/pluginCatalogService.test.ts (new)
  • test/session/providerAuthManager.test.ts (new)
  • src/server/session/PluginCatalogService.ts — tiny optional-deps seam (default wiring unchanged) so epoch/error paths are injectable, matching the MCP validation flow pattern

Why these tests materially reduce regression risk

These two extracted session collaborators sit on high-blast-radius paths (plugin marketplace UX and provider credential/model changes) and previously lacked dedicated fail-closed unit coverage. Prior coverage runs claimed the gaps; main has been unchanged at e2d5f95e, so this run fills them without duplicating open PRs #331–#346.

Validation

  • Targeted: pluginCatalogService, providerAuthManager, platform-boundary — 24 pass
  • bun run typecheck — clean
  • Biome on touched files — clean
Open in Web View Automation 
This branch can’t be merged automatically yet
Branch comparison failed — verify branches still exist in storage.
0 approving reviews
None yet
Checks
No checks recorded
Fast-forward
Source must contain the target branch tip
main ← cursor/missing-test-coverage-a6ab

Sign in to comment.

Stack

2/2
1

Merge readiness

Checking mergeability after the indexing worker computes the current branch state.

Autopilot

Debug

Reviews

Approved0
ReviewersNone yet

Configure an OpenRouter key in repository settings.

Update README.md

#125 mobile-fixes ← main

Updated 4 months ago

merged
2

test: cover plugin catalog epoch skip and provider auth gates

#347 main ← cursor/missing-test-coverage-a6ab

Updated 6 days ago

open