nyaKazuha
8b64cc94f3
fix: 完成下载并发与翻译交接链路
2026-08-02 22:34:23 +08:00
nyaKazuha
12c5d365ab
feat(translation): 增加离线任务状态查询
2026-08-01 19:04:54 +08:00
nyaKazuha
4cc143f66d
fix(sync): 固化 release flow 状态码
2026-07-31 15:57:07 +08:00
nyaKazuha
16e73327b4
fix(sync): 补齐发布清理与校验进度
2026-07-31 13:00:53 +08:00
nyaKazuha
2079c6a307
feat(sync): 接入解析缓存与汉化发布前置
...
补齐官方 release 解析缓存、TextUnit 明细索引、资源变更集、Crowdin handoff 预留、ResourceRepository 导入元数据和 localized release patch 前置链路。
同时开放文件级 patch.apply 与 UnityFS TextAsset/string/semantic field patch CLI/RPC 入口,并保留官方原版资源与汉化产物双目录发布状态。
验证:cargo test -p bat-assetbundle --locked;cargo clippy -p bat-assetbundle --all-targets --locked -- -D warnings;cargo test -p bat-infrastructure --locked。
2026-07-31 00:38:45 +08:00
nyaKazuha
3e9bb20d79
feat(assetbundle): 完善官方资源解析与双目录发布
2026-07-25 20:51:01 +08:00
nyaKazuha and Claude Fable 5
11b19683cf
feat(daemon): 实现 catalog.* 命名空间与 resource.manifest(issue #1)
...
补齐 issue #1 方法分层中可立即实现的剩余命名空间:
- catalog.status:当前已发布版本的 catalog 概览(读取其 snapshot:
app/bundle 版本、connection group、addressables 根、端点与 marker
计数、launcher 元数据、GameMainConfig 摘要)。
- catalog.versions:版本历史(current / in_progress / previous /
failed,来自 official-version-state.json)。
- catalog.diff:当前 snapshot 相对上一个可用版本的差异(复用
YostarJpSyncSnapshot::diff 与 diff_extended_snapshot;含
changed_endpoint_urls 与 previous_snapshot_missing 标志;无上一版本
时按首次观察处理 is_initial=true)。
- catalog.refresh:经任务执行器的 catalog 更新检查任务(dry-run +
plan,不下载不审计;支持 force),返回 task_id 可轮询。
- resource.manifest:当前版本下载 manifest 的分页只读查询(offset
默认 0、limit 默认 100/上限 1000,BTreeMap 按 URL 有序保证分页稳定;
非法 limit → 700002)。infrastructure 公开
OfficialDownloadManifest(Entry) 与 read_download_manifest_at。
约定:只读查询在尚无已发布版本或文件缺失时返回 ok=true 且
data.available=false(正常状态而非错误,便于 Go 层直接分支)。
is_pending_rpc_method 缩减为 task.create / resource.repair /
patch.* / unityfs.*(后两者待引擎;repair 待引擎独立修复模式)。
新增 read_daemon_resource_state 供 resource/catalog 只读查询共用。
测试:新增 10 个 dispatch 单测(含 fixture:状态文件 + 版本状态 +
snapshot + manifest)与 read_download_manifest_at 单测;调整 pending
断言。真实 daemon 端到端验证(fixture 资源根 + 死代理快速失败):
raw socket 依次断言 catalog.status/versions/diff、resource.manifest
分页与参数错误、catalog.refresh 入队与 task.status 轮询、
resource.repair→700003、未知方法→700001,全部通过,daemon.stop 干净
退出。全量 fmt / clippy --workspace --all-targets -D warnings /
test --workspace 全绿。
已知后续(另行推进):任务配置校验失败(如缺少 app-version)尚未接入
输入域错误码(应为 100001,现落 900001)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-17 10:10:03 -07:00
nyaKazuha and Claude Fable 5
ab11cc899d
feat(official-sync): 下载失败携带类型化错误码
...
用类型化错误(不做 message 匹配)把资源下载失败归到准确的 BAT-ERR 码:
- curl_transfer:CurlFailureKind::error_code() 映射到网络域码(403→300001、
404→300002、5xx→300005、dns/connect/timeout/tls/interrupted→30001x、
proxy→310001、其余→300015);CurlRetryError::final_error_code() 取末次失败的码。
- official_download:新增 pub DownloadError { code, message },From<String>→internal,
Display/Error;pull_* 的返回类型由 String 改为 DownloadError,内部 String 错误经
From 归 internal,下载失败边界带 pull_one 的 error_code(),非官方 URL 带
non_official_url(300030)。
- official_update:pull 错误改用 anyhow::Error::new 保留 DownloadError 类型。
- 任务 worker:downcast DownloadError 取 code 写入任务记录的 error(失败不再一律
900001),非下载失败仍归 internal。
验证:新增 kind→code 映射单测;pull 404 测试断言 DownloadError.code()==HTTP_NOT_FOUND;
lib/core 全量测试通过,clippy --all-targets 干净。
范围说明:本次覆盖资源下载路径;launcher/metadata 拉取(official_launcher)的网络
失败仍归 internal,可按同一模式后续接入。
对应 issue #1(错误码细分映射,第一批)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-17 07:01:31 -07:00
nyaKazuha and Claude Fable 5
3cb3637749
fix(official-sync): 清理未被引用的孤儿 staging 目录
...
同版本失败 staging 复用已由 060b7d7 处理,但跨版本失败、或被 trim/去重挤出
failed_versions 记录后残留的 .staging/<id> 目录永不被复用也无人清理,长期 daemon
场景下多 GB 孤儿目录会累积耗尽磁盘。
新增 gc_orphan_staging:枚举 .staging 下子目录,只保留 in_progress_version 与
failed_versions 引用的 <id>,删除其余(跳过普通文件与 symlink,staging 根不存在
时无操作)。在同步成功发布后(读取最新版本状态)和 clean-stable(后台已停止)两处
调用;GC 失败仅告警,不影响发布结果。
对应 issue #18 维护清单 1-4。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-16 07:29:37 -07:00
nyaKazuha
c123f6c0dc
feat(official-sync): 支持本地代理下载官方资源
2026-07-16 00:12:27 +08:00
nyaKazuha
90307a3243
feat: track official versions and import resources
...
Persist official version-state, extend CAS/ResourceRepository import classification, and add offline catalog and failure regression fixtures.
Fixes #13
Fixes #12
Fixes #8
2026-07-15 19:53:10 +08:00
nyaKazuha
4192d7ee4c
fix: classify official download failures
...
Distinguish terminal HTTP errors from retryable CDN/network failures, record quarantined resources, and report failed download progress.
Fixes #7
2026-07-14 01:30:12 +08:00
nyaKazuha
45aba2fb2b
fix: harden official sync filesystem boundaries
...
Fixes #14
2026-07-13 23:17:52 +08:00
nyaKazuha
1bcb9c828a
feat: summarize official validation results
...
Fixes #5
2026-07-13 01:06:37 +08:00
nyaKazuha
e5fcf26e19
feat: validate official zip structure
2026-07-12 23:37:47 +08:00
nyaKazuha
f7255f7c04
feat: improve bat daemon cli output
2026-07-12 23:04:13 +08:00
nyaKazuha
ea0920e4e3
feat: add official sync progress logging
2026-07-07 22:13:07 +08:00
nyaKazuha
789402c887
feat: add official resource sync pipeline
...
Add the production-facing official update service and bat-official-sync watch CLI for unattended resource synchronization.
Support launcher-resource discovery without installing the launcher, remote marker snapshots, local manifest audit and repair, official seed hash validation, bootstrap caching, richer Addressables coverage, SQLite resource persistence, and FFI JSON helpers.
2026-07-05 23:49:56 +08:00
nyaKazuha
adc1cd5b91
feat: prepare experiment push package
2026-06-30 00:08:36 +08:00
nyaKazuha
b202d7b231
feat: implement production cas v1
2026-06-28 12:39:17 +08:00
nyaKazuha
dd53e3054e
chore: establish development baseline
2026-06-28 01:27:09 +08:00