Repository navigation
fix: add service-level GitHub route fallbacks - #482
Conversation
Only the generated bundle conflicted; sources merged cleanly. Rebuilt from the merged sources.
fkysly
left a comment
There was a problem hiding this comment.
收(CI 绿即合,合并冲突我已解——只有产物,源码干净,已用合并后源码重建)。
这个 PR 把 REIN 路线图里那条高优先级(#460)的每个要点都落对了,几处关键判断我逐一核过:
1. 按服务分路由,顺序用了 #460 的实测数据。 raw 走 proxy 优先(大陆对 raw 稳定超时),git/avatar 走直连优先(git 协议和 avatars 实测可用)。这比"一个开关全走代理"准确得多——干扰本来就是分服务的。
2. HTML 错误页判定是双保险。 git 广播要求 # service=git-upload-pack 前导 + 至少一条 ref 形状;README 检 content-type 和 doctype。公共反代最常见的失败形态(200 + 品牌错误页)两条路都接不住假数据。「Validate before remembering the route」这句注释点在要害上——污染路由记忆比单次失败糟得多。
3. 新的 githubProxy 持久化字段完整避开了 #454/#457 的两个坑:hasOwnProperty 区分「显式清除」和「未提及」,refreshMarketState 同步,双向都有测试。上周的教训被完整吸收了。
4. 边界保持正确:自定义前缀强制 https 且禁带凭据;DSHM_GITHUB_PROXY 仍然最高优先;Gist(带认证)不走代理;codeload/pnpm integrity 一概不碰。
5. 设置项是一个逃生舱而不是三个开关,与「下载区域」的原则一致。
1196 passed(合并后)。web-e2e 你本地跳过的原因(rc.2 宿主 + pnpm 9 缺 -w)是环境问题,CI 的真机通道会补上这个验证。
My mistake, twice over. The pipeline I used to roll PRs onto latest main ran `git merge || true; git add -A; git commit` — which, when #478's favorites genuinely conflicted with #482's githubProxy state in five files, committed the unresolved <<<<<<< markers instead of stopping. I then merged the PR while its branch CI was already red with TS1185 on every job, which is the exact partial-signal mistake this log has recorded twice before (#393, #416), this time against a solid red rather than a pending. Every conflict was additive — favorites and githubProxy both belong in the state shape, the writer, the refresh sync, the fake, and the client fetch stub — so the resolution is the union of both sides, plus the client import list and the pagination-reset dependency array carrying both features' keys. 56 files, 1229 tests pass with both features live. The bundle is rebuilt from the resolved sources, which the artifact guard verifies on both platforms.
Summary
DSHM_GITHUB_PROXYremaining authoritativeValidation
npm test— 55 files, 1193 tests passednpm run check— typecheck, server/client build, restart smoke passednpm run test:compat— real pnpm 9/10/11 matrix, 11 tests passednpm pack --dry-run --json— passed, 145 filesgit diff --check— passednpm run test:web— authenticated capture guard passed, but the local dsh 0.1.1-rc.2 test host invoked pnpm 9 without workspace-root-w; all 29 browser cases skipped during scaffold installation before this bundle was loadedCloses #460