sync: WIN11-BOWEI 2026-09-02 新增 bmem 记忆 skill;imx6-flow/plan-review 文档与脚本更新

远端 pack 服务仍故障(git-upload-pack 返回 0008NAK 后截断),push 待服务器恢复。
未跟踪的 5 个归档临时副本(rtl-ip-replace / sim-rtl-flow / simulink_rtl_dev /
simulink-rtl-redev / zynq-imx6-flow)刻意不入库,待 pull 后由远端提供。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0135YszNe4pwwJxwaLqKTCKG
This commit is contained in:
Myfro9
2026-09-02 14:53:28 -05:00
co-authored by Claude Opus 5
parent 9c1012f5b8
commit bb71470e07
6 changed files with 582 additions and 4 deletions
+18 -1
View File
@@ -36,7 +36,24 @@ Use this skill to run the LangGraph plan-review workflow. All scripts are bundle
2. **codex 子进程要能到 chatgpt.com**。`clean_run.py` 会自动读 Windows 系统代理(HKCU Internet
Settings 的 `ProxyServer`)设进 `HTTP(S)_PROXY`,让 codex 走代理;也可用 `PLAN_REVIEW_PROXY` 覆盖。
3. **codex 超时**:`review_task.py` 的内层 codex 超时取 argv[5](默认 300s,评审常不够)。用
`--codex-review-command-b64` 传一条**末尾带超时秒数**的命令(见 Workflow),并把 `--timeout` 设一致。
`--codex-review-command-b64` 传一条**末尾带超时秒数**的命令(见 Workflow)。**`--timeout`(外层
agents.py 超时)必须明显大于内层值**(如内层 1500 / 外层 1800)——两者相等时外层会在 codex
正常收尾前把它杀掉,报 `subprocess.TimeoutExpired`(2026-08-26 踩坑)。
- **2026-08-26 踩坑补充**(三条都已实测):
1. **npm 最新版 codex 也可能太旧**:服务端 models 列表新增 `max` reasoning 档位后,npm 的
0.149.1 解析失败(`unknown variant 'max'`)直接退出。VS Code ChatGPT 扩展自带的 codex 更新
(如 `%USERPROFILE%\.vscode\extensions\openai.chatgpt-<最新版本号>-win32-x64\bin\windows-x86_64\codex.exe`,
0.150.0-alpha.8 可用)。`review_task.py` 支持 `CODEX_EXE` 环境变量指定该二进制,调用
`clean_run.py` 前 `$env:CODEX_EXE = "<扩展codex.exe路径>"` 即可(扩展目录版本号会随更新变化,
用 Get-ChildItem 找最新一个)。
2. **Windows elevated 沙箱挂起**:config.toml 有 `[windows] sandbox = "elevated"` 时,codex 在
ChatGPT 应用之外独立运行会让**每条 shell 命令挂起**,评审读不到文件(表现为评审意见说
"cannot open file")。`review_task.py` 已固定加 `-c sandbox_mode=read-only` 规避(评审只需读;
注意 `codex exec resume` 不认 `--sandbox` 旗标,只能用 `-c`)。
3. **UTF-8**:直接跑 `clean_run.py` 时先设 `$env:PYTHONUTF8='1'; $env:PYTHONIOENCODING='utf-8'`,
否则父进程按 cp1252 解码 codex 输出中的中文会 UnicodeDecodeError(旧 dev-server 路径由
run_langgraph.ps1 代设,clean_run 路径需要自己设)。
- **改了 `workflow.py`/`agents.py`/`clean_run.py` 后**:无 dev server 缓存,下次 `clean_run.py` 直接生效。
若图结构改到与旧 checkpoint 不兼容,删 `scripts\.plan_review_state.sqlite` 重新开始该 thread。
+8 -1
View File
@@ -121,7 +121,14 @@ def main() -> int:
os.close(fd)
last_message_path = Path(last_message_name)
try:
flags = ["--json", "--skip-git-repo-check", "--output-last-message", str(last_message_path)]
# read-only sandbox: review needs no writes, and on Windows the
# config.toml "elevated" sandbox hangs every shell command when codex
# runs outside the ChatGPT app (probed 2026-08-26). Use -c because
# "codex exec resume" does not accept the --sandbox flag.
# (unquoted value: fails TOML parse -> codex falls back to the raw
# string, which survives cmd /c quoting untouched)
flags = ["--json", "--skip-git-repo-check", "-c", "sandbox_mode=read-only",
"--output-last-message", str(last_message_path)]
if codex_session_id:
command_args = ["cmd", "/c", codex, "exec", "resume"] + flags + [codex_session_id, "-"]
else: