fix(push): use valid default VAPID subject [AI-assisted]#83317
Conversation
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. at source level: current main resolves the no-env VAPID subject to PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the narrow default-subject fix once maintainers accept the project-owned default URI, keeping Do we have a high-confidence way to reproduce the issue? Yes at source level: current main resolves the no-env VAPID subject to Is this the best way to solve the issue? Yes. Replacing the module-private fallback with a stable public What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against e3d55188384b. |
Summary
mailto:openclaw@localhost, which Apple Web Push rejects for iOS PWA pushes.https://openclaw.ai; focused tests and Control UI docs were updated.OPENCLAW_VAPID_SUBJECTstill overrides the default, and no new config surface was added.Change Type
Scope
Linked Issue/PR
Real behavior proof
origin/main, Node 22.node --import tsx --input-type=module -e "import { resolveVapidKeys } from './src/infra/push-web.ts'; /* run in disposable state with VAPID env vars cleared, then with OPENCLAW_VAPID_SUBJECT set */"https:subject by default, while the env override path still wins.mailto:openclaw@localhost, as documented on Auto-generated VAPID keys use @localhost subject, breaking Apple Web Push (iOS PWA) #83134.Root Cause
mailto:subject, so it accepted the invalid localhost default.OPENCLAW_VAPID_SUBJECTalready existed as an operator override; the broken path was the no-env default.Regression Test Plan
src/infra/push-web.test.tshttps://openclaw.aiwhen no env override is set.resolveVapidKeys()and passed toweb-push.src/gateway/server-methods/push.test.tsstill covers the adjacent push handler path.User-visible / Behavior Changes
New Web Push VAPID keys generated without
OPENCLAW_VAPID_SUBJECTnow usehttps://openclaw.aiinstead ofmailto:openclaw@localhost.Diagram
N/A
Security Impact
Yes, explain risk + mitigation: N/ARepro + Verification
Environment
OPENCLAW_VAPID_*env vars cleared for the default case;OPENCLAW_VAPID_SUBJECT=mailto:ops@example.comfor override checkSteps
OPENCLAW_VAPID_PUBLIC_KEY,OPENCLAW_VAPID_PRIVATE_KEY, andOPENCLAW_VAPID_SUBJECT.resolveVapidKeys()fromsrc/infra/push-web.ts.push/vapid-keys.json.OPENCLAW_VAPID_SUBJECT=mailto:ops@example.comand resolve again.Expected
Actual
https://openclaw.aimailto:ops@example.comEvidence
Focused checks:
Human Verification
Review Conversations
Compatibility / Migration
Risks and Mitigations
OPENCLAW_VAPID_SUBJECTremains the explicit override for operator-specific subjects.