mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 04:06:44 +08:00
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
This commit is contained in:
@@ -228,7 +228,8 @@
|
||||
影响:
|
||||
|
||||
- `SqliteResourceRepository` 已存在,可按领域 repository 接口保存资源元数据。
|
||||
- 官方同步下载结果尚未作为用户级流程自动写入 CAS + ResourceRepository。
|
||||
- `ResourceImportService` 已能把 manifest 中有数据的资源写入 CAS + `ResourceRepository`,AssetBundle 会记录 UnityFS 摘要,TextAsset/Table/Media 会分类索引。
|
||||
- 官方同步下载结果尚未作为用户级流程自动触发导入 CAS + ResourceRepository。
|
||||
- 迁移、版本化 schema 和 CLI 查询入口仍需补齐。
|
||||
|
||||
验收:
|
||||
@@ -237,6 +238,75 @@
|
||||
- 可按版本、类型、hash、路径查询资源。
|
||||
- 官方同步后的资源可通过 CLI 查询并能追溯到 CAS 对象。
|
||||
|
||||
### G-011A:资源导入链路基础能力不足
|
||||
|
||||
状态:**已关闭**
|
||||
|
||||
历史现象:
|
||||
|
||||
- 资源导入链路只导入 AssetBundle。
|
||||
- 非 AssetBundle manifest 条目只会被跳过。
|
||||
- 导入报告只包含 UnityFS 基础摘要,不包含稳定分类统计。
|
||||
|
||||
处理结果:
|
||||
|
||||
- `ResourceImportService` 会把有数据的 manifest 条目导入 CAS 并写入 `ResourceRepository`。
|
||||
- AssetBundle 仍执行 UnityFS header/block/directory 摘要解析。
|
||||
- TextAsset、TableBundle、Media 会按资源类型分类,缺少数据时记录为 skipped,便于渐进导入。
|
||||
- `ResourceImportReport` 增加 `category_counts`,`ImportedResource` 增加 `resource_type`、`category` 和可选 UnityFS 摘要。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test -p bat-infrastructure import::tests::`
|
||||
- `cargo test -p bat-infrastructure --test synthetic_phase2_import`
|
||||
|
||||
### G-011B:官方版本状态管理不明确
|
||||
|
||||
状态:**已关闭**
|
||||
|
||||
历史现象:
|
||||
|
||||
- 当前可用版本主要靠 `current` symlink 和 release 内 snapshot 推断。
|
||||
- 未显式保存“正在拉取版本”和“失败版本”。
|
||||
- 上一个可用版本需要从目录状态间接判断。
|
||||
|
||||
处理结果:
|
||||
|
||||
- 新增 `<output>/official-version-state.json`。
|
||||
- 开始下载后写入 `in_progress_version`。
|
||||
- 发布成功后写入 `current_completed_version` 和 `previous_available_version`。
|
||||
- 失败或中断后写入 `failed_versions` 并清空 in-progress。
|
||||
- `bat status` 会读取并展示版本状态摘要。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test -p bat-infrastructure version_state`
|
||||
- `cargo test -p bat-infrastructure --test official_game_main_config_bootstrap`
|
||||
|
||||
### G-011C:真实 fixture 与回归样本不足
|
||||
|
||||
状态:**已关闭当前阶段**
|
||||
|
||||
历史现象:
|
||||
|
||||
- 已有 Addressables real-shape fixture/golden,但缺少按问题类型命名的当前/上一版本/结构变化样本。
|
||||
- 403/404 和 hash mismatch 主要依赖单测内联构造,不便于后续回归扩展。
|
||||
|
||||
处理结果:
|
||||
|
||||
- 新增 `adapters/tests/fixtures/addressables_regression/current_catalog.json`。
|
||||
- 新增 `adapters/tests/fixtures/addressables_regression/previous_catalog.json`。
|
||||
- 新增 `adapters/tests/fixtures/addressables_regression/structure_changed_catalog.json`。
|
||||
- 新增 `infrastructure/tests/fixtures/official_regression/http_403.json`。
|
||||
- 新增 `infrastructure/tests/fixtures/official_regression/http_404.json`。
|
||||
- 新增 `infrastructure/tests/fixtures/official_regression/hash_mismatch_catalog.json`。
|
||||
- 对应测试会解析这些 fixture,防止样本只存在但不参与验证。
|
||||
|
||||
验收:
|
||||
|
||||
- `cargo test -p bat-adapters --test addressables_regression`
|
||||
- `cargo test -p bat-infrastructure regression_fixture`
|
||||
|
||||
### G-012:Translation Memory 未实现
|
||||
|
||||
影响:
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
仍未完成:
|
||||
|
||||
- Go CLI 最小可用入口。
|
||||
- 官方同步下载结果自动导入 CAS + ResourceRepository 的用户级流程。
|
||||
- 完整 AssetBundle 解析。
|
||||
- 官方同步下载结果自动触发 CAS + ResourceRepository 导入的用户级流程。
|
||||
- AssetBundle 对象表、TypeTree 和 TextAsset 提取。
|
||||
- Patch、翻译系统、API Server、Web。
|
||||
|
||||
## 3. 当前核查结果
|
||||
@@ -64,11 +64,11 @@ git status --short
|
||||
|
||||
## 4. 当前结论
|
||||
|
||||
当前 Rust 官方资源同步链路已经具备可运行闭环,并已固化真实网络 smoke 的可重复命令,但仓库还不是完整产品。下一步不应继续只扩展 example,而应补齐 Go CLI 最小入口、CAS/ResourceRepository 编排和 AssetBundle 解析。
|
||||
当前 Rust 官方资源同步链路已经具备可运行闭环,并已固化真实网络 smoke 的可重复命令;版本状态、资源导入基础链路和离线回归 fixture 已补齐。但仓库还不是完整产品。下一步不应继续只扩展 example,而应补齐 Go CLI 最小入口、官方同步后自动导入编排和 AssetBundle 对象级解析。
|
||||
|
||||
## 5. 下一步
|
||||
|
||||
1. 实现 Go CLI:`bat doctor`、`bat sync --help`、`bat official sync --help`。
|
||||
2. 按 `docs/guides/official-full-pull-smoke.md` 在具备网络和磁盘窗口的环境中执行真实官方网络 smoke,输出目录必须隔离。
|
||||
3. 将官方同步下载结果接入 CAS + `SqliteResourceRepository`。
|
||||
4. 开始 AssetBundle UnityFS header/block/directory 解析。
|
||||
3. 将官方同步下载结果自动接入 CAS + `SqliteResourceRepository` 的用户级命令。
|
||||
4. 开始 AssetBundle 对象表、TypeTree 和 TextAsset 提取。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 当前进度交接
|
||||
|
||||
- **更新时间**:2026-07-14
|
||||
- **更新时间**:2026-07-15
|
||||
- **状态分支**:`experiment`
|
||||
- **最新功能提交**:以当前 `git log --oneline -1` 为准
|
||||
- **用途**:给下一次对话快速恢复上下文,优先以当前工作区和已验证结果为准。
|
||||
@@ -23,6 +23,9 @@
|
||||
- `--watch` 是 Rust 内部常驻检查模式,正常检查默认 1 小时,失败重试默认 60 秒;外部 systemd/container 只负责守护进程。
|
||||
- `bat` progress log 会输出总体下载进度、单文件进度和校验结果摘要。
|
||||
- 真实官方网络 smoke 已固化为 `scripts/official-full-pull-smoke.sh`、`make official-smoke` 和 `docs/guides/official-full-pull-smoke.md`,默认写入 `/tmp` 隔离目录。
|
||||
- `official-version-state.json` 已持久化当前完成、正在拉取、上一个可用和失败版本,`bat status` 会显示版本状态摘要。
|
||||
- 资源导入链路已支持 CAS + `ResourceRepository` 写入,AssetBundle UnityFS 摘要,以及 TextAsset/Table/Media 分类索引。
|
||||
- 当前 catalog、上一个版本 catalog、结构变化 catalog、403、404、hash mismatch 已有离线回归 fixture。
|
||||
|
||||
## 2. 现在不要误解的点
|
||||
|
||||
@@ -39,9 +42,9 @@
|
||||
|
||||
1. Go CLI 最小入口:`bat doctor`、`bat sync --help`、`bat official sync --help`。
|
||||
2. 按 smoke runbook 在具备网络和磁盘窗口的环境中执行真实官方网络 smoke,并保留隔离目录报告。
|
||||
3. 官方同步下载结果进入 CAS + `SqliteResourceRepository` 的用户级流程。
|
||||
4. Addressables parser 覆盖更多真实 catalog 结构。
|
||||
5. AssetBundle UnityFS header/block/directory 解析。
|
||||
3. 官方同步下载结果自动触发 CAS + `SqliteResourceRepository` 的用户级导入流程。
|
||||
4. Addressables parser 覆盖二进制/压缩字段组合和更细失败诊断。
|
||||
5. AssetBundle 对象表、TypeTree 和 TextAsset 提取链路继续推进。
|
||||
6. Patch、翻译库、API Server、Web。
|
||||
|
||||
## 4. 下一次对话最合适的起点
|
||||
|
||||
Reference in New Issue
Block a user