Conversation
eddiearc
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES / HOLD(Fable 5.1 审合)
症状对:#212 在 missing cwd 上会被伪装成 catalog/protocol 失败;probeNativeRuntimeReadiness 的 cwd guard 半边是好的。
Blocker:test/integration/setup/setup-cli.test.mjs 明确断言 setup.ts 不得引用 workspace-service|reconcileAgentWorkspace(host-shell 单一所有者边界)。本 PR 会踩红这条护栏;PR 体只跑了 unit,没跑这条 integration。
建议重做:保留 readiness cwd guard;setup 探测改用保证存在的目录(如 workspace 缺失时回退 CFG_DIR),或拿 Owner 书面批准后再改护栏。不要为了过测放松该边界。
b27459f to
0d335b9
Compare
|
按建议重做了,两点都照办:
验证(已 rebase 到含 #219/#227 的 main):
如果"回退 CFG_DIR + 单行提示"的形态还需要调整(例如提示文案、或希望干脆静默回退),说一声我改。 |
0d335b9 to
6e14d53
Compare
|
补充:main 合并 #215 后本 PR 出现冲突(#215 与这里都改了 冲突只在 readiness 测试文件,按"两边都保留"处理: |
Maintainer follow-up(Fable 5.1 + GPT-6 Astra 共识)这条 不按当前实现合。目标仍然成立(fresh setup 不该把 missing cwd 伪装成 catalog/protocol 失败),但 setup 直接调用 请改版,不要松护栏:
相关:#212。 |
|
收到。这条改版在 15:15 已经推上去了(head
补充时序以免混淆:14:02 那条 review 之后我先按"reconcile"改过一版;15:15 已按单一所有权边界重做为现在这版;15:38 又 rebase 掉了 #215 带来的冲突(冲突只在 readiness 测试文件,两边测试都保留)。如果你 16:20 这条是对着旧 head 写的、现在这版仍不合意,请指一个具体点我再改。 |
A fresh Agent's <root>/agents/<App ID> directory does not exist until the daemon's host-shell reconciles it, so the interactive runtime probe spawned the runtime in a missing cwd, failed with ENOENT, and surfaced as a catalog/protocol failure (eddiearc#212). Keep the readiness cwd guard, and give the probe a directory that is guaranteed to exist: fall back to the config root when the workspace is missing (with a one-line note). Workspace creation stays owned by the host-shell — setup imports no workspace-service. Bumps the package patch version (0.5.9 -> 0.5.10) per the Owner policy. Co-Authored-By: Claude Code <noreply@anthropic.com>
已按复审重做(head
|
6e14d53 to
1fc5457
Compare
What
Fresh installs have no
<root>/agents/<App ID>yet — the daemon's host-shell reconciles it at first start. The interactive setup probe spawned the runtime with that missing directory as its cwd, so the spawn failed with ENOENT and surfaced as a catalog/protocol failure (#212).Reworked after review: the probe now uses a directory that is guaranteed to exist — the Agent workspace when present, otherwise the config root (
CFG_DIR), with a one-line note when falling back. Workspace creation stays owned by the host-shell:setup.tsimports noworkspace-service/reconcileAgentWorkspace, so the single-owner boundary asserted bytest/integration/setup/setup-cli.test.mjsstays green. The readiness cwd guard is kept as the other half.Change
src/app/setup.ts:probeCwd = exists(workspaceDir) ? workspaceDir : CFG_DIR(+ note when falling back); the workspace-service import from the previous revision is gone.src/runtime/runtime-readiness.ts(kept):probeNativeRuntimeReadinessreports a missing working directory as its ownunavailablecause instead of letting the spawn ENOENT masquerade as a runtime/protocol failure.test/unit/runtime/runtime-readiness.test.mjs: covers the missing-workspace readiness result.Validation
bun test test/unit/setup/ test/unit/app/setup-cli.test.mjs test/integration/setup/→ 76 pass / 1 skip / 0 fail — including thesetup-cli.test.mjsboundary assertion the previous revision tripped.bun test test/unit/runtime/runtime-readiness.test.mjs→ 20 pass / 0 failbun run build✅ ·bun run typecheck✅main(now includes the merged fix(runtime): settle Pi RPC shutdown on close when the spawn itself failed #219 and test(integration): give build-performing tests an explicit timeout budget #227).Fixes #212
🤖 Generated with Claude Code