nyaKazuha and Claude Fable 5
1a25ea58dd
feat(core): 引入统一错误码模型并新增 USERGUIDE
...
为 issue #1 的公共错误契约建立错误码模型:
- core/src/error_code.rs:ErrorCode(BAT-ERR-<域3位><序号3位>,如 BAT-ERR-300012)
+ 44 个初始码表(覆盖输入/路径安全/网络下载/校验/发布存储/解析/任务RPC/内部
八域,网络域含代理故障 310001)、ErrorDomain、以及进入 RPC envelope / --json /
bat-events.jsonl 的统一 ApiError { code, kind, domain, location, message, retryable }。
location 用稳定的组件·操作标签(不随行号漂移)。
- 新增 USERGUIDE.md:bat 命令、选项(发现/同步/守护/输出)、退出码(含 75=locked)、
运行时默认值,以及从码表同步的错误码参考(含承载结构与域一览)。
命名遵循国际惯例(英文 kind/domain slug)。码表以 error_code.rs 为准,USERGUIDE
错误码表与之逐条一致。后续各链路报错接入该码表在 issue #1 下推进。
对应 issue #1(错误码模型 + 用户指南)。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-17 03:57:17 -07:00
nyaKazuha and Claude Fable 5
48ffc08cdf
fix(cas): exists 返回 Result 以区分不存在与存储故障
...
CasRepository::exists(core trait)与底层 Storage::exists 原返回裸 bool,
FileSystemStorage 用 try_exists(...).unwrap_or(false)、infra 适配层吞掉解析/
初始化错误返回 false,调用方无法区分“对象不存在”和权限/IO/初始化故障。
将整条链改为 Result<bool>:
- storage trait 与 FileSystemStorage:try_exists 的 IO 错误经 ? 传播;
- repository FileSystemCasRepository::exists 及 store/add_reference 内部调用;
- core CasRepository::exists trait;
- infra 适配层:解析失败→InvalidArgument、初始化/引擎错误经 map_error 传播。
Ok(false) 仅表示确实不存在。
新增单测:合法但不存在的对象返回 Ok(false),非法 ObjectId 返回 Err(而非静默
false);同步更新各层 exists 断言。
对应 issue #18 维护清单 2-1。
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com >
2026-07-16 08:53:54 -07: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
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
3c00659691
refactor: reduce quality findings
2026-06-28 15:42:12 +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