Skip to content

fix(windows): make CLI importable under Git Bash / MSYS - #2

Merged
jiangkoumo merged 4 commits into
jiangkoumo:mainfrom
qikairo7:fix/windows-esm-paths
Oct 20, 2026
Merged

jiangkoumo merged 4 commits into
jiangkoumo:mainfrom
qikairo7:fix/windows-esm-paths

Conversation

@qikairo7

Copy link
Copy Markdown
Contributor

问题

CLI 把 shell 解析出的引擎路径直接交给 Node 的 ESM 加载器。Windows(Git Bash / MSYS / Cygwin)下该路径是 /c/...,await import("/c/...") 会抛 ERR_UNSUPPORTED_ESM_URL_SCHEME —— c: 被当成 URL 协议名。

由于这几处调用都把 stderr 重定向到 /dev/null,真实错误被吞掉,症状表现为:

错误: 未找到 Jev 凭证。写入 ~/.config/typesafe/api_key …
exit 3

而凭证文件其实存在且有效(curl 直连 api.typesafe.ai/v1/systemone 返回 200)。这条误诊线索具有很强的误导性——排查时很容易先去怀疑凭证链。

同一类问题还出现在临时目录上:mktemp -d 返回 /c/tmp/xxx,ego 的内嵌 node 把同一串解析成 C:\tmp\xxx,于是父进程写好的 config.json 在子进程里读不到:

Error: ENOENT: no such file or directory, open 'C:\tmp\ego-decision-layer.xxx\config.json'

改动

  1. 新增 _lib_to_url():只为 import() 派生 file:// URL,文件存在性检查仍用真实路径。覆盖 /c/x、C:/x、已是 file:// 的输入(幂等)、反斜杠归一化;POSIX 行为完全不变。
  2. 四处 import() 调用点全部改走 LIB_URL(凭证前置检查、抽取 schema 校验、抽取 model 校验、主 heredoc)。
  3. $TMPD 在 MSYS/Cygwin 下经 cygpath -m 转换,使 bash 与内嵌 node 解析到同一个文件。
  4. 新增 bench/test-windows-paths.mjs:断言所有 import() 点都用 LIB_URL,并用 stub 掉的 uname 跑一遍路径转换表——这样跑在 Linux/macOS 上的 CI 也能覆盖 Windows 分支,不会因为宿主不同而永远测不到。

验证

环境:Windows 11 + ego lite 0.6.0.16(Cygwin/MSYS bash)、Node v24.20.0。

node bench/test-windows-paths.mjs
结果: 13 通过 / 0 失败        # exit 0

端到端,README 里那条验证命令:

退出码 结果
修复前 3 未找到 Jev 凭证(误报,key 有效)
修复后 0 success: true, reason: jev_done, 落到 /wiki/Jev

另外确认路由接管不受影响:wire-agent-skills.sh --check exit 0(接管 2 / 无需 3 / 漂移 0)。

范围

只动 scripts/ego-decision-layer 与新增测试文件。没有触碰 app 包内任何内容,也没有改变 Linux/macOS 下的路径解析结果。

附注(与本 PR 无关,供参考)

bench/test-offline-e2e.mjs 与 bench/test-*.mjs 里 import(ROOT + "/bench/lib.mjs") 的写法在 Windows 上同样会失败(ROOT 是 /c/...),那一批脚本需要各自传 file:// 或用 pathToFileURL。如果你们希望一并处理,我可以另开一个 PR 专门收敛 bench 层的路径处理。

The CLI passed the shell-resolved engine path straight to Node's ESM
loader. On Windows that path is `/c/...`, so `await import("/c/...")`
throws ERR_UNSUPPORTED_ESM_URL_SCHEME because `c:` is parsed as a URL
protocol. Every such call site redirects stderr to /dev/null, so the
failure surfaced as "未找到 Jev 凭证 (exit 3)" even when the key file was
present and valid — a very expensive misdiagnosis.

