Repository navigation
feat: freeze dual-edition contract and add gated Basic policy core - #1
Merged
Merged
Conversation
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.
本 PR 完成双版本架构 Phase 0 到 1b:冻结 Basic / Professional 合同、可复用且无副作用的 Basic 策略核心、真实 Windows 快捷方式与磁盘适配器,以及默认关闭的入口开关。这是后续启动入口、数据目录隔离和 Basic 专用导出 runner 之前的可审查检查点。
改动 / What changed
docs/dual-edition-phase0-contract.md,合成夹具位于tools/fixtures/dual_edition_phase0/,测试为tools/check_dual_edition_contract_smoke.py。合同已文档化并经过测试,但还不是默认产品路径。shared/basic_policy.py会校验完整计划(含已禁用步骤),在反序列化前拒绝未知原始 JSON 字段,并通过可注入的文件系统、磁盘分类和 LNK 解析接口工作。测试:tools/check_basic_policy_phase1a_smoke.py。shared/platform/windows_shell_links.py:IShellLink / COM 解析器(不回退到os.startfile)shared/platform/windows_drives.py:用GetVolumePathNameW/GetDriveTypeW识别映射盘和远程卷shared/edition_policy.py:版本上下文;仅在上下文明确为basic时执行 Basic 校验RuntimeExecutor.run_plan(),以及build_single_file_exe()(在创建输出目录或查找 PyInstaller 之前)加入了门控钩子当前产品路径仍保持 Professional / 单一产品:未设置版本上下文时,Command、Wait、高级 App 配置、现有 LNK 的
shell_open行为、离线许可和当前导出授权都不变。本 PR 不包含以下后续工作:
LaunchFlow-Basic),且不探测、不迁移 Professional 数据EMBEDDED_TEMPLATE)检查 / How it was checked
在指定的 Miniconda 解释器上运行(
Python 3.13.9,PySide6 6.9.3,PyInstaller 6.20.0,cryptography 46.0.3):tools/check_dual_edition_contract_smoke.pytools/check_basic_policy_phase1a_smoke.pytools/check_basic_policy_phase1b_smoke.pypython -m compileall -q editor runtime shared tools licensing未调用 PyInstaller,未构建发布产物,也未接触真实许可证或 HWID。
工作区中与本次无关的本地改动(
.ai/、CHANGELOG.md以及部分既有文档)未纳入本 PR。English Summary
This PR lands Dual Edition Phases 0–1b: the frozen Basic/Professional contract, a side-effect-free Basic policy core, real Windows shortcut and drive adapters, and ingress hooks that stay off unless the edition context is explicitly
basic. The current Professional / single-product path is unchanged. Launch entries, Basic data-directory isolation, a Basic-only export runner, and a Professional export-authorization audit are left for follow-up branches. Checks ran on the specified Miniconda interpreter; PyInstaller, release assets, and live licenses/HWID were not touched.