@@ -15,7 +15,7 @@ export type MollifierBufferOptions = {
1515
1616// Grace TTL applied to the entry hash on drainer ack. The entry survives
1717// this long after materialisation so direct reads (retrieve, trace, etc.)
18- // have a safety net while PG replica lag settles. Q1 D2.
18+ // have a safety net while PG replica lag settles.
1919const ACK_GRACE_TTL_SECONDS = 30 ;
2020
2121// ioredis reconnect backoff for the mollifier buffer client. The base
@@ -80,7 +80,7 @@ export function idempotencyLookupKeyFor(input: IdempotencyLookupInput): string {
8080}
8181
8282// Pre-gate claim key namespace, distinct from `mollifier:idempotency` so the
83- // existing B6a buffer-side dedup stays isolated. The claim is the
83+ // existing buffer-side dedup stays isolated. The claim is the
8484// authoritative cross-store "this idempotency key is in flight or
8585// resolved" pointer used by the trigger hot path. Values:
8686// "pending:<token>" → claimed by a trigger pipeline; `<token>` is the
@@ -143,7 +143,7 @@ export class MollifierBuffer {
143143 // SETNX a Redis lookup at `mollifier:idempotency:{env}:{task}:{key}`
144144 // pointing at the runId so trigger-time dedup during the buffered
145145 // window resolves the same way PG's unique constraint resolves it
146- // post-materialisation (Q5) .
146+ // post-materialisation.
147147 idempotencyKey ?: string ;
148148 taskIdentifier ?: string ;
149149 } ) : Promise < AcceptResult > {
@@ -277,7 +277,7 @@ export class MollifierBuffer {
277277 // - "not_found": no entry hash exists for this runId — including a
278278 // FAILED entry, whose hash the drainer-terminal `fail` path DELs.
279279 // - "busy": entry is DRAINING or materialised. The API
280- // wait-and-bounces through PG (Q3 design) .
280+ // wait-and-bounces through PG.
281281 async mutateSnapshot ( runId : string , patch : SnapshotPatch ) : Promise < MutateSnapshotResult > {
282282 const result = ( await this . redis . mutateMollifierSnapshot (
283283 `mollifier:entries:${ runId } ` ,
@@ -325,7 +325,7 @@ export class MollifierBuffer {
325325
326326 // Atomic pre-gate claim on a (env, task, idempotencyKey) tuple. One
327327 // call across both PG and buffer paths serialises through this claim;
328- // closes the race the buffer-side B6a SETNX leaves open during the
328+ // closes the race the buffer-side SETNX leaves open during the
329329 // gate-transition burst window.
330330 //
331331 // The caller supplies an opaque `token` (UUID) on claim. The same token
@@ -443,8 +443,8 @@ export class MollifierBuffer {
443443 // Marks the entry as materialised (PG row written) and resets its TTL to
444444 // the grace window. Entry hash persists past ack as a read-fallback
445445 // safety net for the brief PG replica-lag window between drainer-side
446- // write and reader-side visibility (Q1 D2) . Also clears the associated
447- // idempotency lookup if one was set on accept (Q5) .
446+ // write and reader-side visibility. Also clears the associated
447+ // idempotency lookup if one was set on accept.
448448 async ack ( runId : string ) : Promise < void > {
449449 await this . redis . ackMollifierEntry (
450450 `mollifier:entries:${ runId } ` ,
@@ -531,7 +531,7 @@ export class MollifierBuffer {
531531 return 0
532532 end
533533
534- -- Idempotency-key dedup (Q5) . If the caller passed a lookup key
534+ -- Idempotency-key dedup. If the caller passed a lookup key
535535 -- and it's already bound to another buffered run, return the
536536 -- winner's runId so the loser's API response can echo it as a
537537 -- cached hit. Otherwise SET the lookup (no TTL — lifecycle is
@@ -606,7 +606,7 @@ export class MollifierBuffer {
606606 -- Requeue RPUSHes to the tail (the RPOP end) so a transiently
607607 -- failed entry pops next rather than going to the back of the
608608 -- line behind a fresh backlog. createdAt is immutable across
609- -- retries (Phase 3b decision) ; the drainer's maxAttempts caps the
609+ -- retries; the drainer's maxAttempts caps the
610610 -- retry loop so a poisoned entry doesn't head-of-line forever.
611611 redis.call('RPUSH', queuePrefix .. envId, runId)
612612 -- Re-track the org/env: pop may have SREM'd them when the queue
@@ -920,7 +920,7 @@ export class MollifierBuffer {
920920
921921 -- If the entry was accepted with an idempotency key, the lookup
922922 -- string was stored on the hash at accept time. Clear it now —
923- -- PG becomes canonical for the key post-materialisation (Q5) .
923+ -- PG becomes canonical for the key post-materialisation.
924924 local lookupKey = redis.call('HGET', entryKey, 'idempotencyLookupKey')
925925 if lookupKey and lookupKey ~= '' then
926926 redis.call('DEL', lookupKey)
0 commit comments