Push delivery: make the worker's VAPID authorizer required
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start in app/apps/worker/src/push/deliver.ts around line 86, where the optional vapid field and its comment sit, then check line 98 where it reaches webPushSender. Make the field required and update the comment. Next, update the test callers listed in the issue (app/tests/app/push.test.ts and three others) to pass createVapidAuthorizer() from apps/worker/src/push/index.ts. Done means the type check, lint and ./scripts/check_application.sh pass.
Written by the indexing model from the issue text.
Description
DeliveryDependencies.vapid is optional in the worker's push delivery. Every production caller passes the worker's one authorizer, which reuses a VAPID JWT per push service; when the field is left out, each delivery silently signs its own JWT instead. Making it required lets the type checker catch a future caller that forgets it.
Where to look
app/apps/worker/src/push/deliver.ts(around line 86):vapid?: VapidAuthorizerand its comment; line 98 passes it towebPushSender.app/apps/worker/src/index.ts(line 26) andapp/apps/worker/src/push/index.ts(line 22): the production path, which already passes it.- Tests that call
deliverPush({ db, config })without it:app/tests/app/push.test.ts,notifications.test.ts,notification-summary-native.test.ts,notification-inbox.test.ts(git grep -n "deliverPush({" app/tests).
Acceptance criteria
-
vapidis required inDeliveryDependencies, and its comment no longer describes the "without one" case. - Every caller passes an authorizer; tests use
createVapidAuthorizer()(exported fromapps/worker/src/push/index.ts), ideally one per test file. - Type check, lint and the full Docker suite pass.
How to check
./scripts/check_application.sh (builds, type checks, lints and runs the API tests, including the push tests against the push-service mock).
New to Flux? Start with CONTRIBUTING. Comment here to say you are taking it.
Carried over from the #185 handoff, as suggested on #306.
- Dominant language
- TypeScript
- Stars
- 3
- Forks
- 0
- Avg merge
- 14h 40m
- Merged PRs (30d)
- 242
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ColdPhase/flux
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
F-027 A10 — Connect AI order and labels in Settings (rest of #410)Possibly taken @Zamojski5 claimed this 1 day ago. Open
ColdPhase/flux#493 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
WebKit: scenarios test_1 intermittently fails adding the next person (status keeps the previous name); test_2 skippedPossibly taken @Zamojski5 claimed this 1 day ago. Open
ColdPhase/flux#491 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
Similar issues
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 80/100
alunduil/projects-v2-sync#21 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
enhancement minor
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
testcontainers/testcontainers-node#1539 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
christopher-buss/eslint-plugin-flawless#72 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openwatersio/slackwater-database#281 ·
Maintainers usually reply within 1 day