You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix(selfhost): bound notification queue coalescing
* test(selfhost): fix a notify-evaluate coalesce-key assertion stale from the digest switch
This PR changed jobCoalesceKey's notify-evaluate case to a fixed-length
digest of the sorted dedup-key set, but one assertion in the general
"coalesces by stable id" suite still expected the old raw-key format,
failing CI. Matches the shape assertion already used by the dedicated
digest test added elsewhere in this PR.
* fix(selfhost): sort notify-evaluate events before chunking, not after
jobCoalesceKey already hashes each chunk's OWN sorted dedup-key set,
so a chunk's coalesce key was order-independent WITHIN that chunk --
but chunk MEMBERSHIP was still built from notificationEvents' raw
arrival order, so a redelivery whose events resolved in a different
order could split across a different 100-event boundary and never
coalesce with the earlier attempt. Sorting by dedupKey before
chunking makes membership a pure function of the detected event set,
restoring the "same full set in any order" coalescing guarantee
across chunk boundaries too. Added a regression test that reproduces
the split with 205 reordered watchers and fails without the fix.
it("REGRESSION (#3218 review): chunk membership across a >100-watcher batch is order-independent -- the SAME watcher set in a different arrival order still produces the SAME set of chunk coalesce keys", async () => {
it("batches a notify-evaluate job's coalesce key off the FULL sorted set of dedup keys (#selfhost-maintenance-self-pin)",()=>{
1074
+
it("batches a notify-evaluate job's coalesce key off a fixed-length digest of the FULL sorted set of dedup keys (#selfhost-maintenance-self-pin)",()=>{
1072
1075
// Order-independent: the same two events in either order produce the same key, so a redelivery with the
0 commit comments