Same class of bug on the temp directory: `mktemp -d` returns `/c/tmp/x`,
which ego's embedded node resolves to `C:\tmp\x`, so config.json written
by the parent was invisible to the child.

Changes:
- add _lib_to_url(): derives a file:// URL for import() only, leaving
  the real path for [ -f ] checks. Handles /c/x, C:/x, already-file://
  input (idempotent), and backslash normalization; POSIX is unchanged.
- route all four import() call sites through LIB_URL.
- convert $TMPD with `cygpath -m` on MSYS/Cygwin so both bash and the
  embedded node resolve the same file.
- add bench/test-windows-paths.mjs: asserts every import() site uses
  LIB_URL and exercises the conversion table with a stubbed uname, so
  the Windows branches are covered on CI running Linux/macOS too.

Verified on Windows 11 + ego lite 0.6.0.16 (Cygwin/MSYS bash):
before, the README verification command exited 3 with "no credentials";
after, it exits 0 with success:true and jev_done.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T22:30:28.949597Z 131a01f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1f8215f2a2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ego-decision-layer Outdated
file://*) printf '%s' "$p"; return 0 ;; # 调用方已给 URL,原样用
esac
case "$(uname -s 2>/dev/null)" in
MINGW*|MSBUILD*|CYGWIN*)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Match the actual MSYS uname prefix

When this runs in a native MSYS shell, uname -s reports MSYS_NT-*, so this selector falls through because MSBUILD* is a different prefix; the same typo is repeated in the temporary-directory selector at lines 379-380. In that environment neither LIB_URL nor TMPD is converted, leaving both Windows failures this change is intended to fix, so both selectors need to match MSYS*.

Useful? React with 👍 / 👎.

