refactor(core): enforce internal root-barrel boundary - #8139
Closed
yiliang114 wants to merge 5 commits into
Closed
Conversation
yiliang114
force-pushed
the
lane3-core-root-barrel
branch
from
August 12, 2026 09:28
b22ade4 to
b423e20
Compare
Contributor
|
Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. 中文请勿对活跃的 PR 执行 rebase 或 force-push,因为这会使已有的评审评论失效。另外,供日后参考:作为集成流程的一部分,机器人始终会自动将所有改动压缩(squash)为单个提交。 |
yiliang114
force-pushed
the
lane3-core-root-barrel
branch
from
August 12, 2026 09:43
b423e20 to
cfcba64
Compare
yiliang114
force-pushed
the
lane3-core-root-barrel
branch
from
August 12, 2026 10:20
43526ed to
cfcba64
Compare
The root-barrel boundary rule moved extensionManager's telemetry imports
from '../index.js' to '../telemetry/loggers.js'. The test's
vi.mock('../telemetry/loggers.js') only returned Enable + UpdateEvent,
so InstallEvent/Uninstall/Disable threw 'No export is defined' under
vitest's strict mock resolution. Add the three missing keys.
yiliang114
force-pushed
the
lane3-core-root-barrel
branch
from
August 12, 2026 11:41
cfcba64 to
9601779
Compare
Collaborator
Author
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.
Summary
Motivation
Root-barrel self-imports couple internal modules to the aggregate public entrypoint and can create avoidable loading cycles. Direct owner imports make dependency ownership explicit without changing downstream exports.
Closes #4063
Verification
npm ci --ignore-scriptsnpx vitest run --config ./scripts/tests/vitest.config.ts scripts/tests/no-core-root-barrel-import.test.js(5 passed)npm run typecheck --workspace=@qwen-code/qwen-code-corenpm run build --workspace=@qwen-code/qwen-code-coreReviewer behavior plan
Reviewers can add a direct
../index.js/deeper equivalent to a core production module and run the focused rule test or ESLint; the rule reports the import while allowing tests, fixtures, and cross-package consumers.