Skip to content

Commit 97b583a

Browse files
committed
test(workflow-code): pin the legacy ~n refusal test's key to the dotted name, not heap order
The blocks query has no ORDER BY, so a colliding pair loads in heap order. Any UPDATE to the first-inserted row (or an insert straddling a page into FSM space) puts it after its namesake, which then keeps the bare key and the assertion on blockKey 'score1~2' fails. A dot-free name beats a dotted one in either order.
1 parent 43a9a4b commit 97b583a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/sim/lib/workflows/application/apply-workflow-source.integration.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,10 +458,11 @@ check('a refusal on a legacy ~n key block points at that block, not its namesake
458458
})
459459
const winnerId = generateId()
460460
const loserId = generateId()
461+
// Stored blocks load in heap order; only a dotted name loses its key in every order.
461462
const saved = await saveWorkflowToNormalizedTables(workflowId, {
462463
blocks: {
463-
[winnerId]: fn(winnerId, 'Score 1', 'return 1', false),
464-
[loserId]: fn(loserId, 'score1', 'return 2', true),
464+
[winnerId]: fn(winnerId, 'score1', 'return 1', false),
465+
[loserId]: fn(loserId, 'Score.1', 'return 2', true),
465466
},
466467
edges: [],
467468
loops: {},

0 commit comments

Comments
 (0)