tableState 非 resources 分支恢复直接扫描 text 身份,避免 queryRows 把普通 doc id/UUID/复合键/数字 id 当 JSON canonical 校验而失败;resources 仍使用 F01 精确引用闭包。隔离 PG 覆盖字符串、UUID、复合键与数字 ID。 F11:快照 HTTP 投影补 bindings/wiki_log_entries;作业统计按本作业 target_snapshot_id/snapshot_id 取对应快照,取不到显示未知,不借最新封存; running/pending/failed/unknown 不再在无 detail 时显示完成。 F03:verifications 支持 snapshot_id 精确查询,返回 snapshot_latest 并只按 该快照回答 verified;抽屉“查看校验记录”按选中快照加载,不借用最新记录。 F08:显示主机探测时间;无真实 next-run 时说明尚未核验下一次执行;最近成功 单列未知,不以最近运行冒充。 验证:Go/前端全量、隔离 PG tableState/F01 对拍与 make verify 17 项通过。 实际 Current→Prepare→Verify ES 集成被共享 ES 磁盘 watermark 阻塞,未冒充。
This commit is contained in:
@@ -680,6 +680,49 @@ describe('ReleaseTargetsView(确认稿布局)', () => {
|
||||
expect(drawer).toContain('当前筛选下没有已登记版本')
|
||||
})
|
||||
|
||||
it('统计数据只取当前作业快照,并按真实阶段状态展示', () => {
|
||||
const jobSnapshot: LibrarySnapshot = {
|
||||
...internalSnapshot,
|
||||
snapshot_id: 'old-job-snapshot',
|
||||
totals: {
|
||||
documents: 4,
|
||||
chunks: 38,
|
||||
resources: 21,
|
||||
bindings: 4,
|
||||
wiki_pages: 31,
|
||||
wiki_folders: 21,
|
||||
wiki_log_entries: 11,
|
||||
},
|
||||
}
|
||||
const job: LibraryJobRecord = {
|
||||
...persistedSeal,
|
||||
id: 'libsync-old',
|
||||
kind: 'sync',
|
||||
target_snapshot_id: jobSnapshot.snapshot_id,
|
||||
stage: 'database',
|
||||
stages: [
|
||||
{
|
||||
stage: 'database',
|
||||
state: 'running',
|
||||
total: null,
|
||||
completed: null,
|
||||
bytes_total: null,
|
||||
bytes_done: null,
|
||||
detail: '',
|
||||
updated_at: '2026-11-05T01:00:00Z',
|
||||
},
|
||||
],
|
||||
}
|
||||
const html = render({
|
||||
page: { ...page, snapshots: [internalSnapshot, jobSnapshot] },
|
||||
overview: { ...overview, job, jobs: [job], test_sealed: internalSnapshot },
|
||||
})
|
||||
expect(html).toContain('文档 4 · 分块 38 · 资源 21 · 绑定 4')
|
||||
expect(html).toContain('页面 31 · 目录 21 · 日志 11')
|
||||
expect(html).toContain('执行中;执行器尚未提供该分项明细')
|
||||
expect(html).not.toContain('已完成 0 / 0')
|
||||
})
|
||||
|
||||
it('同步中布局显示四类数据卡与明细,且不编造百分比', () => {
|
||||
const html = render({
|
||||
jobs: [runningJob],
|
||||
|
||||
Reference in New Issue
Block a user