Commit Graph

6 Commits

Author SHA1 Message Date
troytt 258be4d608 fix(publish): fine-grained batched push with resume
跨境链路对长连接做 MSS 钳制:实测 pmtu 1460 但 mss 被压到 324,重传率
13.7%,cwnd 触底到 3-4,有效带宽只剩 ~20 KB/s。原来按 act 分 5 批推送,
单批最大 117 MB,在这种链路上必然超时,且失败后整批重来。

改为:
- 按地图目录累计到 ~10 MB 就切一批(45 批 / 399.1 MB),失败只重推一批
- http.lowSpeedLimit 1000 + http.lowSpeedTime 120:低于 1 KB/s 持续 2 分钟
  就断开,让重试开新连接(实测新连接能拿回 mss 1408,速度提升 2.5 倍)
- --work 支持续推:用 git ls-remote 读远端 main,回卷本地工作区对齐,
  再跳过所有已在 HEAD 中的批次,避免重复上传
- 5 次重试,线性退避 15/30/45/60 秒

另外修正 tests/wilderness-features.test.ts 的 WildernessPiece 导入——
verbatimModuleSyntax 下类型导入必须用 import type。

TAG=agy
CONV=c89513df-cd12-4749-b5bd-5e9f16639391
2026-09-15 06:33:19 +00:00
troytt 2d7f5f7a00 fix(wilderness): add interior stone walls, probabilistic river, and perimeter opening control
- Implement isClosedBorder, selectBorderVariant, and getPerimeterOpenings
- Moo Moo Farm (Level 39): enforce 0 exits (100% closed perimeter), add interior corrals and stone fences
- Blood Moor (Level 2): enforce exactly 1 entrance (South) and 1 exit (East), add stone corrals/fences and probabilistic river/bridge presets
- Add 'Act 1 - Fence Fill', 'Act 1 - River', 'Act 1 - Bridge' to Act 1 Wilderness piece families
- Add comprehensive unit tests in tests/wilderness-features.test.ts
- Optimize publish-packs.ts with batch incremental pushes by Act
2026-09-15 05:25:09 +00:00
troytt c6f176f784 chore(scripts): configure commit author in publish-packs 2026-09-14 11:22:48 +00:00
troytt 1cdbe5de19 chore(scripts): update level count in publish-packs readme generator 2026-09-14 11:22:32 +00:00
troytt 9475886bc8 fix(scripts): 修复 publish-packs 统计地图关卡数量逻辑 2026-09-14 09:30:55 +00:00
troytt cd81a7e686 图库改走独立仓库 + 单提交历史(每次重烘 orphan + force push)
背景:Gitea 的 Release 附件在本实例不可用(1KB..59.5MB 全部 HTTP 500),所以图集包改为
发布到独立仓库 troytt/diablo2-web-assets,并刻意只保留一个提交——每次重烘在临时目录 git init
后提交当前包并 force push,仓库体积恒定在「一份快照」~66 MB;代码仓库 clone 保持 2.7 MB。

新增 scripts/publish-packs.ts(npm run publish:packs):
  - 统计块数/文件数/体积与 index.json sha256,生成图库仓库里的 README(用法、许可、重建步骤)
  - 写 .gitattributes(*.png binary -diff)
  - 在临时目录 init -b main → 拷贝 samples/d2-packs → 提交 → force push
  - 不落任何凭据到磁盘;remote 可用参数或 D2_ASSETS_REMOTE 覆盖

README「资源包从哪来」改为以图库仓库为主、归档镜像为辅;HANDOVER 记录两种发布方式、
服务端 gc 的注意事项(Gitea 的 cron.git_gc_repos 默认关闭,force push 后的旧对象需 gc 才回收)。
2026-09-14 12:03:27 +08:00