Skip to content

fix(agent): preserve Databricks Opus UC reasoning and tool continuation - #7840

Merged
wesbillman merged 1 commit into
mainfrom
carl/databricks-opus-compat
Sep 23, 2026
Merged

wesbillman merged 1 commit into
mainfrom
carl/databricks-opus-compat

Conversation

@wesbillman

Copy link
Copy Markdown
Collaborator

Summary

Fix reasoning_effort: Extra inputs are not permitted for Databricks v2 model data_workflow_tools.goose.goose-claude-opus-5-5 without dropping explicit High.

  • Add one provider-qualified exact capability record: Anthropic Messages, adaptive thinking, output_config.effort, medium upstream default. Mirror exact-record precedence in Rust/TS; keep uncurated UC services neutral and existing GPT routing unchanged.
  • Preserve ordered native content, including signed/empty thinking and redacted blocks, across tool results. Do not cache-stamp thinking blocks or leak native state into Chat reasoning details. Discard truncated native state; reject more than 64 native calls before any tool executes instead of altering signed content.
  • Add production-dispatch/ACP regressions and six shared capability vectors. No relay/ACP protocol, schema, settings, inheritance, retries, or other harness changes.

Validation

At final head 82f43f8d07bfcc3f4af492afc0a58a02f8e549c4, clean tree:

  • Rebuilt real buzz-agent, drove ACP with a harmless MCP fixture against the actual service. Two POSTs to /ai-gateway/anthropic/v1/messages, both HTTP 200, exact FQN, High via output_config, adaptive/summarized thinking, no reasoning_effort. First response contained signed thinking + tool use; second request preserved signature/content order and paired result; final ACP stop end_turn. No credentials, signature contents, or conversation data included here.
  • Mandatory pre-commit/pre-push checks passed: formatting/lint, file-size gate, Rust test lanes, desktop typechecking and full JS tests, Tauri clippy/tests.
  • Full cargo test -p buzz-agent passed on the pre-commit tree (only hook formatting followed), including the new native truncation/65-call ACP regressions, ordered interleaved signed/redacted two-tool capture, nearby-ID negatives, and existing provider regressions.
  • Independent API/replay, regression-boundary, and Rust/TS capability reviews cleared.

Full just ci, packaging and manual desktop UI testing were not run locally; repository CI remains the merge gate. Cross-harness internals and other UC service contracts are outside scope.

References

Route the verified service through native Anthropic Messages with explicit
effort and retain signed content in its original order across tool results.
Keep uncurated UC capabilities and effort inheritance unchanged.

Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
Signed-off-by: Wes <wesbillman@users.noreply.github.com>
Signed-off-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
@wesbillman
wesbillman requested a review from a team as a code owner September 23, 2026 14:36
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is ec7ea38f62ea917f15e85a678bc94f3bbee5bb64...82f43f8d07bfcc3f4af492afc0a58a02f8e549c4.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 82f43f8d07bfcc3f4af492afc0a58a02f8e549c4 to authorize a new review.
Any previous review applies only to its recorded range.

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:bot: Jude’s code review agent — APPROVE at exact head 82f43f8d07bfcc3f4af492afc0a58a02f8e549c4 against base ec7ea38f62ea917f15e85a678bc94f3bbee5bb64.

No author-actionable defects found.

I traced the changed contract end to end:

  • The provider-qualified, case-insensitive exact capability record takes precedence over the neutral UC-FQN fallback in both Rust and TypeScript. Nearby namespace, suffix, service, and provider cases remain on the existing MLflow/neutral paths, with one shared 164-vector corpus gating both interpreters.
  • Production dispatch consumes that resolver directly. The exact model selects the Anthropic Messages endpoint; neighboring IDs remain on MLflow Chat; ACP session/set_model applies the override to the next prompt.
  • Anthropic parsing preserves the full ordered native block array, including empty signed-thinking and redacted blocks. Continuation replays that state ahead of paired tool results. Prompt-cache stamping refuses thinking/redacted tails, and the other API routes do not consume this native state.
  • More than 64 native tool calls fails before history append, permission prompts, or execution. A max_tokens response discards partial native replay/tool-call state, keeps visible partial text, and enters the existing bounded recovery path.
  • The diff changes no UI component, rendered copy, persistence path, accessibility surface, or interaction. Desktop changes are limited to capability interpretation, corpus coverage, and contributor guidance.

Exact-head validation passed:

  • cargo test -p buzz-agent — full package suite, 721 discovered tests, 0 failures.
  • pnpm --dir desktop test — 6,592 passed, 0 failed.
  • Desktop TypeScript typecheck.
  • cargo fmt --all -- --check and git diff --check.
  • Mutation control: removing exact-FQN precedence made the Rust corpus regression test fail; restoring shipped source returned the worktree to clean.
  • Deterministic production-dispatch capture and ACP regressions cover request path/body/order, nearby-model negatives, oversized native turns, and truncation recovery.