Comment thread scripts/ego-decision-layer Outdated
MINGW*|MSBUILD*|CYGWIN*)
# /c/x → C:/x(盘符大写);已有盘符的不动
case "$p" in
/[A-Za-z]/*) p="$(printf '%s' "${p:1:1}" | tr '[:lower:]' '[:upper:]'):${p:2}" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Convert Cygwin's default cygdrive paths

On a default Cygwin installation, SCRIPT_DIR and LIB use /cygdrive/c/..., but this rewrite only handles the /c/... form. Although the outer branch recognizes CYGWIN*, the resulting URL becomes file:////cygdrive/c/..., which native Windows Node does not map to the C: drive, so every engine import still fails; convert the path with cygpath -m or explicitly handle /cygdrive/<drive>/....

Useful? React with 👍 / 👎.

Comment thread scripts/ego-decision-layer Outdated
/[A-Za-z]/*) p="$(printf '%s' "${p:1:1}" | tr '[:lower:]' '[:upper:]'):${p:2}" ;;
esac
p="${p//\\//}"
printf 'file:///%s' "$p"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Encode reserved characters when forming file URLs

For a valid Windows install path containing # or % (for example C:/work#1/...), concatenating the raw path emits a URL such as file:///C:/work#1/...; Node interprets #1/... as a fragment (and malformed percent escapes also fail), so the engine exists but the preflight import reports a credential error. Use a URL-aware conversion such as pathToFileURL rather than assembling the file URL as text.

Useful? React with 👍 / 👎.

//
// 做法:不重实现一遍 shell 逻辑,而是把 CLI 里的 _lib_to_url 抽出来写进临时脚本执行,
// 这样测试与实现不会各自漂移。所有 Windows 用例都显式固定 uname 分支,
// 保证在 Linux / macOS 上跑也能覆盖 Windows 路径(否则这些分支永远测不到)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Execute the new Windows-path regression test in CI

The test claims Linux/macOS CI will exercise the Windows branches, but the unit-test step in .github/workflows/ci.yml lines 47-53 never invokes bench/test-windows-paths.mjs; the earlier loop only runs node --check, which does not execute these assertions. As a result, regressions such as an incorrect OS pattern pass every push and PR despite this test being offline and dependency-free.

Useful? React with 👍 / 👎.

Four findings from the automated review, all verified and fixed:

1. P1 — `MSBUILD*` was a typo for `MSYS*`. Native MSYS reports
   `MSYS_NT-*`, so on a real MSYS shell neither LIB_URL nor TMPD was
   converted and both original Windows failures remained. This machine
   happens to report `MINGW64_NT`, which is why the bug did not show up
   in my own testing.

2. P1 — default Cygwin mounts use `/cygdrive/c/...`, which the
   `/[A-Za-z]/*` rule never matched, producing
   `file:////cygdrive/c/...`. Now normalized explicitly. Note cygpath
   cannot be trusted alone here: on a Git Bash host without a
   /cygdrive mount it treats the path as relative and prepends cwd
   (observed: it produced `<bash-root>/cygdrive/c/...`), so the
   cygdrive prefix is rewritten before cygpath runs.

3. P2 — building the URL by string concatenation broke paths
   containing `#`, `%`, spaces or non-ASCII (a user directory like
   `C:/work#1` became a URL with a fragment, losing the real path).
   Now delegated to `node:url` pathToFileURL, which encodes per spec
   (verified against a CJK path). A manual percent-escape fallback
   remains for the case where node is not on PATH.

4. P2 — the new test was never executed by CI: the workflow lists
   test files explicitly and had no `node --check`-only coverage for
   this one, so it was dead weight. Added to the unit-test step.

Tests: 19 assertions, 19 pass / 0 fail (was 13). New cases cover the
MSYS_NT prefix, /cygdrive/c/..., `#`, spaces, and a CJK path. The
cygdrive and encoding cases are the ones that actually caught two of
these bugs.

End-to-end unchanged: exit 0, success:true, jev_done.
@qikairo7

Copy link
Copy Markdown
Contributor Author

Thanks — all four findings were correct. Verified each against the actual code, fixed all of them in 5c1cf53.

P1 MSBUILD* typo — Confirmed real bug. Native MSYS reports MSYS_NT-*, so on a genuine MSYS shell neither LIB_URL nor TMPD would have been converted and both original failures would have survived. This machine reports MINGW64_NT, which is exactly why my own testing missed it. Both selectors now match MSYS*.

P1 /cygdrive/c/... — Confirmed. Added explicit /cygdrive/<drive>/ normalization. Worth noting: cygpath alone is not a fix here. On a Git Bash host that has no /cygdrive mount, cygpath -m /cygdrive/c/x treats it as a relative path and prepends cwd — I observed it produce <bash-root>/cygdrive/c/Users/.... So the cygdrive prefix is rewritten before cygpath runs.

P2 URL encoding — Confirmed, and it is the more dangerous one since a valid install path like C:/work#1/... silently loses everything after #. Now uses pathToFileURL, with a manual percent-escape fallback only for the case where node is not on PATH. Added a CJK path case (/c/Users/张三/... → %E5%BC%A0%E4%B8%89) since Chinese usernames are common on Windows.

P2 test not run in CI — Confirmed and arguably the worst of the four: the workflow enumerates test files explicitly, so my new test was dead weight and a broken OS pattern would have passed CI green. Added to the unit-test step.

Tests went 13 → 19 assertions, all passing. The cygdrive and encoding cases each caught a real bug in my own code, so they were worth writing.

One thing I did not change: bench/test-offline-e2e.mjs and the other bench/test-*.mjs scripts still do import(ROOT + "/bench/lib.mjs") with a /c/... ROOT, which fails the same way on Windows. That's outside this PR's scope; happy to send a separate PR converting them to pathToFileURL if wanted.

@qikairo7

Copy link
Copy Markdown
Contributor Author

@codex review

Addressed all four findings in 5c1cf53. Tests went 13 → 19 assertions, all passing locally. Requesting a re-review of the new commit.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c1cf53e8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bench/test-windows-paths.mjs Outdated
if (fnMatch) {
const dir = mkdtempSync(join(tmpdir(), "ego-decision-layer-winpath-"));
// 把 uname 换成可控桩:用 $FAKE_OS 固定分支,真实调用链不变
const stubbed = fnMatch[0].replace(/\$\(uname -s 2>\/dev\/null\)/g, '"${FAKE_OS:-$(uname -s 2>/dev/null)}"');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Simulate Windows URL semantics in the cross-platform test

On the workflow's ubuntu-latest runner, replacing only uname enters the Windows branch while the spawned node still applies POSIX pathToFileURL semantics, so C:/Users/... becomes file:///workspace/ego-decision-layer/C:/Users/.... I ran node bench/test-windows-paths.mjs in this environment and it reports 11 passing / 8 failing; because .github/workflows/ci.yml:54 now executes this test, every push and PR job fails until the conversion is made host-independent or the probe also stubs the Node platform behavior.

Useful? React with 👍 / 👎.

The previous commit delegated URL encoding to `node:url` pathToFileURL.
That function resolves paths using the *host platform* semantics, so on
the ubuntu-latest CI runner `C:/Users/...` is treated as a relative path
and becomes `file:///home/runner/work/.../C:/Users/...`. Combined with
the previous commit wiring the test into CI, that would have failed
every push.

Now the encoding is a pure string transform: percent-encode anything
outside the URL path safe set, leave the rest alone. The input is
already normalized to `C:/...` before this point, so the result no
longer depends on which OS node runs on.

Verified the exact failure mode reported in review:
  pathToFileURL, posix host → file:///home/runner/work/repo/repo/C:/...
  string encode,  any host  → file:///C:/Users/someuser/x.mjs

Tests: 19/19 passing. End-to-end unchanged (exit 0, jev_done).
@qikairo7

Copy link
Copy Markdown
Contributor Author

Good catch on round 2. Three of the four P1/P2 items from round 1 were already addressed in 5c1cf53; the fifth finding is new and it was a genuine regression I introduced — fixed in 131a01f.

Re: pathToFileURL breaks on the ubuntu runner — Confirmed and it was my bug. You're right that the probe only stubbed uname while encoding still ran through the host's pathToFileURL, so on Linux C:/Users/... was resolved as a relative path and prefixed with cwd. I reproduced the exact shape:

pathToFileURL, posix host → file:///home/runner/work/repo/repo/C:/Users/someuser/x.mjs
string-encode,  any host  → file:///C:/Users/someuser/x.mjs

And because 5c1cf53 also wired this test into .github/workflows/ci.yml, it would have red-lined every push — which is worse than the original bug.

Fix: dropped pathToFileURL entirely. Encoding is now a pure string transform (encodeURIComponent over anything outside the URL path safe set). The path is already normalized to C:/... beforehand, so the output no longer depends on the host OS. Node is still used, but only as a text encoder, never as a path resolver.

To be clear about the other three, since they reappear in this round's list — their line numbers now point at 5c1cf53, which already contains the fixes:

  • MSBUILD* → now MSYS* (both selectors), with a test case using MSYS_NT-10.0-19045
  • /cygdrive/c/... → normalized explicitly before cygpath, because on a Git Bash host without a /cygdrive mount, cygpath -m /cygdrive/c/x treats it as relative and prepends cwd
  • test not run in CI → added to the unit-test step

Current state: 19/19 assertions pass, end-to-end exits 0 with jev_done.

One honest limitation worth flagging: I have no Linux host here (no WSL, no docker), so I verified the platform-independence by reproducing the posix pathToFileURL semantics in isolation rather than by running the suite on Linux. If you can see the CI run for 131a01f, that's the real confirmation.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 131a01f341

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/ego-decision-layer Outdated
# Windows(Git Bash / MSYS)下 mktemp 给的是 /c/tmp/...,而 ego 的内嵌 node 会把同一串解析成
# C:\tmp\...,父进程写好的 config.json 在子进程里就找不到了。转成混合路径(C:/tmp/...)两边都认。
case "$(uname -s 2>/dev/null)" in
MINGW*|MSYS*|CYGWIN*) TMPD="$(cygpath -m "$TMPD" 2>/dev/null || printf '%s' "$TMPD")" ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Convert the cache path before entering the child runtime

On Git Bash/MSYS/Cygwin when the default cache is enabled, this converts only TMPD; JEV_CACHE_FILE is still populated below from $HOME/.config/... (typically /c/Users/... or /home/...) and serialized as cfg.cacheFile. The embedded Windows Node resolves that to the wrong drive-root path, and ActionCache.load()/save() swallow the resulting filesystem errors, so Windows runs silently lose the default persistent action cache (or write it under the wrong root); convert this child-visible path with cygpath -m as well.

Useful? React with 👍 / 👎.

Comment thread scripts/ego-decision-layer Outdated
href="$(node -e '
const p = process.argv[1];
// 保留 URL 路径中合法的字符(含盘符冒号与分隔斜杠),其余按 UTF-8 百分号编码
process.stdout.write("file:///" + p.replace(/[^A-Za-z0-9\/._~:@!$&()*+,;=-]/gu, (c) => encodeURIComponent(c)));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the UNC authority when building file URLs

When the skill or repository is installed on a UNC share, cygpath -m leaves LIB in the form //server/share/..., but this unconditional prefix produces file://///server/share/... with an empty URL host. Windows Node rejects that form as an invalid absolute file URL, so all engine imports still fail for network-share installs; detect the leading //host/share form and emit file://host/share/... while encoding the path components.

Useful? React with 👍 / 👎.

Share Windows runtime path normalization between engine imports, temporary
configuration files and persistent action caches. Preserve UNC server names
when encoding file URLs, and pass encoder input through the environment to
avoid MSYS argument conversion.

Extend path regression coverage from 19 to 36 checks, including UNC paths,
Cygwin home mounts, cache overrides and reserved characters. Fix the existing
shell-variable comment check so the full offline CI unit suite passes.
@jiangkoumo

Copy link
Copy Markdown
Owner

Thanks for the contribution and the Windows testing so far! I've pushed the remaining cache-path and UNC fixes in 01d8fc6, and the Ubuntu CI is now passing. The expanded path regression suite also passes all 36 checks locally.

I don't have a Windows environment available, so I can't independently verify the latest changes on Windows. Could you please pull the latest fix/windows-esm-paths branch and help test it on your Windows setup?

Please check:

  • node bench/test-windows-paths.mjs passes.
  • The Wikipedia CLI smoke test still completes successfully with the default cache enabled.
  • The persistent cache is created/reused at the intended location, and an EGO_JEV_CACHE_FILE override also works.
  • If you have access to a UNC share, an install/engine path under //server/share/... imports successfully. If not, just note that this case remains covered by the regression tests only.

Please include the shell/Node/ego versions and the commands, exit codes, and results (without credentials). Once you've confirmed the latest changes work on Windows, we'll merge this PR.

@qikairo7

qikairo7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

在 Windows 上测了 01d8fc6。你列的四项都通过,只有 UNC 的端到端用例没能跑,原因和证据在下面。

环境

Windows 11 (MINGW64_NT-10.0-26300)
bash    GNU bash 5.3.15(2)-release (x86_64-pc-cygwin)
node    v24.20.0
ego     ego-browser 0.6.0.16 (chromium 154.0.8037.44)

1. 路径回归测试:通过

$ node bench/test-windows-paths.mjs
结果: 36 通过 / 0 失败
exit 0

包含新增的 UNC、Cygwin home 挂载、缓存覆盖和保留字符用例。

2. Wikipedia CLI 冒烟测试(默认缓存):通过

$ ego-decision-layer --url "https://www.wikipedia.org/" \
    --text "Jev" --until "/wiki/Jev" --steps 6 "在搜索框输入 Jev 并提交"
exit 0
"success": true, "reason": "jev_done"
"url": "https://zh.wikipedia.org/wiki/Special:Search?search=Jev&go=Go"
服务端模型: jev-1.13.0 | 端点 https://api.typesafe.ai/v1

这里用 --until 加 www.wikipedia.org,没有照 README 里的 en.wikipedia.org/wiki/Main_Page。那个页面的搜索框实测 0×0,引擎按可见性规则跳过了它,所以不论有没有这次改动,循环都会以 max_steps_reached 结束。www.wikipedia.org 是可靠目标,仓库自己的已知限制一节也是这么写的。提一句,免得把 README 的示例当成 Windows 回归。

3. 缓存位置、复用与覆盖:通过

默认路径是 C:\Users\<user>\.config\ego-decision-layer\action-cache.json。

检查项 结果
首次运行创建 是,6 条
删除后下次运行重建 是,重建时 cacheHits: 0
第二次运行复用 是,cacheHits: 1,动作缓存: 命中 1 次 (无模型请求, decision 0ms)
EGO_JEV_CACHE_FILE 覆盖 是,文件在覆盖路径生成
覆盖不影响默认缓存 是,默认文件 mtime 全程未变(运行前后都是 1792463170),覆盖文件 mtime 有更新

4. UNC:逻辑已验证,端到端未执行

本机没有可达的网络共享。C$ 共享存在,LanmanServer 在运行,但在这个会话里文件系统访问不到:

Test-Path \\127.0.0.1\C$\Users\...\scripts       -> False
Test-Path \\192.168.0.22\C$\Users\...\scripts    -> False
Test-Path \\localhost\C$\Users\...\scripts       -> False

所以我在隔离环境里验证转换链,没有把它算作通过:

_lib_to_url "//server/share/lib/decider-loop.mjs"  -> file://server/share/lib/decider-loop.mjs
_lib_to_url "//server/share/dir#1/x.mjs"           -> file://server/share/dir%231/x.mjs
_lib_to_url "//server/share/my dir/x.mjs"          -> file://server/share/my%20dir/x.mjs
node -e 'fileURLToPath("file://server/share/lib/x.mjs")' -> \\server\share\lib\x.mjs

服务器名作为 URL authority 保留下来,Node 能把它映射回 UNC 路径。编码器还会拒绝非法 host(!/^[A-Za-z0-9._-]+$/ → exit 1),畸形共享因此落到手工分支,不会产出看似合理的错误 URL,我没有找到反例。

按你说的,这一项请视为仅由回归测试覆盖。

另外检查

$ ego-decision-layer --route-status            exit 0
$ bash scripts/wire-agent-skills.sh --check    exit 0   (已接管 2 / 无需接管 3 / 漂移 0)

拉取 01d8fc6 后两项都正常。上面所有输出都不含凭证。

关于你的改动:把编码器入参从 argv[1] 改成 EGO_FILE_URL_PATH 是对的。MSYS 会改写看起来像路径的命令行参数,共享路径恰好是它最容易改坏的形状。我之前没撞上,是因为测试输入从没离开过 shell。

@jiangkoumo
jiangkoumo merged commit 76ee335 into jiangkoumo:main Oct 20, 2026
1 check passed
@jiangkoumo

Copy link
Copy Markdown
Owner

感谢你的贡献!也特别感谢你耐心跟进几轮审查,并在 Windows 真机上补齐路径回归、默认缓存复用和自定义缓存位置的验证,帮助我们覆盖了本地没有的环境。UNC 端到端尚未验证的限制也说明得很清楚。PR 已合并,本地也已同步。谢谢这次细致、扎实的修复与测试!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants