fix(python): 账号覆盖文件不被沙箱重建覆盖;storePath 统一沙箱 configs(submodule → jetbrains#7) - #13
Merged
Merged
Conversation
配套 jetbrains PR #7(多账户编辑)。此前执行器每次启动 copytree 会把 项目侧的 account_scoped_overrides.json 整体拷进沙箱,覆盖掉插件账号 编辑刚写入沙箱的值——编辑被旧文件冲掉。 - run_executor.py:copytree 用 ignore 回调把账号文件排除在外,改由 copy_account_file_once 仅在沙箱没有该文件时一次性拷入(临时文件 + 硬链接/排他创建发布,防并发覆盖或暴露半写入文件) - account_store.py:新增 initialize_sandbox_account_file——账号编辑 首次落沙箱前,若沙箱无账号文件则从项目声明的 config_folder(AST 解析 config.py 读取,与 probe 规则一致)初始化;新增 ast/shutil/ tempfile 导入与 project_dir 绝对化 - probe_task_schemas.py:collect_multi_account 的 storePath 一律报沙箱 configs/ 路径(不再用自定义 config_folder 拼接,与执行器沙箱布局 对齐);info 默认补 accountCount/overrideAccounts/overriddenTasks 键, 非 dict 数据可读性判定修正 - 测试断言同步更新
指向 feat/jb-parity-task-config-accounts(651278d):showInTaskTab 过滤、全局配置编辑、多账户编辑、显式路径校验、CI 打包修复。 合并顺序:先 jetbrains#7,再本 PR。
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
背景
主仓/子仓功能对称审计(2026-09-25)中「多账户」一项的关键读写冲突:子仓 JetBrains 插件接入账号编辑后,编辑写入沙箱
configs/account_scoped_overrides.json,但run_executor.py每次启动的 copytree 会把项目侧旧文件整体拷进沙箱覆盖用户编辑。本 PR 修复该冲突并统一 probe 的 storePath 语义。配套 PR:AliceJump/ok-script-toolkit-jetbrains#7(子仓 Kotlin 侧)。submodule 指针指向其分支 head,合并顺序:先 jetbrains#7,再本 PR。
提交分解
1. fix(python): 账号覆盖文件不再被沙箱重建覆盖;storePath 统一沙箱 configs
account_scoped_overrides.json,改由copy_account_file_once仅在沙箱没有该文件时一次性拷入(临时文件 + 硬链接/排他创建发布,防并发覆盖或暴露半写入文件)initialize_sandbox_account_file——账号编辑首次落沙箱前,若沙箱无账号文件则从项目声明的config_folder(AST 解析 config.py 读取,与 probe 规则一致)初始化storePath一律报沙箱configs/路径(不再用自定义 config_folder 拼接,与执行器沙箱布局对齐);info 默认补accountCount/overrideAccounts/overriddenTasks,非 dict 数据的可读性判定修正2. chore(submodule): jetbrains 指向 jb-parity 分支
feat/jb-parity-task-config-accounts(651278d)验证
test_probe_multi_account_path.py[4b] 段为既有环境敏感问题(os.path.relpath跨 C:/D: 盘符抛 ValueError,该行来自 2026-09-23 a15310f,本 PR 未触碰;Linux CI 无此问题)test_probe_multi_account_path.py中与 storePath 语义相关的 [5][6] 段均通过