Confidence gaps, not defects: I did not independently repeat a credentialed Databricks live round trip; deterministic capture validates the client contract but cannot authenticate the external service. Provider-integration/release tooling owns any desired live revalidation. At final submission, several exact-head Desktop/E2E CI jobs were still running with no failed gate; CI owns completion, and author action is required only if a gate fails.

Residual risk is limited to future drift in the external service contract; exact provider/model scoping prevents that assumption from affecting neighboring models.

@jedwards27 jedwards27 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:bot: Jude’s code review agent — APPROVE at exact head 82f43f8d07bfcc3f4af492afc0a58a02f8e549c4 (base ec7ea38f62ea917f15e85a678bc94f3bbee5bb64).

Risk: high — agent-runtime provider routing and signed native Anthropic continuation state cross the model-capability, HTTP dispatch, ACP session, and tool-execution boundaries.

Findings: no unresolved concrete defect. Author action: none.

The exact, provider-qualified Databricks Opus UC capability record wins before the neutral UC-FQN fallback in both Rust and TypeScript, while nearby namespace/service/provider negatives remain MLflow/neutral. Production Llm::complete consumes that resolver directly. Anthropic parsing retains the complete ordered native block array—including empty signed thinking and redacted blocks—only for non-truncated responses; continuation replays that state before paired tool results. Prompt-cache stamping excludes thinking/redacted tails, Chat accepts only array-shaped OpenRouter state, and Responses ignores the native state, containing cross-route leakage. More than 64 native calls fails before permission or execution; max-token recovery discards partial signed/tool state and retains only bounded visible text.

No rendered UI, interaction, persistence, or accessibility path changed. Desktop changes are limited to capability interpretation, shared corpus validation, and contributor guidance.

Validation at this exact clean head:

  • cargo test -p buzz-agent: 721 discovered tests, 0 failures, including production-dispatch capture and ACP 65-call/truncation regressions.
  • pnpm --dir desktop test: 6,592 passed, 0 failed; shared 164-vector Rust/TypeScript corpus parity covered.
  • Desktop TypeScript typecheck passed.
  • cargo fmt --all -- --check and git diff --check passed.
  • Mutation removal of exact-FQN precedence caused the corpus snapshot test to fail; restoring shipped source returned the clean tree.
  • Live GitHub checks currently have Rust unit/lint/Windows, cross-compiles, security, DCO, macOS/Windows builds, and smoke shards 1/3 green. Desktop Core, smoke shards 2/4, and E2E relay remain in progress; those exact-head CI gates own merge readiness.

Confidence gap: reviewers did not independently repeat the credentialed Databricks round trip. Deterministic production HTTP capture and ACP integration prove local routing/body/order; the author reports an exact-head live two-request 200/200 continuation. This is external integration confidence, not an author-actionable defect. Verification owner: provider-integration/release operator if live revalidation is desired, plus the remaining exact-head CI gates.

Any new head invalidates this approval.

@wpfleger96 wpfleger96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 thanks Wes. Reviewed at 82f43f8d, no feedback. The exact-record precedence matches in the Rust and TS interpreters, High is sent as adaptive thinking plus output_config.effort, and signed/redacted blocks replay in their original order. The native state also stays off the Chat/Responses paths after a model switch, and the 65-call rejection plus the max_tokens guard both fire before any native content could be replayed in a changed form. Keeping this to the one service makes sense. #7829 can rebase onto it as the fallback for the other Claude FQNs.

@wesbillman
wesbillman merged commit 0cc63fe into main Sep 23, 2026
81 checks passed
@wesbillman
wesbillman deleted the carl/databricks-opus-compat branch September 23, 2026 15:44
wpfleger96 pushed a commit that referenced this pull request Sep 23, 2026
…n-surface

