Skip to content

Resolve bare Pi models through sole authenticated provider - #1169

Merged
SawyerHood merged 1 commit into
mainfrom
bb/fix-pi-bridge-bare-model-thr_5gmcpufrfz
Aug 7, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/fix-pi-bridge-bare-model-thr_5gmcpufrfz

Conversation

@SawyerHood

@SawyerHood SawyerHood commented Aug 7, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #1123.

Summary

  • resolve an ambiguous bare Pi model through its sole authenticated provider
  • keep explicit provider selections authoritative
  • retain the ambiguity error when zero or multiple matching providers have authentication
  • bump the host daemon protocol to update enrolled daemons before the model meaning changes

Tests

Risk

The behavior changes only for bare model IDs with multiple catalog matches and exactly one authenticated provider. Explicit provider-prefixed IDs remain unchanged.

@SawyerHood

Copy link
Copy Markdown
Collaborator Author

🚨 SLOP COP 🚨 · review

I am the SlopCop. I am reviewing this pull request for security, code quality, performance, architecture, and test coverage. I will also test the complete path when this change has a suitable route.

@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

Many doors can have the same name. This change picks the only door with a working key. If two keys work, it asks you to name the door.

Review

I found no actionable issue.

  • Security: An explicit provider still wins. A bare model selects only one authenticated match. The code does not expose credentials.
  • Code quality: The strict resolver keeps the current error behavior. The new test covers the new route. Existing tests cover explicit and multiple-match routes.
  • Architecture: The host daemon owns the local Pi authentication state. Protocol version 82 correctly updates old daemons before the meaning changes.
  • Duplicate code: The Pi command-line resolver has a similar rule. It also accepts fuzzy and custom models. Reuse would change this strict bridge behavior.
  • Performance: The change adds one small in-memory scan during session start. It adds no network, disk, or retry work.
  • Tests: All 872 package tests passed. Both package type checks passed. git diff --check also passed.
  • Browser test: This change has no user interface route, so browser testing does not apply.

@SawyerHood
SawyerHood force-pushed the bb/fix-pi-bridge-bare-model-thr_5gmcpufrfz branch from d621da5 to 510cbc1 Compare August 7, 2026 23:47
@SawyerHood
SawyerHood merged commit 781104d into main Aug 7, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/fix-pi-bridge-bare-model-thr_5gmcpufrfz branch August 7, 2026 23:51
amadad pushed a commit to amadad/bb that referenced this pull request Aug 14, 2026
Fixes get-bb#1123.

## Summary

- resolve an ambiguous bare Pi model through its sole authenticated
provider
- keep explicit provider selections authoritative
- retain the ambiguity error when zero or multiple matching providers
have authentication
- bump the host daemon protocol to update enrolled daemons before the
model meaning changes

## Tests

- `pnpm exec turbo run test typecheck --filter=@bb/host-daemon-contract
--filter=@bb/agent-runtime --force`
- 879 tests passed after rebasing on get-bb#1148
- both package typechecks passed

## Risk

The behavior changes only for bare model IDs with multiple catalog
matches and exactly one authenticated provider. Explicit
provider-prefixed IDs remain unchanged.
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.

Pi bridge: bare model ids from bb's own spawns fail at thread.start ("Ambiguous Pi model")

1 participant