Skip to content

feat(bub): target Bub 0.6.1 - #2492

Merged
AlexStocks merged 1 commit into
oceanbase:masterfrom
Fengzdadi:feat/bub-0.6.1
Nov 6, 2026
Merged

AlexStocks merged 1 commit into
oceanbase:masterfrom
Fengzdadi:feat/bub-0.6.1

Conversation

@Fengzdadi

Copy link
Copy Markdown
Contributor

Which issue or RFC does this PR close?

Part of #2487. In the review of #2488, @PsiACE asked for the Bub integration to target bub[app] 0.6.1 and to take its recall text from Bub's standard hooks. This PR is the version move on its own and keeps today's behavior. #2488 then changes where the recall text comes from.

Rationale for this change

The plugin declares bub>=0.4.0,<0.6.0, and the harness pins Bub 0.5.1. Bub 0.6 moved the CLI and channels into the app extra. Its interception hooks now carry republic.Message objects instead of message dicts. On 0.6.1 the plugin's before_llm_call would read request.messages as dicts and insert a dict system message, so it has to change to run on 0.6.

The harness also has to move. bub-acp-server 0.1.1 only works with Bub 0.5; 0.1.2 and later require bub[app]>=0.6.0.

What changes are included in this PR?

  • integrations/bub:
    • Depends on bub[app]>=0.6.1,<0.7.0, and declares republic>=0.6.1,<0.7.0 directly, since the plugin now builds Republic messages.
    • before_llm_call reads the latest user text from republic.Message.text, finds the injected context by the same marker, and injects it as republic.system(...). The recall query and the injected text are unchanged.
    • Imports the 0.6 names LLMCallRequest and LLMCallResult; the Llm* aliases are kept in Bub only for the pre-0.6.0a2 names.
  • e2e/bub:
    • Pins bub[app]==0.6.1 and refreshes uv.lock.
    • The Harbor agent installs bub-acp-server 0.1.3 and bub[app] at the harness version. The ACP SDK pin is still agent-client-protocol==1.0.0rc2, which 0.1.3 also pins.
    • Tests that build an LLMCallRequest now use republic.user(...) messages, as Bub sends.

Are there any user-facing changes?

Yes. The Bub plugin now requires Bub 0.6.1 or later within 0.6; it no longer installs with Bub 0.4 or 0.5. Recall, capture, tools, and configuration behave as before.

How was this change tested?

  • make harness-check: passed.
  • make check: passed.
  • Real Bub 0.6.1 runs (bub run from e2e/bub/.venv) against a local SQLite PowerContext Server holding a remembered decision, with a recording OpenAI-compatible stub model:
    • Responses format (openai: provider): the model request carried the PowerContext context message with the decision, the plugin's guidance in the system prompt, and the powercontext_search, powercontext_remember, and powercontext_context tools.
    • Chat format (ollama: provider) with capture events on: the stub's first reply called powercontext_search, the tool ran and returned the memory, and the second reply finished the turn. The capture log recorded user_prompt, llm_result, tool_result, and llm_result events.
      • The final checkpoint failed with ServerResponseError, because this local Server has no generation model to process the captured events. That is the Server's setup, not the plugin.
      • Each model call in the turn prepared context again, because Bub 0.6.1 does not keep the injected message in the next call's request.
  • Not run: a Harbor benchmark job. The install commands are covered by test_harbor_agent.py, but no container installed bub-acp-server 0.1.3.

AI usage statement

This PR was prepared with Claude Code (Claude Opus 5.5). It read Bub 0.6.1's hook and message types, made the change, ran the checks and the real Bub runs, and drafted this description. I reviewed the change and the results.

Bub 0.6 moves the CLI and channels into the app extra and passes republic.Message objects to the interception hooks. The plugin now reads and injects Republic messages, and the harness installs bub[app] 0.6.1 with bub-acp-server 0.1.3.
Copilot AI balanced review requested due to automatic review settings November 5, 2026 08:02

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@PsiACE PsiACE 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.

LGTM

@hidb4ai hidb4ai 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.

Reviewed e088bae. I did not find an introduced correctness defect in the Bub 0.6.1 adaptation; no database tables or public interfaces are added.

Please restore a green CI run before merging. The current run fails test_zcode_source_is_processed_and_recalled_in_a_new_session[False]: the hook emits {"component":"powercontext.zcode","stage":"prepare","code":"timeout"} where the test expects empty stderr. Both unit-test jobs were cancelled, and harness-validation was skipped. This failure is in an unchanged Zcode path, so it is not evidence of a Bub regression, but the current CI run does not establish merge readiness.

Failing job: https://github.com/oceanbase/powercontext/actions/runs/41991496470/job/127132501568

@AlexStocks AlexStocks added the 1.5.1 v1.5.1 release tracking label Nov 5, 2026

@hireview001 hireview001 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@hidb4ai hidb4ai 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.

Reviewed e088bae. No blocking findings. The Bub 0.6.1 message adaptation and matching CLI/ACP dependencies are appropriately scoped, with no new database tables or public interfaces.

The earlier CI concern is cleared: the second run passed, including the previously failing e2e job and harness validation/acceptance. https://github.com/oceanbase/powercontext/actions/runs/41991496470/attempts/2

@AlexStocks
AlexStocks merged commit ad08ba3 into oceanbase:master Nov 6, 2026
79 of 83 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.5.1 v1.5.1 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants