mirror of
https://github.com/ThearchyHelios/AgentLab.git
synced 2026-11-25 22:22:20 +00:00
普通用户建应用集成收尾:
- 问数据和个人应用的图放行绑定只读查询等合规工具的调用工具节点,只读和遮罩在这条路径上生效;被治理成写入的工具在只读运行里直接拒;知识库范围在工具层固定(图级默认值、参数名纠错、Agent 都改不了) - 个人应用的刷新和个人蓝图的试运行只有拥有者能读:运行、事件、证据、工件、文件、运行与审批列表、对比、可验证报告、质询、假设分析、提取工作流一并收紧;个人蓝图的试运行不论谁发起都按个人应用约束 - 共享蓝图只给拥有者、对应应用的管理者、管理员,看不到的一律 404;审核副本归审核人;管理员看别人的个人应用只有元数据、可以归档 - 记录表跨版本汇总(只读挂载旧版本、按当前列 UNION ALL、各版本各自固定高水位,缺的版本照实写进印章);停用前发起的运行可以继续写旧版本;更正沿用原提交人、更正人记审计 - 约定收口:待办种类 review、事件 file.extracted、表单错误 file、模板定义带示例与预置;前端类型一次补齐、去掉临时的局部类型;审核待办卡不再给打不开的链接;读附件事件有中文说法;检查脚本补断言
This commit is contained in:
@@ -271,6 +271,28 @@ async def test_on_demand_views(client):
|
||||
await session.commit()
|
||||
|
||||
|
||||
async def test_the_detail_says_whether_the_draft_differs_from_the_published_version(client):
|
||||
"""AppDetail.draft_changed(N6):按发布时的规整方式比草稿和当前发布版——刚发布完一致;改了页面的字、改了岗位绑定都算
|
||||
改过;再发布又一致。只读草稿规整的那一份不算改过(钉住项的级别是发布时按库里补的);没发布过的不给。"""
|
||||
wf, hash_ = await workflow(KPI)
|
||||
spec = kpi_spec(wf, hash_)
|
||||
app_id = await published_app(client, spec, name="按需看板")
|
||||
detail = (await client.get(f"/api/apps/{app_id}")).json()
|
||||
assert detail["draft_changed"] is False, "刚发布完:草稿就是发布版"
|
||||
|
||||
renamed = {**spec, "pages": [{**spec["pages"][0], "title": "周报首页"}]}
|
||||
detail = (await client.patch(f"/api/apps/{app_id}", json={"draft": renamed})).json()
|
||||
assert detail["draft_changed"] is True
|
||||
assert (await client.post(f"/api/apps/{app_id}/publish", json={})).json()["ok"]
|
||||
assert (await client.get(f"/api/apps/{app_id}")).json()["draft_changed"] is False
|
||||
|
||||
bound = {"slots": {"finance": [{"kind": "user", "name": "钱七"}]}}
|
||||
assert (await client.patch(f"/api/apps/{app_id}", json={"draft_bindings": bound})).json()["draft_changed"] is True
|
||||
|
||||
fresh = (await client.post("/api/apps", json={"name": "没发布过", "spec": spec})).json()
|
||||
assert "draft_changed" not in (await client.get(f"/api/apps/{fresh['id']}")).json(), "没发布过的不比"
|
||||
|
||||
|
||||
async def test_auto_views_launch_when_the_page_opens(client):
|
||||
wf, hash_ = await workflow(KPI)
|
||||
app_id = await published_app(client, kpi_spec(wf, hash_, auto=True), name="自动看板")
|
||||
|
||||
Reference in New Issue
Block a user