mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-07-22 01:15:14 +08:00
docs: align project status with official sync pipeline
Update the authoritative docs, guides, architecture notes, gap list, deployment guidance, handoff notes, and changelog to reflect the current Rust official resource sync boundary.
This commit is contained in:
+119
-90
@@ -1,54 +1,42 @@
|
||||
# BlueArchiveToolkit 当前工作区状态
|
||||
|
||||
**更新时间**:2026-06-29
|
||||
**状态来源**:本地工作区盘点与命令验证
|
||||
**状态分支**:`experiment`
|
||||
**权威计划**:`PROJECT_PLAN.md`
|
||||
- **更新时间**:2026-07-06
|
||||
- **状态来源**:本地工作区盘点、代码验证和最新提交
|
||||
- **状态分支**:`experiment`
|
||||
- **最新功能提交**:`789402c feat: add official resource sync pipeline`
|
||||
- **权威计划**:`PROJECT_PLAN.md`
|
||||
|
||||
---
|
||||
|
||||
## 1. 总体判断
|
||||
|
||||
当前项目处于 **稳定基线完成、CAS V1 已落地、官方资源链路验证完成、资源同步与解析待实装** 阶段。
|
||||
当前项目处于 **稳定基线完成、CAS V1 已落地、Rust 官方资源同步链路已具备最小生产运行形态、Go CLI/API/Web 仍未落地** 阶段。
|
||||
|
||||
旧文档中存在 Week 3 “完成”和“回滚”两类互相冲突的报告。以当前代码为准,历史 Week 3 不再作为状态依据;当前 CAS V1 已由新实现接管,AssetBundle、Patch、Go CLI/API/Web 仍有明显占位或未实现部分。
|
||||
Rust 侧官方日服资源链路已经从实验验证推进到正式入口:
|
||||
|
||||
1. 首次运行可以通过 `--auto-discover` 从官方 HTTP metadata 解析 `GameMainConfig`,自动获得 `app-version`、`connection-group` 和 `server-info`。
|
||||
2. 不安装、不启动、不依赖已安装官方启动器。
|
||||
3. 默认平台为 `Windows + Android`。
|
||||
4. 能生成官方全量 pull plan,执行真实下载,维护 `official-download-manifest.json`。
|
||||
5. 下载后使用本地 manifest 的 size + BLAKE3 校验复用文件;官方 seed `.hash` 使用 `xxHash32(seed=0)` 强校验。
|
||||
6. 支持 `.part` 断点续传、失败后 clean retry、本地 manifest audit/repair。
|
||||
7. `bat-official-sync --watch` 可常驻运行,默认每 1 小时检查一次;远端和本地一致时默认静默。
|
||||
8. 非 dry-run 使用 `--output/.official-sync.lock` 防止并发写同一状态目录。
|
||||
|
||||
仍需明确:这不是完整产品完成。Go CLI 最小入口、完整 AssetBundle 解析、Patch、翻译系统、API Server 和 Web 仍是后续工作;真实官方网络全量下载 smoke test 尚未记录在仓库文档中。
|
||||
|
||||
---
|
||||
|
||||
## 2. 工作区整理结果
|
||||
## 2. 权威文档入口
|
||||
|
||||
### 根目录保留
|
||||
- `README.md`:项目概览、当前可用能力和快速验证。
|
||||
- `PROJECT_PLAN.md`:最终目标、里程碑和近期任务。
|
||||
- `DOCS_INDEX.md`:文档阅读顺序和索引。
|
||||
- `docs/guides/official-resource-test-pull.md`:官方资源拉取与自动更新用户指南。
|
||||
- `docs/architecture/official-resource-backend.md`:官方资源后端设计和审核说明。
|
||||
- `docs/reports/CURRENT_GAPS.md`:当前缺口和关闭顺序。
|
||||
|
||||
根目录现在主要保留入口文件和工程配置:
|
||||
|
||||
- `README.md`
|
||||
- `PROJECT_PLAN.md`
|
||||
- `CURRENT_STATUS.md`
|
||||
- `DOCS_INDEX.md`
|
||||
- `CHANGELOG.md`
|
||||
- `CLAUDE.md`
|
||||
- `Cargo.toml`
|
||||
- `Cargo.lock`
|
||||
- `go.mod`
|
||||
- `Makefile`
|
||||
- `LICENSE`
|
||||
|
||||
### 已归档
|
||||
|
||||
历史阶段报告已移动到:
|
||||
|
||||
- `docs/reports/historical/root/`
|
||||
- `docs/reports/historical/week2/`
|
||||
- `docs/reports/historical/week3/`
|
||||
- `docs/reports/historical/build-logs/`
|
||||
- `docs/reports/historical/quality/`
|
||||
- `docs/reports/historical/nested-docs/`
|
||||
|
||||
原先误嵌套的 `docs/docs/archive` 已合并到:
|
||||
|
||||
- `docs/archive/`
|
||||
|
||||
原先空的重复目录 `docs/docs` 和 `docs/adapters` 已删除。
|
||||
历史 Week 2/Week 3 报告只作追溯,不再代表当前状态。
|
||||
|
||||
---
|
||||
|
||||
@@ -68,7 +56,7 @@
|
||||
|
||||
### `bat-core`
|
||||
|
||||
状态:**接口和领域骨架基本完成**
|
||||
状态:**领域模型和仓储接口骨架可用**
|
||||
|
||||
已包含:
|
||||
|
||||
@@ -88,22 +76,21 @@
|
||||
|
||||
### `bat-adapters`
|
||||
|
||||
状态:**适配器框架可用,真实解析能力不足**
|
||||
状态:**适配器框架可用,官方日服规则和 Addressables 当前样本解析已推进**
|
||||
|
||||
已包含:
|
||||
|
||||
- Unity adapter trait、注册表、Unity 2021.3 adapter 骨架。
|
||||
- Manifest driver trait、Addressables driver、注册表。
|
||||
- Client integration、backup、discovery trait。
|
||||
- Addressables JSON catalog 的 path、hash、size、address、dependencies、metadata 解析。
|
||||
- 真实形态 Addressables fixture/golden 测试。
|
||||
- 官方日服 `server-info`、URL 规则、平台 discovery 和 inventory 枚举。
|
||||
|
||||
待完成:
|
||||
|
||||
- Unity bundle parse/serialize 仍是后续阶段能力。
|
||||
- Addressables Catalog 复杂字段解析未完成。
|
||||
- Addressables parser 仍需继续覆盖更多官方 catalog 结构变体和失败诊断。
|
||||
- 客户端发现、备份、应用补丁流程尚未连接真实实现。
|
||||
- 官方资源 pull plan / update check 已明确 Linux 生产路径:显式 `--auto-discover` 或已审计 metadata snapshot,不安装、不执行官方启动器。
|
||||
- 官方 launcher bootstrap、GameMainConfig bootstrap 保留为底层显式开发/审计辅助路径。
|
||||
- 官方 bootstrap / pull 测试夹具已收敛到 `experiment` 分支语义下,并通过了官方链路回归。
|
||||
|
||||
### `bat-cas-engine`
|
||||
|
||||
@@ -127,6 +114,26 @@
|
||||
- 未来需要时扩展流式大文件写入。
|
||||
- 未来需要时扩展非 SQLite 元数据后端。
|
||||
|
||||
### `bat-infrastructure`
|
||||
|
||||
状态:**CAS 适配层、ResourceRepository 和官方资源同步入口可用**
|
||||
|
||||
已包含:
|
||||
|
||||
- `FileSystemCasRepository` 作为 `bat-core::CasRepository` 适配层。
|
||||
- `InMemoryResourceRepository`。
|
||||
- `SqliteResourceRepository`。
|
||||
- 官方 pull plan 构建。
|
||||
- `OfficialResourcePullService`:官方 URL 拒绝策略、目标路径映射、下载 manifest、`.part` 续传、重试、官方 seed `.hash` 校验。
|
||||
- `OfficialUpdateService`:官方 metadata auto-discover、bootstrap cache、snapshot diff、marker diff、本地 audit/repair。
|
||||
- `bat-official-sync`:正式 CLI binary,支持 one-shot 和 `--watch`。
|
||||
|
||||
待完成:
|
||||
|
||||
- 将官方同步下载结果作为用户级流程自动导入 CAS + ResourceRepository。
|
||||
- 为真实线上全量下载建立受控 smoke test 记录。
|
||||
- 增加更多失败恢复和权限场景测试。
|
||||
|
||||
### `bat-assetbundle`
|
||||
|
||||
状态:**占位**
|
||||
@@ -160,88 +167,110 @@
|
||||
|
||||
### `bat-ffi`
|
||||
|
||||
状态:**骨架**
|
||||
状态:**粗粒度 JSON API 可用,稳定边界仍需继续收敛**
|
||||
|
||||
已能编译并引用 Rust 引擎 crate,但尚未提供完整稳定 FFI API。
|
||||
已包含:
|
||||
|
||||
- `bat_version`。
|
||||
- `bat_manifest_inspect_json`:解析 Addressables manifest 并返回 JSON summary。
|
||||
- `bat_sync_plan_json`:根据 current/previous snapshot 生成官方同步计划 JSON。
|
||||
- `internal/ffi/ffi.go` 提供 Go 包装骨架。
|
||||
|
||||
待完成:
|
||||
|
||||
- Go CLI 调用链路。
|
||||
- 错误码与结构化响应约定。
|
||||
- 发布用头文件、构建脚本和跨平台产物。
|
||||
|
||||
### Go / API / Web
|
||||
|
||||
状态:**目录存在,功能未实现**
|
||||
状态:**Go FFI 包骨架存在,CLI/API/Web 仍未实现**
|
||||
|
||||
当前 `cmd/`、`internal/`、`pkg/`、`api/`、`web/` 多数为空目录或只有目录结构,没有 Go package 可测试。
|
||||
当前情况:
|
||||
|
||||
`Makefile` 已调整:在 Go package 尚未实现时,Go build/test/check/fmt/lint 会明确跳过,避免误报失败。
|
||||
- `internal/ffi/ffi.go` 已存在。
|
||||
- `cmd/`、`pkg/`、`api/`、`web/` 仍无可用产品入口。
|
||||
- `go test ./...` 在没有 Go package 时可能无测试可运行;Makefile 会清晰跳过空 Go 阶段。
|
||||
|
||||
---
|
||||
|
||||
## 4. 本次验证结果
|
||||
## 4. 已验证结果
|
||||
|
||||
已运行:
|
||||
最新功能提交前已运行并通过:
|
||||
|
||||
```bash
|
||||
cargo test --workspace
|
||||
cargo test -p bat-adapters -- --nocapture
|
||||
cargo test -p bat-ffi -- --nocapture
|
||||
cargo test -p bat-infrastructure -- --nocapture
|
||||
cargo test -p bat-infrastructure --bin bat-official-sync -- --nocapture
|
||||
cargo run -p bat-infrastructure --bin bat-official-sync -- --help
|
||||
git diff --cached --check
|
||||
```
|
||||
|
||||
结果:通过。
|
||||
|
||||
已运行:
|
||||
提交后确认:
|
||||
|
||||
```bash
|
||||
cargo test -p bat-infrastructure --test official_game_main_config_bootstrap -- --nocapture
|
||||
cargo test -p bat-infrastructure
|
||||
cargo test -p bat-adapters
|
||||
git status --short
|
||||
```
|
||||
|
||||
结果:通过。
|
||||
结果:工作区干净。
|
||||
|
||||
已运行:
|
||||
未执行:
|
||||
|
||||
```bash
|
||||
go test ./...
|
||||
```
|
||||
|
||||
结果:当前没有 Go package,因此无测试可运行。`Makefile` 已修正为跳过该状态。
|
||||
- 真实官方网络全量下载 smoke test。
|
||||
- Go CLI 端到端测试,因为 Go CLI 尚未实现。
|
||||
- Web/API 测试,因为 Web/API 尚未实现。
|
||||
|
||||
---
|
||||
|
||||
## 5. 当前阻塞项
|
||||
## 5. 当前生产运行边界
|
||||
|
||||
### Git 元数据
|
||||
当前唯一可作为 Linux 生产资源同步任务运行的入口是 Rust binary:
|
||||
|
||||
原 `.git/` 是空目录,无法恢复原历史。本轮已新初始化 Git 仓库,并完成当前工作分支的整理。
|
||||
```bash
|
||||
cargo run -p bat-infrastructure --bin bat-official-sync -- \
|
||||
--auto-discover \
|
||||
--platforms Windows,Android \
|
||||
--output /var/lib/bluearchive-toolkit/official \
|
||||
--watch
|
||||
```
|
||||
|
||||
当前状态:
|
||||
生产要求:
|
||||
|
||||
- `git status --short --branch` 可用。
|
||||
- 原历史未恢复。
|
||||
- 当前分支已切到 `experiment`,用于承载实验性 fixture 调整。
|
||||
- 当前分支已切到 `experiment`,用于承载实验性 fixture 调整。
|
||||
1. 使用独立输出目录,例如 `/var/lib/bluearchive-toolkit/official`。
|
||||
2. 不要指向已有游戏客户端目录。
|
||||
3. 不要指向 `/home/wanye/D/BlueArchive` 这类开发或人工维护资源目录。
|
||||
4. `--auto-discover` 可以下载官方 metadata 和临时 game zip 以解析 `GameMainConfig`,但不会安装或启动官方 launcher。
|
||||
5. systemd service、容器或 Go 进程可以负责守护 `bat-official-sync --watch`,但定时检查逻辑已经在 Rust 内部。
|
||||
|
||||
### 核心能力未实装
|
||||
详细运行说明见 `docs/guides/official-resource-test-pull.md`。
|
||||
|
||||
---
|
||||
|
||||
## 6. 当前阻塞项
|
||||
|
||||
下一阶段必须优先完成:
|
||||
|
||||
1. Manifest 真实解析。
|
||||
2. Go CLI 基础入口。
|
||||
3. AssetBundle 解析。
|
||||
4. 文本提取中间格式。
|
||||
|
||||
不建议在这些完成前优先推进 Web UI。
|
||||
1. Go CLI 最小可用入口:`bat doctor`、`bat sync --help`、Rust 官方同步命令包装。
|
||||
2. 官方同步结果接入 CAS + ResourceRepository 的用户级工作流。
|
||||
3. AssetBundle UnityFS 基础解析。
|
||||
4. Addressables parser 对更多官方 catalog 结构的覆盖。
|
||||
5. 真实官方网络全量下载 smoke test 记录。
|
||||
6. Patch 和翻译系统仍应后置。
|
||||
|
||||
---
|
||||
|
||||
## 6. 下一步建议
|
||||
## 7. 下一步建议
|
||||
|
||||
立即任务:
|
||||
|
||||
1. 完成 Manifest 真实字段解析和资源模型映射。
|
||||
2. 落地 Go CLI 的 `doctor` 和基础命令框架。
|
||||
3. 设计 Resource Repository 的持久化 schema。
|
||||
4. 决定哪些 experiment 改动需要回流到 `dev`。
|
||||
1. 实现 Go CLI 最小框架和 `doctor`。
|
||||
2. 为 `bat-official-sync` 增加发布型构建/安装说明和服务化验证。
|
||||
3. 补端到端 smoke:dry-run、真实下载到隔离目录、二次运行静默 up-to-date、本地损坏后 repair。
|
||||
4. 开始 AssetBundle parser 的 UnityFS header/block/directory。
|
||||
|
||||
---
|
||||
|
||||
**当前总体完成度**:约 18%
|
||||
**当前基线状态**:已建立可继续开发的 Git 基线。
|
||||
**下一工程里程碑**:Manifest 真实解析与 Go CLI 基础入口。
|
||||
**当前阶段文档**:`docs/reports/current-stage-prepush.md`
|
||||
- **当前总体完成度**:约 22%
|
||||
- **当前基线状态**:Rust 官方资源同步链路已具备可运行闭环;产品级 CLI/API/Web 仍未完成。
|
||||
- **下一工程里程碑**:Go CLI 最小可用 + 官方同步端到端 smoke + AssetBundle 解析起步。
|
||||
|
||||
Reference in New Issue
Block a user