Conversation
…oads Add a paired command that runs continuation workloads with PowerContext off and on, in separate containers, over several trials with the arm order alternating, and reports paired outcomes. - OFF installs Bub without the PowerContext plugin and passes no POWERCONTEXT_* settings. ON binds the plugin to a new Scope and enables event capture, so Bub captures what the user says like the other host integrations do. - After each ON session, a Harbor agent-end hook flushes the Scope and snapshots its Server statistics. The hook runs after the agent's timed phase, so the flush does not use the agent's time budget. - An ON run counts only when Sources were captured and turned into Memory before the recall session and PowerContext supplied context during it. Integration failures and infrastructure errors are counted but not scored; agent timeouts count as failures in both arms. - The first continuation task mentions a decision only in conversation and asks for it in a later session. The recall step's own tests hold the answer key, so the earlier session cannot read it. Refs oceanbase#1705 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harbor awaits the agent-end hook in a finally block, so an exception from the flush or statistics read replaced the agent's own outcome: a timed-out ON session became an unscored error. Record settle failures as treatment failures instead of raising. Skip the flush after the final session, where only the statistics snapshot is read, and document the Client and Bub timeouts the flush needs in the paired run example. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fengzdadi
marked this pull request as ready for review
September 26, 2026 19:27
Fengzdadi
requested review from
AlexStocks,
PsiACE,
Teingi and
frostming
as code owners
September 26, 2026 19:27
The treatment check required a flush to create Memory and the recall session to receive context. Both are PowerContext's own behavior under the treatment, so an ON run in which PowerContext kept or returned nothing was excluded as an integration failure instead of being scored, which inflates the ON success rate. Gate only on the integration: Sources captured before the recall session and a context request during it. The snapshots still record Memory and ready context. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue or RFC does this PR close?
Part of #1705, step 2 of the plan. Builds on #1743.
Rationale for this change
#1705 asks for paired PowerContext OFF/ON runs that include a cross-session continuation workload. The E2E harness evaluates Memory quality for a single arm, and its existing tasks use Bub-internal commands that bypass the model. Those tasks cannot show an OFF/ON difference and cannot run on other hosts.
What changes are included in this PR?
pairedcommand (make harness-paired): runs each continuation workload with PowerContext off and on, in separate containers, for--trialstrials with the arm order alternating. It writes per-arm evidence and a paired report.POWERCONTEXT_*settings.capture_eventsenabled. This is not the plugin's default; it makes Bub capture what the user says, as the other host integrations do, without relying on the model to call a memory tool.HostAdapter.agent_configtakesscope_id=Nonefor OFF.on_agent_endedhook records a Server statistics snapshot of the ON Scope after each session, flushing it first when another session follows. Harbor runsagent.run()underasyncio.wait_for, and the hook fires after it, so the flush does not use the agent's time budget. Harbor awaits the hook in afinallyblock, so a failed flush or read is recorded as a treatment failure rather than replacing the agent's own outcome, such as a timeout.codingextraction profile, a pasted conversation between two other people was captured and queried but kept no Memory of it; excluding such runs would inflate the ON success rate.project-decision-continuation): the fact appears only in conversation, next to an unrelated typo fix, and a later session asks for it. The answer key lives only in the recall step's tests, because Harbor keeps each uploaded test directory in the container for later steps.e2e/bub/paired-tasks/, andacceptancerejects continuation workloads, so the acceptance catalog and CI are unchanged.Are there any user-facing changes?
A new
pairedcommand andharness-pairedMakefile target. Existing commands, manifests and evidence are unchanged.How was this change tested?
Pilot run
make harness-paired ARGS='--trials 2'against a real Server, Harbor, Bub and model:unknown(0)We decided to use OceanBase with a shard count of 12 for the ticket service.(1)unknown(0)We decided to use OceanBase with a shard count of 12.(1)tape_search) four times, found nothing, and wroteunknown. Bub's tape does not carry across these sessions, so OFF keeps Bub's native behavior.b02b8ab6. Later commits change how settling handles failures and the final session, the README timeouts, and which snapshot fields gate the treatment check; the pilot's runs classify the same under the final rule. Server extraction profile: defaultcoding; Harbor 0.16.1; Bub 0.4.2 withbub-acp-server0.0.2; agent modelopenai:gpt-6-lunathrough a ChatGPT login; local Server on SQLite withopenrouter:deepseek/deepseek-v4-profor generation andopenrouter:qwen/qwen3-embedding-4bfor embeddings; OrbStack on macOS. The Server API does not report model identities, so they are recorded here rather than in the evidence.Checks
make checkandmake harness-check(71 tests) pass.acceptancerejecting continuation workloads.make unit-test:tests/builtin/test_native_code*.pyfails locally on unmodifiedmastertoo; nothing undertests/imports the harness.Limits
AI usage statement
This PR was developed with Claude Code (Claude Opus 5.5), which designed and wrote the change and tests, ran the checks and the pilot above, and analyzed the evidence. The author reviewed the change and provided the pilot environment.
🤖 Generated with Claude Code