测试计划引用:Backend go test ./internal/store ./internal/server ./cmd/agent-system;Frontend test/one-time-password.test.ts、test/loginpage.test.ts 与 e2e/login-key.playwright.ts;Dev 改钉后 make test(CI GATE)
Why: establish the authorized task workspace and its initial baseline.
Evidence: preserved precheck receipt in .task/feature-auth-one-time-password.md; R0=6c90e6c92aca0968158b6fa50ec8065ba0869913.
Impact: task metadata only; the feature workspace starts at 6c90e6c92a.
Refs: .task/feature-auth-one-time-password.md
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=32b585aa0a1c70039cb4bdbd9020390676145d70.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: include the current integration baseline before verification.
Evidence: fetched origin/main=162c5a0160955989608f325b4be30458e3717d16.
Impact: integrate upstream changes without rewriting task history.
Refs: task-sync
Why: the Dev repin passed a fresh-session review and full CI on 115ca51.
Evidence: code-reviewer PASS on 162c5a0..8e7e3c9; ci_wait CI_SUCCESS on 115ca518 (GATE).
Impact: task card only.
Refs: PR #642
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: close the task card inside its own PR so landing it needs no post-merge backfill or separate close PR.
Evidence: .task/feature-auth-one-time-password.md -> .task/archive/feature-auth-one-time-password.md; status 已完成(合入前闭合); PR #642https://git-home.u1680832.nyat.app:30319/weichen/Agent-System-Dev/pulls/642.
Impact: task metadata only; the card is archived within PR #642 and lands with its merge commit.
Refs: task.sh close --self
weichen
merged commit a3d2a591e2 into main2026-10-20 02:45:23 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
feature/auth-one-time-password 任务卡
任务主记录:<PR 链接,交付前填写>;状态:进行中;owner:weichen
基线与授权
权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)=
6c90e6c92a工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-auth-one-time-password(worktree;2026-10-19 由 /tmp 独立克隆迁回主仓,原 worktree 属于 /tmp/Agent-System-Dev-execenv-python-fix 克隆);分支:feature/auth-one-time-password
分支类型:standalone;root_target:main;immediate_target:main;accepting_requirements:false
需求分流:verdict=NEW;selected_initiative=无;requirement_sha256=a2830f221ea249e90c7f023f05c70b78211975a8a2d991af636fe3b9844b645c;triage_receipt=/tmp/auth-one-time-password-triage-20261017.json;receipt_sha256=321041e16d08aa3385ac9e1610c9eb85386caae8bad4bbbfdac1af6b2a2411c0
授权与交付终点:用户 2026-10-17 提出密码管理整改(Codex 会话 rollout 01a148d4);2026-10-19 在遗留项推进中选择“恢复交付”。终点:Backend/Frontend PR 经独立 Review 与 CI 合入,Dev 改钉组合验证后经 #518 合入。未授权:部署到 8788 或任何实例、改写线上账户数据、发版打标;部署与业务验收届时单独请示。
交付模式:goal-first(目标、范围和交付终点一次确认;范围内连续推进)
实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
合入执行:agent(已授权交付范围内,Review 通过、冲突解决且当前 HEAD 的 CI 通过后合入)
人工决策点:仅限目标/范围/验收变更、重大取舍、高后果操作或无法自动判定的业务验收
决策记录(2026-10-19):恢复时发现与已合入的 IAM U3(Dev #626、Backend v0.5.0:“网页管理员不能交付密码或 Key、本人须独立证明才能恢复”)冲突。用户重申:管理员建号可设初始密码、登录后必须改密;管理员可生成一次性随机密码,用它登录后必须改密;用户想起原密码时用原密码登录,一次性密码作废且不需改密。结论:以本卡 R1–R6 为准,替代 IAM U3 中管理员不得交付凭据及恢复提案/本人证明的对应条款;其余 IAM U3 内容(资料、目录、停用)与 super-admin 权限保持。实现改为在各组件最新 main 上新建
feature/auth-one-time-password-r2重做,旧分支(Backend 3ce6a2e、Frontend 7cb17d0)只作参考。当前阶段:合入(组件 PR 已合入:Backend #221 merge 8050c6b、Frontend #114 merge d7768d4;Dev 改钉经 #518 合入);部署与业务验收待单独请示
流程依据:仓库根目录 policy/delivery.md(归档后仍按仓库根目录定位)
目标与非目标
目标:账号只用“用户名 + 密码”登录;管理员在页面建号并设置或生成初始密码;忘记密码时管理员只能生成一次性密码;首次登录与一次性密码登录后强制改密;系统不存在“未设密码”状态。
受影响:Backend
internal/server(账号、认证、恢复路由)、internal/store(账号模型、登录密钥、一次性密码)、cmd/agent-system;Frontend 登录页、我的账户、管理员用户管理与 API 封装。非目标:不改 IAM 角色与项目权限;不保留恢复提案链路;不改动线上数据;不部署。
Agent 实施收据
按根目录 AGENT-EXECUTION.md 路由;外部 Agent 一单元一新进程/工作区。实施、修复与测试的正常候选仅为 Cursor、Antigravity(agy)和 PI;每个候选对安全可恢复失败最多 3 次全新尝试,然后才换下一候选。三者都安全耗尽后,才允许一次全新的 Codex CLI 紧急尝试。Codex 平时只用于规划、方案设计、实施计划或独立 Review。显式 fail-stop(failed-unknown、scope-expansion、blocked、cancelled、无效配置、未对账 Git 状态与安全失败)立即停止。不因推理时长、工具次数、规划方式或首次写文件时间判定失败;尝试只在显式终态失败、进程退出、总超时,或 stdin/stdout/stderr 均无活动的空闲超时时失败。CLI 可在目标、范围与安全边界内自主检查、计划、测试并迭代。实施集成必须是成功 transport 上的 scripts/agent-exec apply,或 pre-commit admit 的精确内容来源。host 直接管理的豁免仅为 .task/、docs/superpowers/specs/ 与 docs/superpowers/plans/**。fallback 列只记录该行是否为 Codex 紧急尝试。安全耗尽不发出 host-fallback-authorized,终态为 unavailable 或 blocked。不授权 host 直接撰写该单元。原始日志保留在源码外收据路径。
b3837c98e7e3c9关联方向与规划
需求分析
方案与计划
go test ./internal/store ./internal/server ./cmd/agent-system;Frontendtest/one-time-password.test.ts、test/loginpage.test.ts与e2e/login-key.playwright.ts;Dev 改钉后make test(CI GATE)阶段记录
探索试验与迭代
同步记录
6c90e6c92a6c90e6c92a证据(Evidence)
交付调度
结果与验证(完成后填写)
bash -n scripts/svc.sh、tests.test_svc_user_help+tests.test_svc26 项 PASS。Dev 组合make test(含真实 PG 多实例)以本 PR CI 为准。部署与业务验收:NOT_RUN(未授权)。redeemLoginKey死代码;initialize-account生成后丢弃的激活 Key;登录耗时可暴露未用 OTP;Frontend 删除了 R6 全仓扫描守护测试;已停用账号行仍显示签发按钮(后端 403);scripts/e2e-duties.sh(手动浏览器验收,非 CI)仍走 login-key 激活;svc.sh 用词“一次性口令”与界面“一次性密码”不一致。规划进展与下一步
合入与清理
make task-sync,git 自动快进合并子模块,无手工冲突解决;同步后与 main 的差异仅任务卡与两个 gitlink。| 同步(记录前对象) |
32b585aa0a|5b3bcf736a| 2026-10-18T04:29:55Z || 同步(记录前对象) |
162c5a0160|1b6d788f39| 2026-10-20T02:16:50Z |