Repository navigation
Conversation
hidb4ai
left a comment
There was a problem hiding this comment.
Required validation is incomplete on 8843189: the Python 3.14 unit job returned HTTP 503 instead of 200 in test_dream_failure_diagnostics_reach_the_api_and_drawer, and the selected upgrade acceptance workflow was skipped. The isolated failing case passes locally on both the base runtime and this head, so its full-suite failure remains unexplained. Please investigate that failure and complete the required checks on the current merge result before merging.
frf12
left a comment
There was a problem hiding this comment.
Author/code-owner feedback for 8843189: as the PR author and a code owner of the affected server code, I support the deferred runtime imports and the corresponding test updates.
This records my agreement as an author comment; it is not an additional independent approving review. Outstanding CI checks still need to complete or receive a separately documented disposition before merge.
|
The affected modules are Core. @hidb4ai, please coordinate follow-up. Core: @hidb4ai @frf12 @Fengzdadi @beatenevo. Please coordinate the review of the affected changes. |
Which issue or RFC does this PR close?
Related to #3012's Windows CI investigation. This is a separate fix for a pre-existing CLI startup problem; it does not close that PR.
Rationale for this change
Offline ownership commands import the Server command provider during CLI discovery. That eagerly loaded the HTTP/MCP application and telemetry runtime even when no service would start. On native Windows, the existing candidate ownership regression exceeded its unchanged 30-second child-process timeout; a passing diagnostic replay still spent about 27.5 seconds in that child, with startup stacks reaching the telemetry imports at 20 seconds.
What changes are included in this PR?
Load the server factory, logging and tracing when starting the configured service, and background runtime dependencies when starting the background worker. Offline commands and help avoid that work. Existing service tests now patch the dependencies at their owning modules. Replace an eager-import-order assertion with checks that incomplete or incompatible Server dependencies keep both Server command providers unavailable while core CLI commands remain usable.
Are there any user-facing changes?
Faster CLI startup for offline operations. Command arguments, output, ownership checks, dependency versions, test deadlines, and runner configuration are unchanged.
How was this change tested?
Native Windows Server 2025, Python 3.12.10, the original feat(docker): default server images to embedded seekdb #3012 tested merge
fc7c0ee5cab83a47fbdb651d52f42a76e3626209, with only this CLI patch applied: the original 22 offline ownership tests all passed. The formerly failingcli-Truecase then passed in two separate pytest processes. Its child processes took 14.6 and 16.1 seconds, below the unchanged 30-second timeout.Same-VM unprofiled command-help comparison: 22.35 seconds before, 14.23 seconds after; help output was identical. Import profiling runs are excluded from these timings.
The CLI source before this patch is byte-identical between that original merge and this PR base
eb0a35498dfa96ea9d029d4490b779b5dec2b21d. Native checks validate the original regression plus this patch; they do not establish that the entire original hosted Windows job, including its seven skipped later steps, passes.Current-base focused suites:
tests/test_cli.py,tests/test_docs_remote_access_contract.py,tests/test_docker_contract.py,tests/test_background_metrics.py,tests/test_metrics_merge.py, andtests/builtin/runtime/test_artifact_processing_config.py: 170 passed.tests/e2e/test_server_cli.pyandtests/e2e/test_candidate_ownership_migration.py: 6 passed.uv run --no-sync prek run -aand focusedty check: passed.Background startup and metrics suites (
test_managed_startup_read_consistency.py,test_background_startup_admission.py,test_background_metrics.py,test_metrics_merge.py): 41 passed, 6 native-backend cases skipped because those backends were not enabled. The two stale E2E monkeypatch targets were reproduced failing before the correction; both now patch the defining module without changing their assertions.AI usage statement
Implemented and validated with OpenAI Codex.