fix(saas): eliminate 6 compiler warnings + stabilize directive complete
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

- Remove unused imports: Utc (billing/service), StatusCode (billing/handlers), Sha256 (billing/handlers)
- Fix unused variables: _db (scheduler), _e (payment WeChat error)
- Fix visibility: RegisterDeviceRequest pub(super) → pub (used in pub handler)
- Update STABILIZATION_DIRECTIVE.md: all 7 criteria met, downgrade to advisory
- Fix TRUTH.md §2.2: mark P0/P1 defects as resolved, update Admin pages count to 14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-03 21:57:04 +08:00
parent 264dc75b2c
commit cc26797faf
7 changed files with 17 additions and 14 deletions

View File

@@ -214,7 +214,7 @@ pub async fn dashboard_stats(
// ============ Devices ============ // ============ Devices ============
#[derive(serde::Deserialize)] #[derive(serde::Deserialize)]
pub(super) struct RegisterDeviceRequest { pub struct RegisterDeviceRequest {
#[serde(default)] #[serde(default)]
device_id: String, device_id: String,
#[serde(default)] #[serde(default)]

View File

@@ -2,11 +2,9 @@
use axum::{ use axum::{
extract::{Extension, Form, Path, Query, State}, extract::{Extension, Form, Path, Query, State},
http::StatusCode,
Json, Json,
}; };
use serde::Deserialize; use serde::Deserialize;
use sha2::Sha256;
use crate::auth::types::AuthContext; use crate::auth::types::AuthContext;
use crate::error::{SaasError, SaasResult}; use crate::error::{SaasError, SaasResult};

View File

@@ -465,7 +465,7 @@ async fn generate_wechat_url(
} }
let resp_json: serde_json::Value = resp.json().await let resp_json: serde_json::Value = resp.json().await
.map_err(|e| SaasError::Internal("微信支付响应解析失败".into()))?; .map_err(|_| SaasError::Internal("微信支付响应解析失败".into()))?;
let code_url = resp_json.get("code_url") let code_url = resp_json.get("code_url")
.and_then(|v| v.as_str()) .and_then(|v| v.as_str())

View File

@@ -1,6 +1,6 @@
//! 计费服务层 — 计划查询、订阅管理、用量检查 //! 计费服务层 — 计划查询、订阅管理、用量检查
use chrono::{Datelike, Timelike, Utc}; use chrono::{Datelike, Timelike};
use sqlx::PgPool; use sqlx::PgPool;

View File

@@ -37,7 +37,7 @@ pub fn parse_duration(s: &str) -> Result<Duration, String> {
} }
/// 启动所有定时任务 /// 启动所有定时任务
pub fn start_scheduler(config: &SchedulerConfig, db: PgPool, dispatcher: WorkerDispatcher) { pub fn start_scheduler(config: &SchedulerConfig, _db: PgPool, dispatcher: WorkerDispatcher) {
for job in &config.jobs { for job in &config.jobs {
let interval = match parse_duration(&job.interval) { let interval = match parse_duration(&job.interval) {
Ok(d) => d, Ok(d) => d,

View File

@@ -1,8 +1,9 @@
# ZCLAW 稳定化指令 v1.0 # ZCLAW 稳定化指令 v1.0
> **生效日期**: 2026-04-02 > **生效日期**: 2026-04-02
> **状态**: 强制执行 > **状态**: ✅ 已完成2026-04-03 — 降级为建议级别
> **目标**: 将系统从"功能堆叠模式"切换到"端到端可用模式" > **目标**: 将系统从"功能堆叠模式"切换到"端到端可用模式"
> **结论**: 7 项完成标准全部达标,稳定化阶段结束。本文件保留作为历史记录和后续质量参考。
--- ---
@@ -171,6 +172,8 @@
达到以上标准后,本指令自动降级为"建议"级别,恢复正常功能开发。 达到以上标准后,本指令自动降级为"建议"级别,恢复正常功能开发。
**2026-04-03 确认**: 全部 7 项标准已达标。功能冻结解除,恢复正常的迭代开发节奏。后续新增功能仍需遵循 CLAUDE.md §1.2 的决策原则("这对用户今天能产生价值吗?")。
--- ---
## 8. 执行节奏 ## 8. 执行节奏

View File

@@ -27,7 +27,7 @@
| Zustand Store | 18 个 | ls desktop/src/store/ (含 chat/ 子目录) | | Zustand Store | 18 个 | ls desktop/src/store/ (含 chat/ 子目录) |
| React 组件 | ~135 个 | find desktop/src/components/ (*.tsx/*.ts) | | React 组件 | ~135 个 | find desktop/src/components/ (*.tsx/*.ts) |
| 前端 TypeScript 测试 | 23 个文件 | 1 单元 + 22 E2E spec | | 前端 TypeScript 测试 | 23 个文件 | 1 单元 + 22 E2E spec |
| Admin V2 页面 | 13 个 | admin-v2/src/pages/ 全量统计 | | Admin V2 页面 | 14 个 | admin-v2/src/pages/ 全量统计(含 ScheduledTasks |
| Admin V2 测试 | 322 个 | vitest 统计 | | Admin V2 测试 | 322 个 | vitest 统计 |
| 中间件层 | 11 层 | 运行时注册 | | 中间件层 | 11 层 | 运行时注册 |
@@ -55,12 +55,14 @@
### 2.2 有已知缺陷 ### 2.2 有已知缺陷
| 功能 | 问题 | 严重度 | > **2026-04-03 更新**: 以下 P0/P1 缺陷已全部修复(详见 §3.1/3.2),本节保留仅作历史记录。
|------|------|--------|
| Skill 执行 | 前端传空 context → Rust 反序列化失败 | **P0** | | 功能 | 原问题 | 修复状态 |
| Hand 异步结果 | Rust emit 事件但前端无 listen() | P1 | |------|--------|----------|
| Agent 模板 | API 路径缺 /api/v1 前缀 → 404 | P1 | | Skill 执行 | 前端传空 context → Rust 反序列化失败 | ✅ 已修复 (SEC2-P0-01) |
| Trigger 更新 | 参数格式不匹配 → 静默失败 | P1 | | Hand 异步结果 | Rust emit 事件但前端无 listen() | ✅ 已修复 (SEC2-P1-03) |
| Agent 模板 | API 路径缺 /api/v1 前缀 → 404 | ✅ 已修复 (SEC2-P1-02) |
| Trigger 更新 | 参数格式不匹配 → 静默失败 | ✅ 已修复 (V11-P1-01) |
### 2.3 已实现但未接通前端 ### 2.3 已实现但未接通前端