3 Commits

Author SHA1 Message Date
oudecheng
94a0dd0169 ci: 扩大构建与测试覆盖范围,纳入集成测试与二进制入口
cargo build --lib 改为 cargo build,确保 main.rs(gateway 二进制入口)也被编译验证;
cargo test --lib 改为 cargo test,纳入 tests/ 目录的集成测试。
test_request_format.rs 的 8 个序列化测试此前从未在 CI 中运行,现在会实际执行;
test_integration.rs / test_tool_calling.rs 中的 #[ignore] 测试会被编译但跳过执行(需真实 API key)。
2026-08-04 08:09:51 +08:00
oudecheng
c724bbf864 chore(web): prettier 一次性格式化并在 CI 启用 format:check
对 47 个前端文件统一执行 npm run format,消除存量格式差异。
随后在 CI 与 Makefile check 中启用 format:check,确保后续提交强制遵守 prettier 风格。
2026-08-03 23:25:22 +08:00
oudecheng
cda14360af chore: 建立工程化基线(rustfmt + clippy + CI + eslint + prettier)
配置:
- rustfmt.toml: 固化 max_width=100 / 4 空格缩进,cargo fmt 全量格式化
- Cargo.toml: 配置 [lints.rust] 与 [lints.clippy] 渐进式规则
- .github/workflows/ci.yml: Rust(fmt+clippy+test) + 前端(eslint+tsc+test) 双平台 CI
- Makefile: 新增 check/fmt/fix 目标,clippy 对齐 --all-targets --all-features
- web: eslint flat config + prettier 配置 + package.json 脚本与依赖
- src/main.rs: loop→while 修复 clippy::never_loop

对抗性审查发现并修复:
- eslint 缺 caughtErrorsIgnorePattern 导致 catch(_) 误报为 error
- 前端 lint 未接入 CI,现已补上 Lint 步骤
- Makefile 与 CI 的 clippy flags 不一致,已对齐
2026-08-03 23:24:02 +08:00