Repository navigation
fix(cli): detect the isolated core from installation metadata instead of an optional CLI probe - #8811
Closed
CharleoYang wants to merge 1 commit into
Closed
CharleoYang wants to merge 1 commit into
CharleoYang wants to merge 1 commit into
Conversation
Signed-off-by: Qi Yang <yangqi45@meituan.com>
CharleoYang
requested review from
huangruiteng,
loopx-agent and
songoow
as code owners
November 15, 2026 06:24
Author
|
Closing without merge: the owner directed that this work be published on the internal Sankuai remote (origin = ssh://git@git.sankuai.com/~yangqi45/loopx.git) and not on GitHub. The branch is pushed there; no GitHub PR is required. |
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.
Problem
Lightweight help for a selected command fails on hosts that do not provide the optional full CLI.
tests/capabilities/test_performance_diagnosis_cli.py::test_help_needs_no_runtime_or_optional_stackrefuses optional imports, subprocess and sockets;loopx/cli_runtime.py:329->_standalone_core()probedfind_spec("loopx.cli"), so--helpfailed before the parser ran.Root cause
_standalone_coreused an import probe as its source-provenance signal. On a source checkout the probe both imports an optional facade and misses when a foreign installation shadows it.Change
loopx/cli_runtime.py: standalone detection now uses the existing installation-metadata owner and requires the imported runtime file to be owned by that distribution's RECORD, so a wheel shadowed by source is not treated as the isolated core. Parsing, explicit routes and the missing-facade vs broken-dependency distinction are unchanged.tests/capabilities/test_performance_diagnosis_cli.py: kept the three RED cases; added--cli-binhelp/error ordering, metadata-ownership counterexamples, default/explicit routing and broken-inner-dependency controls.packages/loopx-core/README.md: documents the provenance rule.Evidence
uv run --extra test python -m pytest -q tests/capabilities/test_performance_diagnosis_cli.py tests/control_plane/test_cli_program_route.py-> 120 passed, 1 failed; the failure was a new test's own expectation (--cli-bin --helppredicted exit 2) andhelp_surface.py+ concise-help dispatch establish exit 0; that case then passed alone.LOOPX_CORE_TEST_PYTHON=... pytest -q tests/test_core_distribution.py -k 'identity_help_and_unavailable_workspace or generated_commands_keep_their_distribution'-> 3 passed, 0 skipped.Not covered
No single 121-case run and no full cumulative suite in this PR; independent review on this exact head is pending.