openxiangda-skill-kit 2.0.0-alpha.39 → 2.0.0-alpha.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/bin.js +0 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -43
- package/dist/index.js.map +1 -1
- package/dist/internal/skill-installer.d.ts +9 -0
- package/dist/internal/skill-installer.d.ts.map +1 -0
- package/dist/internal/skill-installer.js +53 -0
- package/dist/internal/skill-installer.js.map +1 -0
- package/package.json +2 -6
- package/skills/manifest.json +2 -32
- package/skills/openxiangda-v2/SKILL.md +11 -42
- package/skills/openxiangda-v2/references/architecture.md +5 -0
- package/skills/openxiangda-v2/references/backend.md +5 -0
- package/skills/openxiangda-v2/references/data-authz.md +5 -0
- package/skills/openxiangda-v2/references/delivery.md +11 -0
- package/skills/openxiangda-v2/references/frontend.md +5 -0
- package/docs/architecture/admin-shell-v2.md +0 -1030
- package/docs/architecture/ant-design-pro-v6-admin-foundation.md +0 -343
- package/docs/architecture/app-api-user-delegation-v2.md +0 -40
- package/docs/architecture/authorization-consistency-v2.md +0 -419
- package/docs/architecture/best-practice-template-rebuild-v2.md +0 -206
- package/docs/architecture/environment-configuration-kernel-v2.md +0 -290
- package/docs/architecture/field-component-migration-matrix-v1-to-v2.md +0 -76
- package/docs/architecture/field-value-contract-boundary.md +0 -92
- package/docs/architecture/frontend-runtime-mount-v2.md +0 -82
- package/docs/architecture/implementation-roadmap.md +0 -79
- package/docs/architecture/local-development-v2.md +0 -136
- package/docs/architecture/mobile-user-standard-pages-v2.md +0 -88
- package/docs/architecture/native-configuration-projection-v2.md +0 -488
- package/docs/architecture/native-kernel-inventory-v2.md +0 -196
- package/docs/architecture/native-managed-files-v2.md +0 -18
- package/docs/architecture/on-demand-production-environment-v2.md +0 -102
- package/docs/architecture/proven-field-components-and-standard-surfaces-v2.md +0 -133
- package/docs/architecture/release-verification-receipt-v2.md +0 -72
- package/docs/architecture/repository-and-release.md +0 -65
- package/docs/architecture/school-contact-default-access-v2.md +0 -13
- package/docs/architecture/stable-field-protocol-adoption.md +0 -174
- package/docs/architecture/standard-surface-runtime-corrections-v2.md +0 -108
- package/docs/architecture/tenant-public-origin-implementation-blueprint.md +0 -484
- package/docs/architecture/tenant-public-origin-v2.md +0 -236
- package/docs/architecture/verification-orchestration-v2.md +0 -24
- package/docs/backend.md +0 -102
- package/docs/concepts.md +0 -34
- package/docs/data-authz.md +0 -127
- package/docs/delivery.md +0 -77
- package/docs/design/admin/README.md +0 -124
- package/docs/design/admin/data-management-v1.png +0 -0
- package/docs/design/admin/workbench-v1.png +0 -0
- package/docs/design/admin/workflow-detail-v1.png +0 -0
- package/docs/design/admin-pro-v6/README.md +0 -26
- package/docs/design/admin-pro-v6/data-management.png +0 -0
- package/docs/design/admin-pro-v6/workbench.png +0 -0
- package/docs/design/admin-pro-v6/workflow-submit-modal.png +0 -0
- package/docs/design/admin-shell-dashboard-v2.png +0 -0
- package/docs/design/admin-standard-pages-v2.png +0 -0
- package/docs/design/admin-v2/README.md +0 -60
- package/docs/design/admin-v2/data-management.png +0 -0
- package/docs/design/admin-v2/form-detail.png +0 -0
- package/docs/design/admin-v2/form-submit.png +0 -0
- package/docs/design/admin-v2/workbench.png +0 -0
- package/docs/design/admin-v2/workflow-detail.png +0 -0
- package/docs/design/admin-v2/workflow-submit.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/README.md +0 -293
- package/docs/design/openxiangda-2.0-high-fidelity/admin-component-acceptance.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/admin-data-form.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/admin-workbench.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-approval-preview.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-data-list.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-form.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-request-form.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-request-list.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-submit-workflow-preflight.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-workbench.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/mobile-workflow-detail.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/user-pc-data-list.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/user-pc-form-workflow-preview.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/user-pc-request-form-approval.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/user-pc-request-list.png +0 -0
- package/docs/design/openxiangda-2.0-high-fidelity/user-pc-workbench.png +0 -0
- package/docs/field-components.md +0 -93
- package/docs/frontend.md +0 -78
- package/docs/getting-started.md +0 -148
- package/docs/index.md +0 -27
- package/docs/llms.txt +0 -20
- package/docs/reference/cli.md +0 -69
- package/docs/reference/mcp.md +0 -31
- package/docs/school-contact-relations.md +0 -136
- package/docs/workflow-events.md +0 -86
- package/skills/openxiangda-v2-architecture/SKILL.md +0 -30
- package/skills/openxiangda-v2-architecture/agents/openai.yaml +0 -4
- package/skills/openxiangda-v2-backend/SKILL.md +0 -48
- package/skills/openxiangda-v2-backend/agents/openai.yaml +0 -4
- package/skills/openxiangda-v2-data-authz/SKILL.md +0 -58
- package/skills/openxiangda-v2-data-authz/agents/openai.yaml +0 -4
- package/skills/openxiangda-v2-delivery/SKILL.md +0 -88
- package/skills/openxiangda-v2-delivery/agents/openai.yaml +0 -4
- package/skills/openxiangda-v2-frontend/SKILL.md +0 -50
- package/skills/openxiangda-v2-frontend/agents/openai.yaml +0 -4
- package/skills/openxiangda-v2-workflow-events/SKILL.md +0 -56
- package/skills/openxiangda-v2-workflow-events/agents/openai.yaml +0 -4
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
# 稳定字段数据协议采用与声明分层决策
|
|
2
|
-
|
|
3
|
-
状态:2026-08-16 已确认,OpenXiangda 2.0 实现必须遵守
|
|
4
|
-
|
|
5
|
-
适用范围:OpenXiangda 2.0 Data 声明、编译器、类型生成、Data API 适配、Field Kit、默认 Admin/用户端页面和参考应用。V1 应用运行时和发布链不在改造范围内。
|
|
6
|
-
|
|
7
|
-
## 1. 决策
|
|
8
|
-
|
|
9
|
-
OpenXiangda 2.0 原样采用已经长期运行的字段**数据协议**:值形状、PostgreSQL 物理存储、写入归一化、查询语义、索引策略,以及人员、部门、文件等平台数据能力保持不变。
|
|
10
|
-
|
|
11
|
-
V1 面向低代码设计器的完整组件 Schema 不作为 2.0 的数据合同。`required`、默认值、placeholder、隐藏、禁用、布局、联动、具体控件等展示属性可以按 2.0 页面需求重新设计;它们不能继续伪装成数据库约束或后端业务校验。
|
|
12
|
-
|
|
13
|
-
2.0 将字段数据、服务端写入规则和默认页面表现拆成三个独立且单向依赖的合同:
|
|
14
|
-
|
|
15
|
-
```text
|
|
16
|
-
Data Definition(权威数据结构)
|
|
17
|
-
├── PostgreSQL 存储计划
|
|
18
|
-
├── 稳定字段值 codec
|
|
19
|
-
├── Data API 结构校验/查询/索引
|
|
20
|
-
└── 生成 TypeScript 类型
|
|
21
|
-
|
|
22
|
-
Server Write Contract(权威业务不变量)
|
|
23
|
-
├── NestJS DTO/domain 校验
|
|
24
|
-
├── App API / Data API 服务端约束
|
|
25
|
-
└── 并发、幂等与业务错误
|
|
26
|
-
|
|
27
|
-
Surface Definition(可选默认 UI)
|
|
28
|
-
├── Admin 表单/列表/详情
|
|
29
|
-
├── 用户端 Desktop/Mobile 页面
|
|
30
|
-
└── 控件、顺序、布局、提示和客户端校验
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
自定义页面可以完全不声明或不消费 Surface Definition,但仍必须提交稳定字段值并通过服务端写入规则。Surface 的必填、隐藏和默认值只影响体验;真正的业务必填、范围和状态约束必须由服务端合同执行。
|
|
34
|
-
|
|
35
|
-
这不是把 V1 Admin、页面壳、低代码编辑器或发布流程带入 2.0。2.0 的 Umi/Ant Design Pro Admin、双端用户页面、NestJS 后端、AppPackage、环境和发布仍按绿地架构实现。
|
|
36
|
-
|
|
37
|
-
## 2. 能力所有者
|
|
38
|
-
|
|
39
|
-
| 能力 | 唯一所有者 |
|
|
40
|
-
| --- | --- |
|
|
41
|
-
| 字段逻辑数据类型、稳定值形状 | Data Definition + 平台稳定字段数据协议 |
|
|
42
|
-
| 字段到 PostgreSQL 列的映射 | 平台 Data 存储规划器 |
|
|
43
|
-
| 结构校验、查询操作符和索引 | 平台 Data API |
|
|
44
|
-
| 业务必填、业务范围、跨字段/状态校验 | 应用 NestJS domain/App API,或显式服务端 Data write constraint |
|
|
45
|
-
| 人员、部门、文件、图片、富文本、签名和位置后端能力 | 对应平台服务 |
|
|
46
|
-
| 默认 Desktop/Mobile/Readonly/List/Detail 外观 | OpenXiangda 2.0 Field Kit + Surface Definition |
|
|
47
|
-
| 自定义页面布局与交互 | 应用前端;不拥有数据协议或授权 |
|
|
48
|
-
| 流程节点字段读写状态 | Workflow Kernel Surface;后端最终校验 |
|
|
49
|
-
|
|
50
|
-
`required` 如果只出现在 Surface 中就是客户端提示;只有出现在 Server Write Contract 或数据库约束中才是业务不变量。编译器和文档必须明确区分,不能把两者自动等同后让自定义页面误以为可以信任前端。
|
|
51
|
-
|
|
52
|
-
## 3. 固定数据协议不变量
|
|
53
|
-
|
|
54
|
-
1. 简单字段继续使用现有原生列映射:文本/富文本为 `TEXT`,数字为 `FLOAT`,日期为 `TIMESTAMP`。
|
|
55
|
-
2. 日期范围继续展开为 `<fieldId>_start`、`<fieldId>_end` 两个 `TIMESTAMP` 列,对外保持既有日期范围值语义。
|
|
56
|
-
3. 选择、人员、部门、附件、图片、子表、级联、地址、关联数据、位置、签名和 JSON 等复杂字段继续使用 `JSONB`。
|
|
57
|
-
4. 选择类、人员和部门继续保存稳定的 `{ label, value }` 快照;单值为对象,多值始终为数组。展示使用 `label`,业务比较、查询和授权使用 `value`。
|
|
58
|
-
5. 附件和图片继续使用稳定附件项数组及现有上传、下载、预览、压缩变体协议;不得替换为未经迁移的新 `DataFileRef` 表单值,也不得在应用中直接拼接存储凭据。
|
|
59
|
-
6. 子表继续保存对象数组;子字段值协议和查询能力按现有规则执行,不允许页面自行改变持久化结构。
|
|
60
|
-
7. 字段写入保持“提交协议值、查询返回同一协议值”,平台只执行现有归一化与安全校验,不做应用可见的隐式翻译。
|
|
61
|
-
8. 现有 BTREE、JSONB value 表达式和 GIN `jsonb_path_ops` 语义保持一致。2.0 可以重构实现位置,但不能改变相同数据类型和索引声明产生的结果。
|
|
62
|
-
9. 已存在字段的物理类型不可隐式变更。类型变化继续 fail closed,并要求显式 shadow migration 和明确回填规则。
|
|
63
|
-
10. 数据权限和业务校验始终由后端执行。前端隐藏、只读、客户端校验和默认值不能扩大权限,也不能替代服务端约束。
|
|
64
|
-
|
|
65
|
-
新增数据类型必须有新的稳定 type code 和显式协议版本,不能修改既有类型的存储和值语义。
|
|
66
|
-
|
|
67
|
-
## 4. 最小 Data Definition
|
|
68
|
-
|
|
69
|
-
2.0 应用默认只声明字段 code、字段名称和逻辑数据类型。单值/多值使用不同 type code,使值形状无需额外低代码参数即可确定:
|
|
70
|
-
|
|
71
|
-
```ts
|
|
72
|
-
export default defineDataResource({
|
|
73
|
-
code: 'purchase_request',
|
|
74
|
-
name: '采购申请',
|
|
75
|
-
fields: {
|
|
76
|
-
title: data.text('申请标题'),
|
|
77
|
-
amount: data.number('采购金额'),
|
|
78
|
-
applicant: data.user('申请人'),
|
|
79
|
-
approvers: data.users('审批人'),
|
|
80
|
-
department: data.department('申请部门'),
|
|
81
|
-
status: data.option('状态'),
|
|
82
|
-
tags: data.options('标签'),
|
|
83
|
-
attachments: data.attachments('附件'),
|
|
84
|
-
},
|
|
85
|
-
indexes: [
|
|
86
|
-
data.index('by_status_created', ['status', 'createdAt']),
|
|
87
|
-
data.index('by_department', ['department']),
|
|
88
|
-
],
|
|
89
|
-
});
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`fields` 的对象 key 是稳定字段 code;factory 只确定稳定数据类型和值协议。应用不声明 `componentName`、PostgreSQL 类型、serializer、query operator、index method 或 renderer。索引只声明业务字段组合和是否唯一,平台根据稳定数据类型选择普通列、`value` 表达式或 GIN 实现。
|
|
93
|
-
|
|
94
|
-
初始 type code 至少覆盖当前稳定数据能力:文本、数字、日期、日期范围、单/多选项、单/多人员、单/多部门、附件、图片、子表、级联、地址、位置、签名、富文本、JSON、流水号和关联数据。V1 的 `EmployeeSelectField`、`TextareaField`、`TableField`、`Jsx` 等名称进入审计映射,但不是新源码必须继续使用的 UI 组件名。
|
|
95
|
-
|
|
96
|
-
Data Definition 只保证结构正确:例如人员值必须是稳定 `{label,value}`,附件必须是附件项数组,数字能够按既有方式写入。它默认不判断“采购金额必须大于零”“状态只能从草稿变为已提交”等业务规则。
|
|
97
|
-
|
|
98
|
-
## 5. Server Write Contract
|
|
99
|
-
|
|
100
|
-
真正影响数据正确性的约束必须在服务端表达并执行,主要有两种方式:
|
|
101
|
-
|
|
102
|
-
1. 复杂业务写入通过 NestJS App API,由 DTO/domain service 校验必填、范围、跨字段关系、状态迁移和外部依赖。
|
|
103
|
-
2. 直接开放标准 Data API CRUD 的资源,可以声明少量平台服务端 write constraints;它们由 Data API 执行,并可投影给默认页面作为客户端提示。
|
|
104
|
-
|
|
105
|
-
默认页面可以把服务端约束投影为必填标记、数字范围和错误文案,但投影不是新的事实源。自定义页面即使不展示这些提示,服务端仍拒绝非法写入。只有纯展示偏好的 `ui.requiredHint`、默认值或隐藏设置不会升级成服务端约束。
|
|
106
|
-
|
|
107
|
-
前端、CLI 和生成客户端应区分结构错误、业务校验错误、权限错误和 revision 冲突,并把服务端字段错误映射回对应控件;不能只返回一个泛化的“提交失败”。
|
|
108
|
-
|
|
109
|
-
## 6. Surface Definition
|
|
110
|
-
|
|
111
|
-
Surface 是可选的默认页面协议,不参与建表:
|
|
112
|
-
|
|
113
|
-
```ts
|
|
114
|
-
export const purchaseCreateSurface = defineFormSurface({
|
|
115
|
-
resource: 'purchase_request',
|
|
116
|
-
fields: {
|
|
117
|
-
title: ui.text({ placeholder: '填写本次采购事项' }),
|
|
118
|
-
applicant: ui.user({ readonly: true }),
|
|
119
|
-
department: ui.department(),
|
|
120
|
-
amount: ui.money({ unit: '元', precision: 2 }),
|
|
121
|
-
status: ui.radio({ options: purchaseStatusOptions }),
|
|
122
|
-
attachments: ui.attachment({ maxCount: 10 }),
|
|
123
|
-
},
|
|
124
|
-
desktop: desktopFormLayout(...),
|
|
125
|
-
mobile: mobileFormLayout(...),
|
|
126
|
-
});
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
不声明 Surface 时,平台按字段类型和名称生成干净的默认列表、表单和详情:字段顺序使用 Data Definition 顺序,控件和只读 renderer 使用 Field Kit 默认映射,不猜业务必填、默认值或隐藏逻辑。
|
|
130
|
-
|
|
131
|
-
自定义页面可以直接使用 Field Kit 组件、生成的 Data 类型和 Data/App API 客户端,而不使用 `defineFormSurface`。平台组件负责输出稳定字段值;页面负责交互;服务端负责最终正确性。
|
|
132
|
-
|
|
133
|
-
### 6.1 移动字段组件边界
|
|
134
|
-
|
|
135
|
-
用户端 Mobile Renderer 和 AI 生成的移动页面,对平台已经支持的持久化字段类型必须使用 Mobile Field Kit,不只限于人员、部门、附件和图片。适用范围至少包括文本、长文本、数值、金额、布尔、单选、多选、下拉单选、下拉复选、级联选择、日期、日期时间、日期区间、人员、部门、地址、位置、附件、图片、富文本、签名和子表。该要求同时复用稳定值 codec 与已经验证的移动交互,不允许把 Ant Design 桌面控件、原生 `input/select/file` 或未经平台适配的通用字段控件直接放进移动表单。
|
|
136
|
-
|
|
137
|
-
Mobile Field Kit 负责触摸目标、软键盘、底部选择面板、安全区、搜索与多选收起、日期/区间选择步骤、时区和值归一化、地址级联与平台数据、上传预览以及取消/确认状态。它可以在内部组合经过评审的移动组件库,但应用页面不拥有这些平台字段的值转换和交互实现。应用仍可使用移动组件库实现导航、布局、卡片、按钮、普通弹层和不写入平台字段的临时交互。
|
|
138
|
-
|
|
139
|
-
自定义移动页面的“自定义”指页面布局、信息组织和业务交互可完全自定义,不代表重新发明平台字段控件。平台尚未覆盖的新字段必须先通过显式 Field Kit 扩展注册 renderer、codec、只读/list/detail 表现和测试;不得在单个页面中静默降级为临时控件。Admin 的 PC 页面和用户端 Desktop Renderer 可组合 Ant Design/ProComponents,但默认页面仍优先使用 Desktop Field Kit 保持值和展示一致;人员、部门、地址、位置、附件、图片等平台集成字段在桌面自定义页中也继续使用 Field Kit。
|
|
140
|
-
|
|
141
|
-
工作流页面在基础 Surface 上叠加 Kernel 返回的 field policy。节点的隐藏、只读和必填由当前 Surface 展示并由流程/App API 后端再次校验,不写回 Data Definition。
|
|
142
|
-
|
|
143
|
-
## 7. 实现与迁移边界
|
|
144
|
-
|
|
145
|
-
1. 从 V1 组件注册表、服务端存储映射、写入 handler、查询 switch、索引集合、导入导出、SDK tests 和冻结 FormRelease 提取**数据协议矩阵**;不要求 2.0 复刻所有 V1 低代码展示属性。
|
|
146
|
-
2. 将稳定数据协议定义为不依赖 React 的共享合同和黄金测试向量;V1 代码继续独立运行,2.0 不反向引用其发布工具。
|
|
147
|
-
3. 2.0 Data 编译器从最小 Data Definition 确定性生成存储计划、Data API 合同和 TypeScript 类型。
|
|
148
|
-
4. 2.0 Field Kit 为每个稳定数据类型提供 Desktop/Mobile/Readonly/List/Detail 默认 renderer;Mobile Field Kit 覆盖所有已支持的标准持久化字段,优先移植并重新验证 1.x 中成熟的移动选择、日期、地址、组织、附件等控制器和测试,而不是用桌面组件替代。
|
|
149
|
-
5. Surface Definition 和自定义页面只消费生成字段类型,不拥有或复制存储 codec。
|
|
150
|
-
6. Admin 只提供桌面 renderer;用户端分别提供 Desktop 与 Mobile composition。两端提交完全相同的稳定字段值。
|
|
151
|
-
|
|
152
|
-
## 8. 失败、并发和安全边界
|
|
153
|
-
|
|
154
|
-
- 未知数据类型、缺失 codec、存储类型漂移、查询操作符漂移或索引策略漂移在 generate/check 阶段失败,不能退化为任意 JSONB 后继续发布。
|
|
155
|
-
- Surface 缺失 renderer 时默认页面构建失败,但不改变资源的数据库定义;自定义页面不受无关 Surface 影响。
|
|
156
|
-
- 文件上传成功但业务写入未完成时继续使用平台既有的未绑定文件清理语义;重复上传、预览鉴权和 Blob 下载由平台组件处理。
|
|
157
|
-
- 组织选择调用平台人员/部门能力并产生稳定协议值;自定义页面也不应自行发明人员、部门 ID 或附件结构。
|
|
158
|
-
- 移动页面直接使用 Ant Design 桌面数据录入控件、原生字段控件或绕过 Mobile Field Kit 的标准持久化字段时,生成检查与模板静态审计失败。移动组件库只可用于页面结构、动作和平台尚未覆盖但已显式注册的 Field Kit 扩展。
|
|
159
|
-
- 类型或索引变更必须在 preproduction 对真实 PostgreSQL 预检;production 只晋级相同 AppVersion 和确定性存储计划。
|
|
160
|
-
|
|
161
|
-
## 9. 回滚边界
|
|
162
|
-
|
|
163
|
-
本决策不修改 V1 运行时代码和线上表。2.0 实现的回滚单位是 Data 编译器、Field Kit、Surface 包或 AppVersion。Surface 可以随前端版本回滚;Data Definition 和 Server Write Contract 按数据库/AppVersion 兼容边界回滚,不能通过切换 UI 绕过。
|
|
164
|
-
|
|
165
|
-
## 10. 可证伪验收
|
|
166
|
-
|
|
167
|
-
1. 自动计算 `V1 存储映射 ∪ 写入处理器 ∪ 查询分支 ∪ 索引集合 ∪ 冻结应用字段类型`;减去数据协议矩阵后必须为空。
|
|
168
|
-
2. 每个稳定数据类型至少有 Definition → DDL、写入 → 读取、空值、单/多值、查询操作符和索引计划黄金测试。
|
|
169
|
-
3. 在真实 PostgreSQL 中创建临时资源,验证物理列、往返值、筛选、排序和索引 DDL 与稳定协议一致。
|
|
170
|
-
4. 同一服务端 write constraint 通过默认页面和自定义 API 客户端写入都得到相同结果;只声明 Surface 必填时,测试明确证明它不冒充服务端约束。
|
|
171
|
-
5. Desktop、Mobile、Readonly、列表和详情 renderer 使用同一黄金值;提交结果与稳定数据协议逐字段深度相等。Mobile 在真实触摸视口覆盖单/多选、下拉、级联、日期/日期区间、地址、人员/部门、数值键盘、附件/图片和子表主路径。
|
|
172
|
-
6. 人员、部门、附件、图片、富文本、签名、位置和子表完成平台 API 集成测试,应用源码没有自建替代数据协议。
|
|
173
|
-
7. 2.0 构建静态审计禁止 ID-only 人员/部门值、未经批准的 `DataFileRef` 表单值和页面级持久化格式翻译。
|
|
174
|
-
8. V1 View、表单、流程、自动化与发布回归无变化。
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Standard surface runtime corrections v2
|
|
2
|
-
|
|
3
|
-
Status: accepted for implementation on 2026-08-20.
|
|
4
|
-
|
|
5
|
-
## Problem evidence
|
|
6
|
-
|
|
7
|
-
- Standard Admin filters send scalar `eq` predicates for stable JSON option and
|
|
8
|
-
directory values. PostgreSQL rejects values such as `software` as invalid
|
|
9
|
-
JSON with SQLSTATE `22P02`.
|
|
10
|
-
- A department field is rendered by the platform field kit in forms, but its
|
|
11
|
-
search value is not normalized with the same field contract before a Data
|
|
12
|
-
API query is created.
|
|
13
|
-
- Admin tabs persist path metadata while the active Umi `Outlet` is unmounted
|
|
14
|
-
on every navigation. Returning to a tab therefore recreates and reloads the
|
|
15
|
-
page. Query-string changes do not have an explicit page-instance invalidation
|
|
16
|
-
key.
|
|
17
|
-
- The official mobile application shell explicitly contributes a role switcher
|
|
18
|
-
even though this surface is the normal end-user entry.
|
|
19
|
-
- The procurement reference workflow binds department approval to an
|
|
20
|
-
application role scope. The configured platform organization department
|
|
21
|
-
supervisor is therefore not consulted.
|
|
22
|
-
- Native clients request the durable record audit endpoint at
|
|
23
|
-
`/native/data/:resource/records/:id/audit`, but the Native Data controller has
|
|
24
|
-
no matching route. Desktop and mobile detail pages load data and audit in one
|
|
25
|
-
request group, so the missing audit route makes the whole detail page fail.
|
|
26
|
-
- The desktop end-user workflow submission route removes primary navigation
|
|
27
|
-
without contributing a back action.
|
|
28
|
-
|
|
29
|
-
## Capability owners
|
|
30
|
-
|
|
31
|
-
- `openxiangda-admin` owns standard search-value normalization, tab metadata,
|
|
32
|
-
and bounded mounted page instances.
|
|
33
|
-
- `openxiangda-field-kit` remains the owner of department and other platform
|
|
34
|
-
field controls and stable values; no application-specific selector is added.
|
|
35
|
-
- Native Data API owns durable business-audit reads and row/field enforcement.
|
|
36
|
-
- Platform organization data and `department_supervisor` resolution are the
|
|
37
|
-
only owners of configured department supervisors.
|
|
38
|
-
- `openxiangda-user` owns standard desktop submission navigation affordances;
|
|
39
|
-
the application supplies the destination.
|
|
40
|
-
- The application template owns which optional controls appear on its mobile
|
|
41
|
-
shell and which workflow provider its domain workflow selects.
|
|
42
|
-
|
|
43
|
-
## Stable invariants and affected contracts
|
|
44
|
-
|
|
45
|
-
1. Data API remains the only business-record store and query boundary. Stable
|
|
46
|
-
directory and option values keep their existing `{ label, value }` shapes.
|
|
47
|
-
2. Search predicates for those values use JSON containment; text, dates,
|
|
48
|
-
numbers, booleans, and physical scalar identifiers keep their current
|
|
49
|
-
operators.
|
|
50
|
-
3. Tabs, mounted page instances, query responses, and drafts remain separate
|
|
51
|
-
state. At most twelve tabs and six mounted pages are retained per identity.
|
|
52
|
-
4. A tab is identified by pathname. A change to that pathname's search/hash
|
|
53
|
-
location key remounts the active page and therefore reloads URL-bound data.
|
|
54
|
-
5. Identity epoch changes discard every mounted instance. Closing or LRU
|
|
55
|
-
eviction discards only the affected instance; the persisted tab may remain.
|
|
56
|
-
6. Native audit returns the existing `openxiangda.data-audit-page/v2`
|
|
57
|
-
contract. No second application audit API or database is introduced.
|
|
58
|
-
7. Native audit rechecks the current role's resource capability, row policy,
|
|
59
|
-
and field policy before returning each durable outbox event.
|
|
60
|
-
8. Mobile RoleSession behavior is unchanged; only the visible top-level role
|
|
61
|
-
switch button is removed from the standard user template.
|
|
62
|
-
9. Workflow Kernel contracts do not change. The reference binding selects the
|
|
63
|
-
already-supported `department_supervisor` provider with `departmentId`
|
|
64
|
-
facts.
|
|
65
|
-
10. OpenXiangda 1.x applications and runtime contracts are not affected.
|
|
66
|
-
|
|
67
|
-
## Failure, concurrency, security, and resource bounds
|
|
68
|
-
|
|
69
|
-
- Invalid or unreadable search fields still fail closed at Data API. The Admin
|
|
70
|
-
never falls back to browser filtering.
|
|
71
|
-
- Cached pages are hidden but remain mounted. LRU eviction is deterministic and
|
|
72
|
-
bounded to six instances; identity changes synchronously invalidate the pool.
|
|
73
|
-
- A changed URL location key replaces only the active cached instance. Stale
|
|
74
|
-
requests remain guarded by each standard page's request generation.
|
|
75
|
-
- Audit pagination is bounded, reads at most 500 matching durable events, and
|
|
76
|
-
omits events whose record snapshot no longer passes the current row policy.
|
|
77
|
-
- Audit is read-only and introduces no lock, receipt, retry loop, or mutable
|
|
78
|
-
application state.
|
|
79
|
-
- Department supervisor resolution remains tenant-scoped and uses the existing
|
|
80
|
-
organization service. Empty resolution continues to fail closed.
|
|
81
|
-
|
|
82
|
-
## Rollback boundary
|
|
83
|
-
|
|
84
|
-
- Platform rollback is the previous platform-server image; no SQL migration is
|
|
85
|
-
required.
|
|
86
|
-
- Frontend rollback is the previous independently published package set.
|
|
87
|
-
- Application rollback is the previous immutable preproduction AppVersion.
|
|
88
|
-
- No compatibility switch or duplicate endpoint is kept after rollback.
|
|
89
|
-
|
|
90
|
-
## Falsifiable verification
|
|
91
|
-
|
|
92
|
-
1. Admin tests prove department search uses the Field Kit control and stable
|
|
93
|
-
option/directory values compile to JSON containment rather than scalar `eq`.
|
|
94
|
-
2. Admin lifecycle tests prove switching between two tabs preserves component
|
|
95
|
-
state, the seventh cacheable page evicts the least recently used instance,
|
|
96
|
-
closing a tab unmounts it, identity changes clear all instances, and a query
|
|
97
|
-
change remounts the active instance.
|
|
98
|
-
3. Native Data tests prove the audit route exists, returns masked durable
|
|
99
|
-
history, enforces current row policy, and supports bounded pagination.
|
|
100
|
-
4. Workflow tests/config checks prove a configured platform department
|
|
101
|
-
supervisor resolves for `department-review` without an application-managed
|
|
102
|
-
department membership.
|
|
103
|
-
5. Mobile Chromium has no role button and can open a purchase detail page.
|
|
104
|
-
6. Desktop Chromium can return from the standalone submission page and URL
|
|
105
|
-
query changes reload the appropriate page.
|
|
106
|
-
7. Platform `verify:openxiangda-v2:release`, toolchain `verify:release`, and the
|
|
107
|
-
standard application's generate/check/test/build gates pass before a new
|
|
108
|
-
preproduction deployment is activated.
|