boardx / boardx/boardx-dev-template

[F07] enroll 真实现:命名空间 / 一次性 token / 首心跳点亮(UC-06)

Open
#791 0 comments 0 reactions 0 assignees View on GitHub
area:auth sprint:p30-02
Dominant language
TypeScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## 交付契约(user_visible_behavior)

/me/agents enroll 向导接真:① @handle/agent-name 在自己命名空间真实查重(err-ns-dup 由服务端判定),运行时选择供应商中立;② 一次性 token mint-on-reveal(继承 p29-F08 scoped token 栈,关闭不可找回),复制接入命令可用;③「等首个心跳」由真实心跳事件点亮(first-heartbeat-waiting → first-heartbeat-live,WS 推送非 mock 定时器),车队实时新增一行;无审批等待(D2);轮换/暂停/退役接真——轮换与退役走输入全名解锁的确认弹窗,吊销后旧 token 即时 401;sub-agent 点号命名归属沿 parent 追溯。

## Story

[requirements/feature-list-draft.md](https://github.com/boardx/boardx-dev-template/blob/main/phases/phase-p30-devportal-platform/requirements/feature-list-draft.md) — 章节 `R7`

## 验证(完成的唯一标准:每条命令退出码 0)

- [ ] `pnpm --filter coord-gateway test`
- [ ] `bash phases/phase-p30-devportal-platform/scripts/verify-enroll-heartbeat.sh`
- [ ] `test -f apps/devportal/e2e/p30/enroll.spec.ts && pnpm --filter devportal exec playwright test e2e/p30/enroll.spec.ts`

证据落盘:`phases/phase-p30-devportal-platform/sprints/sprint-02/evidence/F07.verify.log`

## 实现指引(notes)

aha moment(redesign §6),首心跳点亮延迟应 ≤ 数秒(WS,N2)。enroll API 查重 409、mint-on-reveal 一次性、revoke 即时失效单测归 coord-gateway。e2e spec 待写,锚定批 1 testid:enroll-open → enroll-step-{1,2,3} → 后台 curl 打真心跳 → first-heartbeat-live 点亮 → fleet-row-* 新增;rotate-confirm 输入全名解锁(confirm-dialog 的 ${testid}-confirm 动态拼接在 e2e 落地时核实参,coord-main #751 备注)。敏感 area,挂 rev-security。

## 设计参照

(无 UI 或沿用现有界面)

## 前置依赖

- 无

## 元数据

| phase | sprint | 能力平面 | 优先级 | wave | area |
|---|---|---|---|---|---|
| p30 | 02 | CAP-AUTH | P2 | - | auth |

## 开工流程(agent 必读)

> 本 issue 是仓库的**只读投影**;权威是 [`phases/phase-p30-devportal-platform/feature_list.json`](https://github.com/boardx/boardx-dev-template/blob/main/phases/phase-p30-devportal-platform/feature_list.json)。若两者不一致,以仓库为准。

1. 环境:`./init.sh`(验证失败先修基础状态,别在坏地基上开工)。
2. 认领:`pnpm harness claim --phase p30 --feature F07 --owner <你的-agent-id>`(同一 owner 同时最多一个 in_progress)。
3. 读上下文:[`requirements/`](https://github.com/boardx/boardx-dev-template/blob/main/phases/phase-p30-devportal-platform/requirements)(原始需求)、[`ui-signoff.md`](https://github.com/boardx/boardx-dev-template/blob/main/phases/phase-p30-devportal-platform/ui-signoff.md)(已确认 UI 的组件落点与 data-testid)、[`sprints/sprint-02/session-handoff.md`](https://github.com/boardx/boardx-dev-template/blob/main/phases/phase-p30-devportal-platform/sprints/sprint-02/session-handoff.md)(上一轮交接)。
4. 实现:只做本 feature 的最小实现,不顺手重构无关区域;不碰 `active-features.json`(脚本派生只读)。
5. 验证:逐条跑上方 verification,输出留到 `phases/phase-p30-devportal-platform/sprints/sprint-02/evidence/F07.verify.log`;然后 `pnpm harness verify --sprint p30/02 --feature F07` 门控转 passing——**不允许手改 status**。
6. 提交:分支 `worker/-p30-f07-`,PR 关联本 issue(`Closes #<本 issue 号>`),收尾更新 progress.md 与 session-handoff.md。

完整硬约束见 [`AGENTS.md`](https://github.com/boardx/boardx-dev-template/blob/main/AGENTS.md);多 agent 协作规则见 [`.harness/instructions/multi-agent-coordination.md`](https://github.com/boardx/boardx-dev-template/blob/main/.harness/instructions/multi-agent-coordination.md)。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with requirements/feature-list-draft.md section R7, ui-signoff.md, and the sprint-02 session handoff after running ./init.sh. Read the coord-gateway tests and the listed verification script, then create the referenced e2e/p30/enroll.spec.ts around the stated testids and real heartbeat flow. Done means all three verification commands pass and evidence is saved to the specified F07.verify.log.

Written by the indexing model from the issue text.

Assessment

Tech stack
playwright, typescript
Domain
api, authentication, backend, frontend, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.