Repository navigation
feat(bub): target Bub 0.6.1 - #2492
Conversation
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.
There was a problem hiding this comment.
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.
hidb4ai
left a comment
There was a problem hiding this comment.
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
hidb4ai
left a comment
There was a problem hiding this comment.
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
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 theappextra. Its interception hooks now carryrepublic.Messageobjects instead of message dicts. On 0.6.1 the plugin'sbefore_llm_callwould readrequest.messagesas 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-server0.1.1 only works with Bub 0.5; 0.1.2 and later requirebub[app]>=0.6.0.What changes are included in this PR?
integrations/bub:bub[app]>=0.6.1,<0.7.0, and declaresrepublic>=0.6.1,<0.7.0directly, since the plugin now builds Republic messages.before_llm_callreads the latest user text fromrepublic.Message.text, finds the injected context by the same marker, and injects it asrepublic.system(...). The recall query and the injected text are unchanged.LLMCallRequestandLLMCallResult; theLlm*aliases are kept in Bub only for the pre-0.6.0a2 names.e2e/bub:bub[app]==0.6.1and refreshesuv.lock.bub-acp-server0.1.3 andbub[app]at the harness version. The ACP SDK pin is stillagent-client-protocol==1.0.0rc2, which 0.1.3 also pins.LLMCallRequestnow userepublic.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.bub runfrome2e/bub/.venv) against a local SQLite PowerContext Server holding a remembered decision, with a recording OpenAI-compatible stub model:openai:provider): the model request carried the PowerContext context message with the decision, the plugin's guidance in the system prompt, and thepowercontext_search,powercontext_remember, andpowercontext_contexttools.ollama:provider) with capture events on: the stub's first reply calledpowercontext_search, the tool ran and returned the memory, and the second reply finished the turn. The capture log recordeduser_prompt,llm_result,tool_result, andllm_resultevents.ServerResponseError, because this local Server has no generation model to process the captured events. That is the Server's setup, not the plugin.test_harbor_agent.py, but no container installedbub-acp-server0.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.