Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

docs: state the fake-IP branch's real coverage and its connect-time resolution

vastsad1a411d368a2
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 31d8ec9c6..1af3310cc 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -48,6 +48,8 @@
fake-IP option enabled, a URL response resolved to Clash's benchmark range
is downloaded through the proxy-aware transport; without the option it stays
`IMAGE_UNSAFE_URL`, and real private addresses remain blocked in both cases.
+ Covered by `packages/agent-runtime/src/image-generation/download.test.ts`,
+ not by the driver below.
- **Status:** Automated in `node scripts/e2e-image-chat.mjs`; optional screenshots
use `PI_IMAGE_CHAT_EVIDENCE_DIR`. The images are deterministic raster fixtures,
not evidence of real-model quality or provider compatibility.
diff --git a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
index 2c29454a2..485584c82 100644
--- a/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/zh-CN/spec/06-delivery/04-e2e-test-plan.md
@@ -8391,7 +8391,8 @@ the latest destination. These assertions measure work counts, not device FPS.
provider account/live compatibility certification.
- **Proxy fake-IP:** 明确开启“设置 → 通用 → 网络”的代理 fake-IP 选项后,解析
到 Clash 基准测试段的图片 URL 会通过代理感知传输下载;未开启时仍返回
- `IMAGE_UNSAFE_URL`,真实私网地址在两种情况下都继续阻止。
+ `IMAGE_UNSAFE_URL`,真实私网地址在两种情况下都继续阻止。该行为由
+ `packages/agent-runtime/src/image-generation/download.test.ts` 覆盖,不由下面的驱动脚本覆盖。
- **Status:** Automated in `node scripts/e2e-image-chat.mjs`; optional screenshots
use `PI_IMAGE_CHAT_EVIDENCE_DIR`. The images are deterministic raster fixtures,
not evidence of real-model quality or provider compatibility.
diff --git a/packages/agent-runtime/src/image-generation/download.ts b/packages/agent-runtime/src/image-generation/download.ts
index 8f1d2846c..de33ad22b 100644
--- a/packages/agent-runtime/src/image-generation/download.ts
+++ b/packages/agent-runtime/src/image-generation/download.ts
@@ -67,7 +67,11 @@ export function publicImageAddress(address: string): boolean {
return false;
}
-/** Pin the checked DNS answer to the connection; never forward provider headers. */
+/**
+ * Pin the checked DNS answer to the connection; never forward provider headers.
+ * An explicitly opted-in fake-IP answer is the one exception: it goes through the
+ * global fetch instead, which resolves the hostname again at connect time.
+ */
export async function downloadGeneratedImage(
raw: string,
signal: AbortSignal,