Skip to content

Mark the worker unhealthy when production push has no VAPID keys #608

Closed

Description

@HMarzban

Goal

Let the worker health status report when push cannot send in production, so a missing VAPID key pages.

Child of #447 (maintainer ruling, 2026-10-24).

Current behavior

Read from code at a9b0c69e8, not measured.

  • configureVapid() in apps/hocuspocus.server/src/lib/push/sender.ts sets vapidConfigured only when both keys are set and webpush.setVapidDetails succeeds.
  • The worker /health body reports workers.push.vapid_configured (apps/hocuspocus.server/src/hocuspocus.worker.ts), and the admin dashboard shows it.
  • allHealthy in the same handler ignores it. So nothing alerts when VAPID_PUBLIC_KEY or VAPID_PRIVATE_KEY is missing or wrong.
  • Fix the full-Docker dev stack: no webapp source in the container, and no host.docker.internal on Linux #482 passes empty VAPID keys in dev on purpose, so push stays optional there.

What to build

  1. Add the push key state to allHealthy in the worker /health handler, under the rule chosen below.
  2. Keep the body field workers.push.vapid_configured as it is.

Decisions

  1. When does missing VAPID make the worker unhealthy?

Acceptance criteria

  • In production mode with no VAPID keys, worker /health answers unhealthy.
  • In dev with empty keys, worker /health stays healthy.
  • bun test and the hocuspocus typecheck pass.

Deploy note

The prod container healthcheck reads this status. Check that production holds both keys before the deploy that ships this, or the worker goes unhealthy.

Out of scope

Activity

  1. added this to the v2.3.0 milestone on Oct 25, 2026
  2. added
    enhancement
    on Oct 25, 2026
  3. HMarzban commented on Oct 25, 2026

    @HMarzban
    CollaboratorAuthor

    Built and committed on local main. Awaits the maintainer's final push.

    Remaining gate: the (build): back deploy, then a check that the production worker reports healthy with its push keys set.

  4. HMarzban commented on Nov 3, 2026

    @HMarzban
    CollaboratorAuthor

    Shipped in 8d45ccacd, with the CHANGELOG entry in 95c1b0acf. In production, allHealthy on the worker now also needs vapid_configured. A dev stack with empty keys stays healthy. Deploy run 41608014517 brought up 2 of 2 workers healthy under the new gate, so production holds both keys.

  5. modified the milestones: v2.3.0, v2.3.6 on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DevOpsenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions