Repository navigation
fix: dsh settings panel pre-flights the embed route before framing (#3100) - #3117
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.3562-pr.3117.e7cbd7dThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3117.tgz
npm install -g packageInstall instructions are refreshed on each push. |
eaf66bc to
9267e56
Compare
(ai: vllm-qwen/qwen3.8-27b) PR #3117 独立审阅 —— 没照抄 issue 侧结论,把 head(9267e56) 的完整 diff 逐段读完并对照 master 改动前的实现核对了既有行为。代码与行为层面已审完:方向正确、无回归、测试有牙。 唯一还没落地的是 4 条全量 test lane 仍在跑,绿了我再给最终八问收工判定。 审了什么、怎么审
关键行为核对(对照 master 既有行为,逐项过回归)
测试有效性(质量关)
当前门禁状态(head 9267e56)
结论(暂)代码审查通过:修的是根因(新前端对着冻结旧服务端发只有新版才有的 query 路由 → 一次性预检区分「构建太老」和「网络没就绪」),不打症状补丁;无回归、无缓存破坏、无设计转向、无新配置(除已披露的挂载时序)。等 4 条 test lane 转绿我给最终八问判定 + 合并建议。 |
…3100) After a profile auto-update, the browser half of the dsh settings panel always runs the freshest on-disk code while the long-running proxy child keeps serving the build it booted with. Right after an update the new client frames /__bili/?embed=1&lang=... — a query-form route that only exists in servers >= v0.1.189 (#2321) — and a frozen older server answers it with a raw JSON 404 rendered inside the iframe ("no such management endpoint") while model proxying and compression keep working. - client: one-shot HTTP pre-flight to the exact embed URL per origin before mounting the frame. HTML answer => mount; any other answer => running build predates the route => bilingual restart-dsh notice instead (the backup button targets the bare /__bili/ form every build serves); network error => pending placeholder retried on the regular origin-poll ticks. Verdicts cache per origin for the page lifetime (a frozen process cannot gain routes mid-session). Panel gains connecting/stale states. - server: unknown-admin-path 404 carries the running version/commit plus best-effort diskVersion/stale from detectStaleInstall (local-only fs) so the skew is readable from the error itself. Message byte-identical for existing consumers. - tests: shared mountClient harness (fresh vm realm per mount) drives all panel scenarios; every block asserts the pending-first-paint contract; new #3100 regression pins stale-server notice, transient-failure recovery and verdict caching; admin-origin suite pins the enriched 404 body. Behavior changes (disclosed): the embedded frame now mounts only after the pre-flight verdict (<=1 loopback RTT on healthy hosts); previously it mounted as soon as an origin was known. Theme-flash guarantee (#2559) preserved: palette still sampled synchronously on first render. Unknown /__bili/* and /__acp/* 404 bodies gain additive fields (version, commit, diskVersion, stale) inside error; message unchanged. No config surface change, no kernel change, no wire change to model or compression paths.
9267e56 to
3050167
Compare
(ai: vllm-qwen/qwen3.8-27b) 更新:那 4 条 CI 为什么红:根因是基线过期,不是本 PR
我做了什么把 PR 分支 rebase 到当前 master 代码本身:结构化八问(独立审过 diff + 对照 master 现有实现)
行为变更披露(旧→新,同 PR 正文)
结论代码审查通过、无回归、无缓存破坏、无设计转向、无新配置;红 CI 纯属基线过期(master 上的 #3119 已修好),我已 rebase 清除。等 rebase 后的 test lane 转绿我给最终合并放行——预期必绿:master 在这 4 个 golden 上本就全绿,且 PR 与其零文件重叠。 |
(ai: vllm-qwen/qwen3.8-27b) 放行确认:rebase 后新 CI(head 最终状态
结论可以合并。 若想让我把分支再 rebase 到最新 master 让状态变 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.412-master.9db9cb1 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Closes #3100
What & why
After a profile auto-update, the dsh settings panel showed raw JSON (
no such management endpoint) inside its embedded frame while model proxying and compression kept working.Root cause: the profile bundle refreshes on DISK (0.1.187 → 0.1.196 in the report) while the long-running proxy child keeps serving the build it booted with (#1603 semantics — restarting the proxy means restarting the host). The browser half of the panel always runs the freshest on-disk code, so right after an update it frames
/__bili/?embed=1&lang=...— the query-form UI route that only exists in servers >= v0.1.189 (#2321) — and a frozen older server answers it with a 404 rendered verbatim inside the iframe. Old-client + new-server works (the route accepts both forms); new-client + old-server breaks — exactly the transient state after every auto-update until the host restarts.(The reported port move 18787 → 18796 is separate and by design: lane migration #1660/#1723; the client already follows the live origin, #2288.)
Changes
src/agent/dsh-native-client.ts) — probe the exact embed URL once per origin BEFORE mounting the frame:/__bili/form, which every build serves;src/server/admin.ts) — the unknown-admin-path 404 now carriesversion/commit(running) plus best-effortdiskVersion/stalefromdetectStaleInstall(local-only fs, cannot hang), so the skew is readable from the error itself instead of log archaeology.tests/dsh-settings-ui.test.ts: sharedmountClientharness (fresh vm realm per mount, React-semantics stubs) now drives every panel scenario; all blocks assert the pending-first-paint contract; new dsh admin UI returnsno such management endpointafter profile auto-update #3100 regression test pins stale-server notice, transient-failure recovery, and verdict caching.tests/admin-origin.test.ts: pins the enriched 404 body (message byte-identical).Behavior changes (old → new)
/__bili/*and/__acp/*404 bodies: message byte-identical; ADDITIVE fields insideerror:version,commit,diskVersion(omitted when unknown),stale.No config surface change. No kernel change. No wire change to model or compression paths.
Verification
Local targeted runs (full-suite verdict = CI on the pushed head):
npm run typecheck— greennode --import tsx --test tests/dsh-settings-ui.test.ts— 13/13 pass, clean exitnode --import tsx --test tests/dsh-settings-ui.test.ts tests/admin-origin.test.ts— 17/17 pass