业务本体与标准实体:跨源键值对齐、对账共变算子、健康证据链与实体助手

- 新增标准业务实体(CanonicalEntity)模型、确定性跨源编码翻译、后台候选实体扫描与文档驱动实体智能助手
- 新增指标本体图谱(factor / reconciles_with / upstream_driver)、DAG 防环校验以及 ontology_neighbors / source_health 内置工具
- 新增跨源对账(analysis_reconcile)与滞后共变(analysis_cochange)分析算子,打通 [[h:H1]] 数据源健康证据链、报告导出与本体消融评测
- 数据目录新增「标准业务实体」视图与候选审阅工作台,口径页集成指标本体拓扑面板与端到端浏览器检查
This commit is contained in:
ThearchyHelios
2026-11-12 12:57:53 +08:00
parent 2f90f0eb3a
commit 8d9a712eae
106 changed files with 16654 additions and 295 deletions
+39 -1
View File
@@ -582,7 +582,10 @@ await section('入口:使用者选人只出候选池里的人,不在池里
await field.waitFor({ timeout: 15000 })
const input = field.locator('input.field')
await input.fill('费')
await page.waitForFunction(() => !!document.querySelector('[data-field="approver"] datalist option'), null, { timeout: 5000 })
await page.waitForFunction(() => {
const options = [...document.querySelectorAll('[data-field="approver"] datalist option')]
return options.length === 1 && options[0].getAttribute('value') === 'fay'
}, null, { timeout: 5000 })
.catch(() => {})
const options = await field.locator('datalist option').evaluateAll((els) => els.map((e) => `${e.getAttribute('value')}|${e.textContent}`))
check('边输入边按开头取候选:列表里是候选池给的人,显示名作说明', options.join(',') === 'fay|费伊', options.join(','))
@@ -675,6 +678,41 @@ await section('实例页:状态、进度、待办卡、动作状态', async ()
check('没有未捕获的运行时错误', page.errors.length === 0, page.errors[0] ?? '')
})
await section('实例页:慢轮询不叠加、离开后不再轮询', async () => {
const { page } = await open({ state: { writes: [] } })
await page.route('**/api/auth/me', (route) => route.fulfill({ json: {
mode: 'local', username: 'tester', display_name: '测试使用者', role: 'user', groups: [], verified: true,
} }))
await page.route('**/api/health', (route) => route.fulfill({ json: { status: 'ok', service: 'agentlab' } }))
let hits = 0
let active = 0
let maxActive = 0
let slow = false
await page.route('**/api/apps/app_claim/instances/run_claim_1', async (route) => {
hits++
active++
maxActive = Math.max(maxActive, active)
if (slow) await new Promise((resolve) => setTimeout(resolve, 5200))
active--
await route.fulfill({ json: { ...INSTANCE, status: 'running' } }).catch(() => {})
})
await page.goto(`${WEB}/apps/app_claim/i/run_claim_1`)
await page.locator('[data-instance-follow="poll"]').waitFor({ timeout: 15000 })
const initialHits = hits
maxActive = 0
slow = true
// 等一轮耗时超过轮询间隔的请求完成。旧实现会在 8 秒处再发一条,持续作废较早的结果。
await page.waitForTimeout(10000)
check('慢于轮询周期的请求最多一条在途', maxActive === 1, `最大并发 ${maxActive},共 ${hits} 次`)
check('请求结束后才安排下一轮', hits === initialHits + 1, `初次 ${initialHits},总共 ${hits} 次`)
await page.locator('nav a[href="/apps"]').first().click()
await page.waitForURL(/\/apps$/)
const stoppedAt = hits
await page.waitForTimeout(4500)
check('离开实例页后停止轮询', hits === stoppedAt, `${stoppedAt} → ${hits}`)
check('没有未捕获错误', page.errors.length === 0, page.errors[0] ?? '')
})
// ---------------------------------------------------------------- 页面上直接改(N6)
await section('应用页:编辑状态、改文字、隐藏、上下挪、删除、加一张数据卡片、发布', async () => {