From 15861a0713798e0812dd9019c90a357c1bdaec9e Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 13 Oct 2026 04:38:16 +0000 Subject: [PATCH 1/3] Wire login recovery follow-up: SSE close, browser e2e, proposal r3 Why: The completion audit flagged four gaps over the merged login recovery implementation: real-browser acceptance, the login-key e2e spec, SSE stream invalidation, and the Documents write-back. Evidence: Browser acceptance receipts be7ae9a2/b3a9e691 (SELF, bound to Dev HEAD 268ef29); Backend #189 CI success at head 8b73afe (GATE); Documents #94 merged; this PR's composite CI is the GATE for frontend pin 44b9646. Impact: Pins backend=349a47d (SSE close) and frontend=44b9646 (e2e spec); contract doc leftovers updated; task card carries the follow-up record for closure. Refs: docs/svc-deploy/2026-10-13-login-recovery-contract.md; Documents proposal r3; Backend #189; Frontend #77. --- .task/feature-svc-login-recovery-flow.md | 12 ++++++++++++ .../2026-10-13-login-recovery-contract.md | 15 ++++++++++----- modules/backend | 2 +- modules/frontend | 2 +- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.task/feature-svc-login-recovery-flow.md b/.task/feature-svc-login-recovery-flow.md index b1f629a3..9624d763 100644 --- a/.task/feature-svc-login-recovery-flow.md +++ b/.task/feature-svc-login-recovery-flow.md @@ -85,6 +85,18 @@ | 时间(UTC) | 命令 | 被测HEAD | exit | 来源 | sha256(16) | |---|---|---|---|---|---| +## 收尾增录(2026-10-13 追加,随 feature/svc-login-recovery-followup 分支提交) + +- 真实浏览器验收:隔离 auth-on 实例(serve --data /tmp/lr-e2e-data --auth on, + 二进制 backend=467718a+frontend=9fc7da2)PASS——管理员签发→只输 Key 兑换→免旧密码设密→ + 新密码登录→同 Key 重复兑换被拒;changepw-form 回归同过。收据(SELF,绑定 Dev HEAD 268ef29): + /tmp/login-key-e2e-acceptance-20261013b.json sha256=be7ae9a2…; + /tmp/login-key-final-state-20261013.json sha256=b3a9e691…。 +- SSE 断流(合同 §6.7):Backend #189(349a47d,CI success)已合入。 +- 登录兑换 E2E 入库:Frontend #77(44b9646,GATE=本分支 Dev 组合 CI)。 +- Documents 主方案 r3 回写:Documents #94 已合入。 +- 主检出 scripts/svc.sh 并行写者未收尾,`make task-close` 待树干净后执行。 + ## 结果与验证(完成后填写) - 结果: diff --git a/docs/svc-deploy/2026-10-13-login-recovery-contract.md b/docs/svc-deploy/2026-10-13-login-recovery-contract.md index c72dd4a4..7e126e04 100644 --- a/docs/svc-deploy/2026-10-13-login-recovery-contract.md +++ b/docs/svc-deploy/2026-10-13-login-recovery-contract.md @@ -68,9 +68,14 @@ 以上本地结果均为 SELF;GATE 以 PR HEAD 的 CI(含 test-pg)为准。 -## 遗留项(不阻塞本合同) +## 遗留项(不阻塞本合同;2026-10-13 追加收尾) -- 登录页专用兑换 E2E(login-key.playwright.ts,U5 计划文件)。 -- SSE 长连接的认证版本主动复验/断流通知。 -- Documents 主方案 r2 的 U4/U5 规格按本文回写(与 PR #87 合入后再推进,避免文档冲突)。 -- 兑换入口跨实例限流(当前进程内退避,与 `loginGuard` 同档)。 +- ~~登录页专用兑换 E2E~~:**已补齐**(Frontend #77,`e2e/login-key.playwright.ts`; + 真实浏览器全流程验收 PASS——签发→只输 Key 兑换→免旧密码设密→新密码登录→重复兑换被拒, + 隔离 auth-on 实例,收据 sha256 `be7ae9a2…`/`b3a9e691…` 绑定 Dev HEAD 268ef29,SELF)。 +- ~~SSE 长连接断流~~:**已实现**(Backend #189,`349a47d`,CI success)——会话凭证的流 + 在心跳点复验(默认 15s,测试可缩短),失效即以 `session-expired` 终止; + API key 凭证的撤销断流仍后续。 +- ~~Documents 主方案回写~~:**已完成**(Documents #94 r3,含三裁定与实施记录)。 +- 兑换入口跨实例限流(当前进程内退避,与 `loginGuard` 同档)——仍后续。 +- U7 余量(原子开户/引导、CLI 凭据安全交付、PG 锁串行首管)——仍后续,另行任务。 diff --git a/modules/backend b/modules/backend index 467718a5..349a47de 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit 467718a519eb21980e61b8df541de53e94130e95 +Subproject commit 349a47de6fc2f968bdb4afb8b2cffee8f77ab43a diff --git a/modules/frontend b/modules/frontend index 9fc7da2a..44b96468 160000 --- a/modules/frontend +++ b/modules/frontend @@ -1 +1 @@ -Subproject commit 9fc7da2ace8578d87d2601adcbf831e0b955aa68 +Subproject commit 44b964682c89535342c283aa73492c758b16c732 From ecf310fcf102173e5c7421aac791b1740fa6baed Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 13 Oct 2026 04:47:02 +0000 Subject: [PATCH 2/3] Fix multi-instance seeding for system-managed settings and repin backend Why: The follow-up CI exposed that backend #188 broke the Dev multi-instance suite: serve --mock seeded runtime.mock at the user scope, which system-managed settings now reject, so instances never became healthy. Backend #190 seeds the startup flag into the system scope; this PR repins and drops the now-invalid alice user-scope write. Evidence: Backend #190 CI success at head 0af1ebc (GATE); this PR's composite CI re-runs make test-multi-instance (GATE for the fix). Impact: backend pin 741da4a; multi-instance test comments updated to the system-managed regime. Refs: Backend #188, #190. --- modules/backend | 2 +- tests/integration/multi-instance/multi_instance_test.go | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/backend b/modules/backend index 349a47de..741da4a0 160000 --- a/modules/backend +++ b/modules/backend @@ -1 +1 @@ -Subproject commit 349a47de6fc2f968bdb4afb8b2cffee8f77ab43a +Subproject commit 741da4a0b6c8d8e5b665789bda33f65ed3471a0e diff --git a/tests/integration/multi-instance/multi_instance_test.go b/tests/integration/multi-instance/multi_instance_test.go index 6b4d9a0d..bde0fbd5 100644 --- a/tests/integration/multi-instance/multi_instance_test.go +++ b/tests/integration/multi-instance/multi_instance_test.go @@ -459,10 +459,9 @@ func (e *env) loginAlice(t *testing.T) *userClient { apiB: &http.Client{Timeout: httpWait, Transport: bearerRT{key: key}}, streamB: &http.Client{Transport: bearerRT{key: key}}, // SSE 无整体超时;chan 背压控制 } - // --mock 只写 OwnerDefault 的设置;alice 是独立租户,须显式开 mock - // (selectConversationRunner 按 EffectiveSettings 分流),否则 run 走 - // LLMRunner 且无模型配置直接失败。 - e.do(t, uc.api, "PUT", "/api/settings/user", map[string]any{"runtime": map[string]any{"mock": true}}, nil) + // runtime.mock 自系统受管设置体制(backend #188/#190)起由 --mock 播种进 + // 系统层,经 Effective 链对所有租户生效(selectConversationRunner 按 + // EffectiveSettings 分流);alice 的用户层写入会被受管拦截,也不再必要。 return uc } From 7518cdeb7db91c5b54f37ba5a40758958f34dfc3 Mon Sep 17 00:00:00 2001 From: weichen Date: Tue, 13 Oct 2026 04:52:42 +0000 Subject: [PATCH 3/3] Align the core pin with backend's nested agent-system-core pin Why: check-pins failed on the follow-up CI: the newly pinned backend (741da4a) carries deps/agent-system-core at 0f94e4b while Dev's modules/core stayed at ba289e7 - the three-layer pin rule requires the top-level core pin to match. Evidence: 0f94e4b verified as an ancestor of Core origin/main; this PR's composite CI re-runs check-pins (GATE). Impact: modules/core gitlink to 0f94e4b; no source changes. Refs: check-pins failure on job 4204. --- modules/core | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core b/modules/core index ba289e7b..0f94e4b0 160000 --- a/modules/core +++ b/modules/core @@ -1 +1 @@ -Subproject commit ba289e7b1780a29855aef8477bf1ac49bd563eb2 +Subproject commit 0f94e4b062bf8736af3953821fe5d0f67d87ea8e