端到端验收修复与指标出具:

- 身份与工具:登录页建第一个管理员(认人接口的 401 说明能不能建);搭建者有只读的人和组名录,选人给候选并核对名字;授权三行带标题;端点请求头名校验(空名、非法名存不进、发不出时说清原因);写入能力在工具页试运行一律演练、不发送,HTTP 状态照实说成败;写记忆不算只读、查询能力只能选同一端点上的只读能力;审批与遮罩的说法和实际规则一致;开登录时不要署名、导入和发布记登录的人;使用者不显示推演等只给搭建者的操作,403 按是否开登录说话;登录页只认一次人
- 流程与实例:图里用到的岗位(派给谁、超时升级给谁、发送确认派给谁)全部派生、没绑人的发布时报错;写外部系统的参数按能力声明的类型收拢后再算哈希和发送,收不成就不发;发起人的实例页只看这一步的状态,处理人才给待办卡;会签进度带登录核实和时间,升级后照实写规则;实例状态写流程的结论(已退回、未确认、等待核实写入结果),核实生效后不再挂失败原因;流程应用首页不派生最近封存运行的结果块,看板没数据时是安静的空态;样例⑩的金额带类型和下限、待办标题带金额,表单上下限前后端一起生效
- 看板与证据:定时任务模板加 ISO 周、上一 ISO 周、本月、上月;出处链穿过原样解析查询结果的整形节点,追不到原始数据的照实说停在哪里,样例⑨改用 cell();应用首页和版本历史都能做成应用;指标块单位不重复;版本列表带退役说明;定时任务页头跟着刷新;删视图要确认、新视图能起名;编辑器属性用中文名、术语带解释
- 指标出具(用户 2026-10-15 拍板):契约只写「指标来自」、上游没有报告撰写节点、成果里没有模型写的话时按指标出具——必需指标齐、指标输入追到原始数据、成果字段里的数回指得上才完整出具;受管级要求每个指标静态地追到原始数据(governed.metric_untraced);出具横幅和应用印章写明按指标
- 受管工作流降为已发布只给管理员(Q8 顺延,服务端同样拦);工作流接口带当前发布版的级别,画布上改过之后也认得出受管工作流
This commit is contained in:
ThearchyHelios
2026-10-15 07:15:37 +08:00
parent 5d42ffb62b
commit 941723b17c
116 changed files with 4917 additions and 631 deletions
+6 -1
View File
@@ -2,12 +2,15 @@
* 身份的接口(/api/auth、/api/users、/api/groups、/api/audit),挂在 api.auth / api.identity 上。形状见 typesApp.ts。
* 开登录时:没登录的请求回 401(前端跳 /login),角色不够回 403。关登录时 /me 恒为 mode='off'。
*/
import type { AuditRow, AuthMode, GroupRow, Principal, Role, UserRow } from '../typesApp'
import type { AuditRow, AuthMode, Directory, GroupRow, Principal, Role, UserRow } from '../typesApp'
import { del, get, patch, post, put, qs, type RequestOptions } from './http'
export const auth = {
me: (opts?: RequestOptions) => get<Principal>('/auth/me', opts),
login: (body: { username: string; password: string }) => post<Principal>('/auth/login', body),
/** 建第一个管理员并以他登录:账号密码登录模式下、还没有能登录的管理员时(/auth/me 的 401 说 can_bootstrap) */
bootstrap: (body: { username: string; password: string; display_name?: string }) =>
post<Principal>('/auth/bootstrap', body),
logout: () => post<void>('/auth/logout'),
/** OIDC:浏览器整页跳转到这里 */
oidcStartUrl: (next?: string) => `/api/auth/oidc/start${qs({ next })}`,
@@ -24,6 +27,8 @@ export const identity = {
updateUser: (id: string, body: { display_name?: string; email?: string; role?: Role; disabled?: boolean;
password?: string }) => patch<UserRow>(`/users/${encodeURIComponent(id)}`, body),
groups: () => get<{ items: GroupRow[] }>('/groups'),
/** 选人用的名录:搭建者及以上只读(/users、/groups 只给管理员) */
directory: () => get<Directory>('/directory'),
createGroup: (body: { name: string; label?: string }) => post<GroupRow>('/groups', body),
setMembers: (id: string, members: string[]) => put<GroupRow>(`/groups/${encodeURIComponent(id)}/members`, { members }),
deleteGroup: (id: string) => del(`/groups/${encodeURIComponent(id)}`),
+3 -1
View File
@@ -114,8 +114,10 @@ export const endpoints = {
update: (id: string, body: Partial<EndpointRow> & { version: number }) =>
patch<EndpointRow>(`/endpoints/${encodeURIComponent(id)}`, body),
remove: (id: string) => del(`/endpoints/${encodeURIComponent(id)}`),
/** ok:基础地址回了 2xx;reachable:连上了、拿到了响应(回 404、401 时连上了但不算成功)。message 是服务端照实写的那句 */
test: (id: string, env: 'test' | 'prod') =>
post<{ ok: boolean; status: number | null; message: string }>(`/endpoints/${encodeURIComponent(id)}/test${qs({ env })}`),
post<{ ok: boolean; reachable?: boolean; status: number | null; message: string }>(
`/endpoints/${encodeURIComponent(id)}/test${qs({ env })}`),
}
export const notify = {
+4 -2
View File
@@ -97,10 +97,12 @@ export function actorHeader(): Record<string, string> {
/**
* 开了登录、会话没了(过期、被注销):服务端回 401,整页跳到登录页,登录后回到原处。整页跳而不是路由跳:
* 外壳里各个 store 拿的都是上一个人的数据,重新加载一遍最干净。登录接口自己的 401(密码不对)和登录页上的请求不跳
* 外壳里各个 store 拿的都是上一个人的数据,重新加载一遍最干净。登录接口自己的 401(密码不对)和登录页上的请求不跳。
* 认人接口(/auth/me)的 401 也不跳:它是「还没登录」的回答,外壳拿到后自己去登录页(App 启动时)——在这里再整页跳一次,
* 登录页加载起来又认一遍人,同一次进门要请求好几次
*/
function toLogin(path?: string) {
if (typeof window === 'undefined' || path === '/auth/login') return
if (typeof window === 'undefined' || path === '/auth/login' || path === '/auth/me') return
const { pathname, search } = window.location
if (pathname === '/login') return
const back = `${pathname}${search}`