修复重复生成占位的对账判定
收集项目快照中全部同 ID 的生成占位原始记录。 通用队列链在任一重复占位未收口时执行第二次项目读取。 完美像素遇到重复操作占位时失败关闭为冲突。 补充两条缺陷定向测试并同步技术方案与决策记录。
This commit is contained in:
@@ -1254,6 +1254,34 @@ describe('useImageCanvasGenerationWorkflow', () => {
|
||||
).toMatchObject({ kind: 'pending', project });
|
||||
});
|
||||
|
||||
it('rejects duplicate perfect-pixel dialog ids even when the first record appears applied', () => {
|
||||
const operationId = 'perfect-pixel-duplicate-dialog';
|
||||
const project = createPerfectPixelProject(operationId, 'applied');
|
||||
project.layers.push({
|
||||
itemType: 'generation-dialog',
|
||||
layerId: `generation-dialog:${operationId}:duplicate`,
|
||||
resourceId: `generation-dialog:${operationId}:duplicate`,
|
||||
dialog: {
|
||||
id: operationId,
|
||||
mode: 'quick-edit',
|
||||
prompt: '完美像素',
|
||||
status: 'generating',
|
||||
composerOpen: false,
|
||||
},
|
||||
});
|
||||
|
||||
expect(
|
||||
inspectPerfectPixelProjectSnapshot(project, {
|
||||
operationId,
|
||||
taskId: `pixel-art-snap-${operationId}`,
|
||||
}),
|
||||
).toMatchObject({
|
||||
kind: 'conflict',
|
||||
project,
|
||||
message: '权威项目中存在重复的完美像素占位,无法自动确认结果。',
|
||||
});
|
||||
});
|
||||
|
||||
it('requires a matching task resource before a missing dialog can prove asset-only success', () => {
|
||||
const operationId = 'perfect-pixel-missing-dialog';
|
||||
const matchingProject = createPerfectPixelProject(
|
||||
|
||||
Reference in New Issue
Block a user