From 00e15f9d5fe3ec8107ca3459fcf6f3526207d676 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 12 Oct 2026 12:31:21 +0800 Subject: [PATCH] =?UTF-8?q?docs(plan):=20=E5=8E=BB=E6=8E=89=20export=20?= =?UTF-8?q?=E7=9A=84=E9=87=8D=E5=A4=8D=E6=96=87=E6=A1=A3=E8=A1=8C=20+=20Ta?= =?UTF-8?q?sk=208=20=E8=AF=AF=E5=BC=95=E6=94=B9=E4=B8=BA=20Task=207?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 计划共 7 个任务,Task 3 里引用「Task 8 e2e」是笔误。 裸 JSON 修正时残留了一行重复的 doc comment。 Co-Authored-By: Claude Code --- docs/superpowers/plans/2026-10-12-user-sync.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/superpowers/plans/2026-10-12-user-sync.md b/docs/superpowers/plans/2026-10-12-user-sync.md index bb5204c..ed7563e 100644 --- a/docs/superpowers/plans/2026-10-12-user-sync.md +++ b/docs/superpowers/plans/2026-10-12-user-sync.md @@ -935,7 +935,7 @@ Co-Authored-By: Claude Opus 4.8 (1M context) " - `("POST", "/api/admin/sync/pull")` → `Guard::Admin` - `("POST", "/api/admin/reload")` → `Guard::Admin` -**⚠️ 本任务无法单元测试**:handler 依赖 `*mut ngx_http_request_t`。靠 `cargo check` + Task 8 e2e 验证。 +**⚠️ 本任务无法单元测试**:handler 依赖 `*mut ngx_http_request_t`。靠 `cargo check` + Task 7 e2e 验证。 鉴权逻辑(token 比对)刻意做成可单测的纯函数 `sync::token_matches`,见 Step 1。 - [ ] **Step 1: 加 token 比对与 authority 投影** @@ -1068,8 +1068,7 @@ fn h_sync_push(r: *mut ngx_http_request_t, _actor: Actor) -> Status { ) } -/// GET /api/admin/sync/export —— 导出本侧权威字段(供对端 pull)。 -/// GET /api/admin/sync/export —— 导出本侧权威字段全量快照。 +/// GET /api/admin/sync/export —— 导出本侧权威字段全量快照(供对端 pull)。 /// /// ⚠️ **必须发裸 `SyncPayload`,不能用 `http::ok`**。`http::ok` 会包成 /// `{code,data,msg}` 信封,而对端 `sync::pull_from_peer` 是