Skip to content

Commit 3476f76

Browse files
giovaborgognoclaude
andcommitted
chore: update 9.6 — large payload issue is object store config, not our bug
Root cause: TriggerTaskService tries S3 offload for >512KB payloads. Without object store credentials (local dev), all subscriber triggers fail silently. Same behavior as regular tasks.trigger() without object store. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d5a3299 commit 3476f76

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.claude/projects/-Users-terac-repos-trigger-dev/memory/pubsub-pending.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,24 @@ Max 3 running at once, each key strictly ordered.
8080
- `concurrencyLimit: 2` + same key → 2 at a time (breaks ordering)
8181
- 10 different keys + `concurrencyLimit: 1` → only ~8 ran in parallel (env limit, not queue limit)
8282

83-
### 9.6 — Large Payloads Cause Silent Fan-out Failure
83+
### 9.6 — Large Payloads >512KB Return 0 Runs (Silent Partial Failure)
8484

85-
**Status**: NOT RESOLVED — needs fix
86-
**Priority**: HIGHdata loss / silent failure
85+
**Status**: NOT A BUG IN OUR CODE — infrastructure issue in dev
86+
**Priority**: MEDIUMonly in dev without object store configured
8787
**Found during**: E2E testing (2026-03-01)
8888

89-
**Problem**: Payloads >512KB cause `PublishEventService` to return `runs: []` (HTTP 200, no error) because Trigger.dev's task trigger silently fails for large payloads (>512KB need object storage offloading which our event publish path doesn't handle).
89+
**Root cause**: `TriggerTaskService` detects payload >512KB and tries to offload to S3/R2 object store. In local dev, object store credentials are not set → throws `ServiceValidationError: "Failed to upload large payload to object store"`. Our `PublishEventService` catches this per-subscriber (partial failure pattern) and continues, resulting in 0 runs.
9090

91-
**Test results**:
92-
- 100KB payload: 4 runs (OK)
93-
- 500KB payload: 4 runs (OK)
94-
- 600KB payload: 0 runs (SILENT FAILURE)
95-
- 2MB payload: 0 runs (SILENT FAILURE)
91+
**This is NOT specific to events** — a regular `tasks.trigger()` with >512KB payload would fail the same way without object store.
9692

97-
**The trigger call fails silently**`TriggerTaskService` returns `undefined` for each subscriber, and `PublishEventService` logs it as a partial failure but still returns HTTP 200 with empty runs.
93+
**Test results**:
94+
- 500KB payload: 4 runs (OK — under threshold)
95+
- 600KB payload: 0 runs (object store not configured)
96+
- In production with object store: would work fine
9897

99-
**Options to resolve**:
100-
1. Validate payload size in PublishEventService before fan-out (reject >512KB with clear error)
101-
2. Use Trigger.dev's payload offloading mechanism (payloads >512KB go to object storage)
102-
3. Both: warn on large payloads + support offloading
98+
**Improvement we could make**:
99+
- Detect payload size BEFORE fan-out and return a clear error (413 Payload Too Large) instead of HTTP 200 with 0 runs
100+
- Or: propagate the TriggerTaskService error instead of treating it as partial failure
103101

104102
### 9.7 — ClickHouse Tables Not Created in Dev
105103

0 commit comments

Comments
 (0)