Repository navigation
test(pi): run the Pi extension against a real Server in CI - #2531
Conversation
Start Pi in RPC mode with the package's extension, an in-process Server, and deterministic model fixtures. Cover cross-session recall, credential prompts kept out of capture, the pre-compaction checkpoint when its flush succeeds and when it stalls past the one-second budget, and memory writes gated on user confirmation. Run the file in the pi-package job with POWERCONTEXT_TEST_PI_HOST=1 and route the shared fixtures it uses to the pi suite.
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 4ad405c. No patch-introduced correctness issues found. The real Pi/Server coverage is appropriately scoped, and this change adds no database tables or public product interfaces.
The separate OceanBase Recall effort job hit its 600-second maintenance-test timeout (exit 124), leaving the overall CI result red. That path is outside this patch; please resolve or obtain a successful rerun before merging.
Bring in the 6 first-parent commits that landed since the previous merge, including the OpenDAL fix for the Pydantic diagnostic that failed `opendal-package` on this branch and on master (oceanbase#2503), the Pi extension tests against a real Server (oceanbase#2531), and the harness workflow restructuring (oceanbase#2526). The merge is textually clean. The persistence digest in `release/upgrade-support.json` is unchanged. The new Pi service chain test passed the removed `scheduler_path` argument to `create_server_app`, so that argument is dropped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Which issue or RFC does this PR close?
No tracking issue. This is the Pi counterpart of the real-host coverage tracked for Hermes in #2438 and for the gateway in #2466.
Rationale for this change
The Pi package's own tests stub
fetchand Pi's extension API. The cross-host continuity acceptance runs the actual Pi host against a real Server, but only to send a Handoff with prompt capture off. It does not check recall, prompt capture, lifecycle checkpoints, or the memory tools. A break between Pi's lifecycle events, the extension, and the Server's HTTP contract in any of those would reach users first.What changes are included in this PR?
tests/e2e/test_pi_service_chain.pystarts three things:-eand a pinned Scope.It covers four cases:
PowerContext host-supplied context.label. This holds both before and after fix(pi): drop the adapter trust notice from prompt context #2510.agent_endflush meets a 503, the position stays pending, andcompactflushes it before Pi finishes compacting.deadline_exceededdiagnostic namessession_before_compactwithout content or the raw Scope ID.new_sessionthen flushes the position.pc_remember.pc_searchreturns it from the bound Scope.PiHost.prompt(..., allow_tool_errors=True)lets a case observe a declined tool call. Existing callers keep the strict default.CI:
pi-packagejob runs the file withPOWERCONTEXT_TEST_PI_HOST=1, so missing Pi dependencies fail the job instead of skipping..github/ci-paths.tomlroutes the shared Pi RPC client and the ZCode acceptance fixtures the test uses to thepisuite.Are there any user-facing changes?
No. Tests and CI only.
How was this change tested?
POWERCONTEXT_TEST_PI_HOST=1 uv run pytest tests/e2e/test_pi_service_chain.py: 4 passed, in 10–27 s per run. This includes runs with three concurrent-n 4invocations.recall.tschange applied locally, all 4 cases pass.POWERCONTEXT_TEST_PI_HOST=1they fail.uv run pytest tests/test_ci_changes.py: 112 passed.make check: passed.make unit-teston macOS: 8141 passed, 416 skipped, 4 failed. All four are intests/test_ci_installation_roles.py, the known macOS failures, which this PR does not touch./code-review(high) before and after the review changes, plus an independent review agent. None found a correctness defect.models.jsonblock is duplicated with the cross-host runner. Consolidating it needs the ZCode acceptance to verify.pi. An import error in the others still surfaces in thetestsjob's e2e collection.pi-packagejob has not run this file yet.PiHostchange keeps its default, and this PR's routing selects that acceptance in CI.AI usage statement
This PR was prepared with Claude Code (Claude Opus 5.5). It traced the Pi extension lifecycle, wrote the test and CI wiring, ran the checks, mutations, and reviews, and drafted this description. I reviewed the changes and the results.