Skip to content

fix(dm-worker): restore build when follow re-check ack has no operation id - #83

Merged
diwenne merged 1 commit into
diwenne:mainfrom
felipemazetti:fix/follow-recheck-ack-null-operation-id
Oct 5, 2026
Merged

diwenne merged 1 commit into
diwenne:mainfrom
felipemazetti:fix/follow-recheck-ack-null-operation-id

Conversation

@felipemazetti

@felipemazetti felipemazetti commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Problem

npm run build, npm run typecheck and the Docker image fail on main since #68 (257e38d):

./lib/queue/dm-worker.ts:855:7
Type error: Type 'string | null' is not assignable to type 'string'.

sendFollowRecheckAck receives operationId: string | null and passes ${operationId}:ack or null into sendPostbackOnce, whose operationId is string. (Also reported in #82.)

Fix

With an id, keep the durable claim through sendPostbackOnce (unchanged). Without one, send the ack directly: the follow_recheck_ack Redis SET NX right above already limits it to one ack per re-check cycle.

Verification

docker build with the repo Dockerfile completes again (next build type check passes), and the image runs on a self-hosted instance with web and worker healthy (/api/health ok).

…on id

diwenne#68 passed a nullable operationId into sendPostbackOnce, which only accepts
a string, so next build failed type checking. Send the ack directly when
there is no id; the Redis NX lock above already dedupes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

@felipemazetti is attempting to deploy a commit to the diwenne's projects Team on Vercel.

A member of the Team first needs to authorize it.

@diwenne
diwenne merged commit fdea240 into diwenne:main Oct 5, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants