Repository navigation
[PR] fix: register PUT /__bili/external-summary/credential so Web UI "Save Key" works (#3443) - #3445
ranxianglei wants to merge 2 commits into
Conversation
📦 Built Package ArtifactBranch: Option A — Install this exact build (recommended)npm install -g billion-context@0.0.4057-pr.3445.771633cThis exact version is immutable and reproducible. The rolling Option B — Download artifact
tar xzf billion-context-pr3445.tgz
npm install -g packageInstall instructions are refreshed on each push. |
|
(ai: zhipuai-lb/glm-5.3) 陈旧票清理(第三批动作①):目标 issue #3443 已关。为避免重复劳动关闭本 PR;如判断有误请直接 reopen 并留言。 |
|
Requesting a reopen: the fix is still needed on 0.1.213 (commit This PR was closed because #3443 had been closed for stale-ticket cleanup, not because the patch was superseded by another implementation — nothing equivalent appears to be in the router today. If reopening is not convenient, please at least correct the #3488 record that lists this sub-item as "already fixed by PR #3445". 中文:0.1.213 上该路由仍缺失,Web UI 仍在调用,详见 #3443 的复现与绕过办法。本次关闭的原因是「#3443 已关」,而不是补丁被别的实现取代;若不便 reopen,也建议更正 #3488 里「已由 PR #3445 修复」的记录。 |
(ai: vllm-qwen/qwen3.8-27b)
Closes #3443
What
The Web UI "Save Key" button sends
PUT /__bili/external-summary/credential, which was never registered on the router → permanent 404 (no such management endpoint). External-summary credentials could only be saved by hand-writing<config>.summary-credentials.json.Root cause (git forensics)
bcf40118d(external summary feature) added the route inline insrc/server.ts.273c83945(refactor: extract the /__bili + /__acp admin route surface intosrc/server/admin.ts, audit: 全仓冗余审计与重构计划——server.ts 解体、客户端矩阵去重、死代码、AGENTS.md 模块图腐化 #1440 P2 cut 1) moved all admin routes out of server.ts.handleSummaryCredentialPutdirectly instead of going through the router, so CI stayed green.Affects master and every release since (including the reporter's 0.1.197).
Changes
src/server/admin.ts— registerPUT /__bili/external-summary/credentialinhandleAdminRoutenext to the config routes; inherits the same loopback + trusted-origin gates as the sibling admin paths (the gates sit above the registration).tests/web-routing.test.ts— regression test through the REAL proxy/router (startServer, port 0): malformed body → 400; save → 200{ok, configured:true}with no key echo and the private store file written;GET /__bili/configreflectssecret:<name>status; delete (key: null) →configured:false. Verified red without change 1 (404) and green with it.src/server.ts— drop the dead web-handler import left by the admin-route extraction (all nine symbols unused; same refactor-debris family). Separate labeled commit.Behavior change (old → new)
PUT /__bili/external-summary/credential: permanently 404 → working endpoint. Security posture UNCHANGED: loopback-source + trusted-origin gated exactly like every other/__bili/*admin path.Verification
npm run typecheckclean.tests/web-routing.test.ts9/9 (incl. the new test),tests/external-summary-settings.test.ts43/43. Full-suite verdict = remote CI on this head.