feat: add readable category rule workbench and safe draft trials

This commit is contained in:
abaishu0730 committed 2026-10-19 17:00:43 +08:00
1 parent e2d66eb7c7
commit fbe39c8267
32 files changed
+485 -65

No files matched your search

+7
View File
@@ -23,6 +23,13 @@ async function configure(f){
const saved=f.store.saveRule({...current,adapterIds:[adapter.id],to:['orders@example.test'],archiveDirectory:'\\\\server\\orders',filenameDate:'receivedAt'},'admin');
assert.equal(f.store.capturedPreview(captured.id).valid,true);f.store.publish(saved.id,{version:saved.version},'admin');
}
test('scan prefilter uses complete process-node pairs without crossing their columns',async t=>{
const f=fixture(t),rule=f.store.get('rules','bs-change').draft;
f.store.saveRule({...rule,scopes:[{processName:f.row.processName,nodeName:'另一个节点'},{processName:'另一个流程',nodeName:f.row.nodeName}]},'admin');
await f.execution.scan({connectionId:'c1',idempotencyKey:'paired-scope-scan'},principal);
assert.equal(f.store.all('capture-samples').length,0);assert.equal(f.execution.snapshot().tasks.length,0);assert.deepEqual(f.counts(),{captures:0,exports:0});await f.execution.stop();
});
test('capture-backed dynamic binding recovers blocked task with stable identity and exports only once',async t=>{
const f=fixture(t);await configure(f);await f.execution.scan({connectionId:'c1',idempotencyKey:'second'},principal);
assert.equal(f.store.all('orders')[0].status,'pending');assert.equal(f.execution.snapshot().tasks.length,1);assert.equal(f.counts().exports,1);