Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
79eaf18
improvement(processing): reduce redundant DB queries in execution pre…
waleedlatif1 Feb 24, 2026
9b201d8
improvement(processing): add defensive ID check for prefetched workfl…
waleedlatif1 Feb 24, 2026
eba3358
improvement(processing): fix type safety in execution error logging
waleedlatif1 Feb 24, 2026
ffd5385
improvement(processing): replace `as any` casts with proper types in …
waleedlatif1 Feb 24, 2026
007d137
improvement(processing): use exported HighestPrioritySubscription typ…
waleedlatif1 Feb 24, 2026
6540453
improvement(processing): replace remaining `as any` casts with proper…
waleedlatif1 Feb 24, 2026
1b3708a
fix(processing): prevent double-billing race in LoggingSession comple…
waleedlatif1 Feb 24, 2026
a1b91c1
fix(processing): unblock error responses and isolate run-count failures
waleedlatif1 Feb 24, 2026
540e0be
improvement(processing): remove dead setupExecutor method
waleedlatif1 Feb 24, 2026
4fae73b
remove logger.debug
waleedlatif1 Feb 24, 2026
e7b216b
fix(processing): guard completionPromise as write-once (singleton pro…
waleedlatif1 Feb 24, 2026
f093193
improvement(processing): remove empty else/catch blocks left by debug…
waleedlatif1 Feb 24, 2026
8e72e13
fix(processing): enforce waitForCompletion inside markAsFailed to pre…
waleedlatif1 Feb 24, 2026
5a8e611
fix(processing): reset completing flag on fallback failure, clean up …
waleedlatif1 Feb 24, 2026
6004fea
fix(processing): restore disconnect error logging in MCP test-connection
waleedlatif1 Feb 24, 2026
4c78376
fix(processing): address audit findings across branch
waleedlatif1 Feb 24, 2026
dff3f64
revert: undo unnecessary subscription null→undefined change
waleedlatif1 Feb 24, 2026
e1981b6
improvement(processing): remove dead try/catch around getHighestPrior…
waleedlatif1 Feb 24, 2026
2860663
improvement(processing): remove dead getSnapshotByHash method
waleedlatif1 Feb 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(processing): guard completionPromise as write-once (singleton pro…
…mise)

Prevent concurrent safeComplete* calls from overwriting completionPromise
with a no-op. The guard now lives at the assignment site — if a completion
is already in-flight, return its promise instead of starting a new one.
This ensures waitForCompletion() always awaits the real work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
  • Loading branch information
waleedlatif1 and claude committed Feb 24, 2026
commit e7b216b5aba64799296991cabd1d61c47f7bcfb3
4 changes: 4 additions & 0 deletions apps/sim/lib/logs/execution/logging-session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ export class LoggingSession {
}

async safeComplete(params: SessionCompleteParams = {}): Promise<void> {
if (this.completionPromise) return this.completionPromise
this.completionPromise = this._safeCompleteImpl(params)
return this.completionPromise
}
Expand All @@ -713,6 +714,7 @@ export class LoggingSession {
}

async safeCompleteWithError(params?: SessionErrorCompleteParams): Promise<void> {
if (this.completionPromise) return this.completionPromise
this.completionPromise = this._safeCompleteWithErrorImpl(params)
return this.completionPromise
}
Expand All @@ -739,6 +741,7 @@ export class LoggingSession {
}

async safeCompleteWithCancellation(params?: SessionCancelledParams): Promise<void> {
if (this.completionPromise) return this.completionPromise
this.completionPromise = this._safeCompleteWithCancellationImpl(params)
return this.completionPromise
}
Expand All @@ -764,6 +767,7 @@ export class LoggingSession {
}

async safeCompleteWithPause(params?: SessionPausedParams): Promise<void> {
if (this.completionPromise) return this.completionPromise
this.completionPromise = this._safeCompleteWithPauseImpl(params)
return this.completionPromise
}
Expand Down