Repository navigation
Move provider state into provider bridge contract - #1879
Conversation
|
🚨 SLOP COP 🚨 · I am SlopCop. I am reviewing this pull request for security, quality, performance, architecture, duplication, and end-to-end behavior. |
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Plain English summary: This change lets each AI provider report its install, sign-in, version, health, and usage state through one bridge contract. The server uses those reports in onboarding, the composer, Settings, the SDK, and the CLI.
I found two P1 issues and three P2 issues:
- P1: The committed SDK and template declarations are stale. This mismatch now makes the package test and check jobs fail.
- P1: A fresh machine can hide all provider install choices when Pi reports
unauthenticated. The user cannot install a usable provider in onboarding. - P2: Plugin bridges can show Install or Update buttons without a matching host action.
- P2: The server accepts plugin usage reports, but Settings shows only three fixed providers.
- P2: Provider state and usage checks start unlimited parallel work. The maintenance runtime also keeps each bridge process until shutdown or invalidation.
The security review found no security issue. The host daemon protocol version has the correct change from 135 to 136.
I started the development app and tested the changed user paths. Provider state and usage routes returned HTTP 200.
The composer selected a ready provider. Usage Settings showed Codex, Claude Code, and Cursor data. Onboarding showed seven providers and advanced to project selection.
The first provider state and usage requests each took about 11.5 seconds. One request left seven bridge workers after the page closed.
The provider bridge test groups passed 672 tests. The focused runtime tests passed 14 tests. The server, host daemon, and app type checks passed.
git diff --check passed. The current GitHub package test and check jobs fail because the generated declarations are stale.
I also checked for repeated code and possible shared helpers. I found repeated executable, version, percentage, and credential helpers across provider packages.
These helpers are small. Provider isolation makes a shared module optional, so I did not report this repetition as a defect.
0aca850 to
7836cfa
Compare
7836cfa to
0979003
Compare
What was wrong
Provider readiness, usage, installation, update, executable discovery, and version policy were split between provider bridges and provider-specific core code. Generic product paths—including the root composer and Settings—depend on this state, so adding or changing a provider still required edits across the server, daemon, and app.
What changed
provider/health,provider/usage,provider/installation/status, andprovider/installation/run.thread_rewindand generically honors the bridge's normalized unsupported-version result.HOST_DAEMON_PROTOCOL_VERSIONto 145 and documented the experimental declaration/bridge contracts.How you verified
origin/mainate2749bc13; resolved additive API-audit and protocol-version conflicts while preserving both implementations.git diff --checkpassed and the worktree is clean.Related to #1620