Skip to content

Mark the reviewer's execution choices as explicit when spawning it - #13

Merged
salemsayed merged 1 commit into
salemsayed:mainfrom
JackALaing:fix/reviewer-execution-sources
Oct 26, 2026
Merged

salemsayed merged 1 commit into
salemsayed:mainfrom
JackALaing:fix/reviewer-execution-sources

Conversation

@JackALaing

Copy link
Copy Markdown

Advisor chooses the reviewer's provider, model, permission mode and, when configured, reasoning level, then passes them to bb.sdk.threads.spawn without executionInputSources. BB therefore reports every field of the reviewer's first dispatch as null in MessageDispatchHookContext.executionSources. The SDK documents null as "core resolved it from project/provider defaults" and tells hooks to check for explicit before acting against a deliberate choice. A message.dispatch hook that holds or rejects default-model work would treat the reviewer as if nobody had chosen its model.

This change sends explicit for providerId, model and permissionMode, and for reasoningLevel only when Advisor sends a reasoning level. The spawned values do not change. Later messages to an existing reviewer are unaffected because this change only modifies reviewer creation.

SDK 0.4.87, which this repository pins, declares the field on threads.spawn.

Validation:

  • Two existing spawn assertions in server.test.ts now check the sources: a saved model with a reasoning level, and the fallback to the primary model with no reasoning level. Both fail without the server.ts change.
  • npm run verify (typecheck, 128 tests, build) and npm pack --dry-run pass on Node 24. The generated bundle is updated.

Not tested: Node 22.19, which CI uses, or a live host with a dispatch hook installed. This corrects reported provenance; it does not fix a failure I observed with a specific hook.

@salemsayed
salemsayed merged commit 9254176 into salemsayed:main Oct 26, 2026
@salemsayed

Copy link
Copy Markdown
Owner

Thanks, Jack. This is merged and shipped in v0.1.5.

It went in through #14, which also updates Advisor to bb 0.47.1 / SDK 0.6.79, so your commit is in main unchanged. An independent review found it correct against SDK 0.4.87 and 0.6.80 and confirmed both updated tests fail without the fix. #14 also adds assertions for the reasoning source on the remaining spawn paths: a saved default resolved from the catalog, a changed level, and a configured fallback level.

Release: https://github.com/salemsayed/bb-plugin-advisor/releases/tag/v0.1.5

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.

2 participants