Summary
internal/worker/relay.go:19-24 defines relayTimeoutFloor = 4s / relayTimeoutPerItem = 150ms, an independent copy of the same constants in cmd/artemis/gcworkflows.go:75-80. Both encode the same assumption about Hatchet publish latency, and that assumption is wrong (see #1).
Impact
With Batch: 100 (cmd/artemis/main.go), the relay ceiling is 4s + 100*150ms = 19s for up to 100 publishes. At the publish latency implied by #1, a backlog beyond roughly 40 events cannot drain within one tick and the batch times out mid-flight.
Latent today — the production outbox is drained — but it is the same bug as #1 waiting on a queue depth that has not happened yet.
Fix direction
- Derive both budgets from one shared, documented constant rather than two hand-copied pairs.
- Pin the value with a test asserting it against a measured publish latency, so the next latency regression fails CI instead of silently truncating.
Summary
internal/worker/relay.go:19-24definesrelayTimeoutFloor = 4s/relayTimeoutPerItem = 150ms, an independent copy of the same constants incmd/artemis/gcworkflows.go:75-80. Both encode the same assumption about Hatchet publish latency, and that assumption is wrong (see #1).Impact
With
Batch: 100(cmd/artemis/main.go), the relay ceiling is4s + 100*150ms= 19s for up to 100 publishes. At the publish latency implied by #1, a backlog beyond roughly 40 events cannot drain within one tick and the batch times out mid-flight.Latent today — the production outbox is drained — but it is the same bug as #1 waiting on a queue depth that has not happened yet.
Fix direction