* origin/main:
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  feat(canvas): add version history with atomic restore (#6780)
  chore(release): release Buzz Desktop version 0.5.24 (#7817)
  test(desktop): stabilize unread and audio release smoke fixtures (#7821)
  fix(desktop): remember Inbox unread-only choice (#7672)
  feat(mobile-infra): support development App Attest (#7744)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>
wpfleger96 pushed a commit that referenced this pull request Sep 23, 2026
…rcement

* origin/main:
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  feat(canvas): add version history with atomic restore (#6780)
  chore(release): release Buzz Desktop version 0.5.24 (#7817)
  test(desktop): stabilize unread and audio release smoke fixtures (#7821)
  fix(desktop): remember Inbox unread-only choice (#7672)
  feat(mobile-infra): support development App Attest (#7744)
  docs(nip-fi): clarify federated identity amendments (#7803)
  fix(desktop): refresh channels after access-revoked closure (#7784)
  fix(desktop): bound startup request bursts and recover quota refusals (#7790)
  fix(audit): frame hash inputs with TLV (#7492)
  fix(admin): allow cold storage worker DB startup (#7770)

Signed-off-by: Hayt <211b96e6a2b7f45fd4047988976c7bbbeeda0c15f3ae7b32eec20834b5a55118@buzz.block.builderlab.xyz>

# Conflicts:
#	crates/buzz-relay/src/api/bridge.rs
wpfleger96 added a commit that referenced this pull request Sep 23, 2026
…c-agent-commit-identity

* origin/main:
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  feat(canvas): add version history with atomic restore (#6780)
  chore(release): release Buzz Desktop version 0.5.24 (#7817)
  test(desktop): stabilize unread and audio release smoke fixtures (#7821)
  fix(desktop): remember Inbox unread-only choice (#7672)
  feat(mobile-infra): support development App Attest (#7744)
  docs(nip-fi): clarify federated identity amendments (#7803)
  fix(desktop): refresh channels after access-revoked closure (#7784)

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
bradseiler pushed a commit that referenced this pull request Sep 23, 2026
…in-gate

* origin/main: (30 commits)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  feat(canvas): add version history with atomic restore (#6780)
  chore(release): release Buzz Desktop version 0.5.24 (#7817)
  test(desktop): stabilize unread and audio release smoke fixtures (#7821)
  fix(desktop): remember Inbox unread-only choice (#7672)
  feat(mobile-infra): support development App Attest (#7744)
  docs(nip-fi): clarify federated identity amendments (#7803)
  fix(desktop): refresh channels after access-revoked closure (#7784)
  fix(desktop): bound startup request bursts and recover quota refusals (#7790)
  fix(audit): frame hash inputs with TLV (#7492)
  fix(admin): allow cold storage worker DB startup (#7770)
  feat(relay): add admin HTTP routes for member restriction management (#7302)
  fix(relay): fire kick live side effects at convergence; persist target; fence re-add race with held lock (#7298)
  ...

Signed-off-by: coder 1 <a93f3b1decd199cec83848f116ff60c20776cdd03861b9bba2610acae7c9eeeb@buzz.block.builderlab.xyz>
michaelneale added a commit that referenced this pull request Sep 24, 2026
* origin/main:
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  feat(canvas): add version history with atomic restore (#6780)
  chore(release): release Buzz Desktop version 0.5.24 (#7817)
  test(desktop): stabilize unread and audio release smoke fixtures (#7821)
  fix(desktop): remember Inbox unread-only choice (#7672)
  feat(mobile-infra): support development App Attest (#7744)
  docs(nip-fi): clarify federated identity amendments (#7803)
  fix(desktop): refresh channels after access-revoked closure (#7784)
  fix(desktop): bound startup request bursts and recover quota refusals (#7790)
  fix(audit): frame hash inputs with TLV (#7492)
  fix(admin): allow cold storage worker DB startup (#7770)

Signed-off-by: Michael Neale <michael.neale@gmail.com>
TheSentinel454 added a commit that referenced this pull request Sep 24, 2026
…undation-local

* origin/main: (50 commits)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  ...
Signed-off-by: tornquist <tornquist@squareup.com>
TheSentinel454 added a commit that referenced this pull request Sep 24, 2026
…t/osc-event-write-chokepoint

* commit 'a6a3032e446e6e66e8e41a229ef655ea79f36202': (50 commits)
  feat(desktop): relay admin console for the /api/admin/v1 operator surface (#4768)
  fix(mobile): keep retired sections manager out of successor cache (#7873)
  Select one feature flag provider at compile time (#7677)
  chore(release): release Buzz Desktop version 0.5.25 (#7867)
  fix(ci): consume the published MinIO image (#7870)
  fix(mobile): converge sidebar managers on relay head with resume re-read (#7806)
  fix(ci): bootstrap the reusable MinIO image in GHCR (#7869)
  Discover alternate Buzz ACP commands (#6948)
  fix(hooks): surface nextest failures and stale pnpm deps in pre-push (#7850)
  feat(acp): run one prepared task from a file or stdin (#7851)
  Fix mobile heart and warning emoji with native font fallback (#7842)
  chore(mesh): upgrade MeshLLM to 0.76.2 (#7559)
  feat(agents): humanize uncurated Databricks model ids with a label grammar (#7844)
  fix: route databricks claude fqns to anthropic messages (#7829)
  feat(relay): add opt-in newest-first thread windows (#7823)
  refactor: move agent Git bootstrap into ACP harness (#7819)
  Use worker snapshots for relay storage metrics (#7845)
  fix(hooks): strip repo-local git env from pre-push test lanes (#7841)
  fix(mobile-infra): render push grant lifetimes as decimal in chart 0.3.2 (#7820)
  fix(agent): preserve Databricks Opus UC reasoning and tool continuation (#7840)
  ...

Signed-off-by: tornquist <tornquist@squareup.com>

# Conflicts:
#	crates/buzz-db/src/store/event.rs
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.

3 participants