Repository navigation
Go live with web push - #19
Merged
Merged
Conversation
When a blocking write to a dropped connection fails, Ergo logs a "quit" line with the socket error, and Go's error text carries both ends of the connection: "send error to client : <nick> : write tcp <server>-><client>: write: broken pipe". Production logged five of these, against our promise not to keep members' addresses. Exclude the quit log type, as connect-ip already is. In Ergo 2.19.1 the only other quit line is "<nick> is no longer on the server", which names no address but is itself a record of when members leave, which we have no use for. Patching the address out of the error would keep a line nobody reads. The ergo VM test now has a client reset its TLS connection mid-burst: it sends 20 PINGs, waits for the first PONG, then closes with SO_LINGER 0. Fakelag holds the remaining replies past the RST, so Ergo's next write fails. Without the fix the subtest fails on that line; irc-client gains --close=reset for it.
Ergo v2.19.1 sends every push at high urgency, ignoring the urgency each caller picks. Upstream PR #2471 (merged 2026-10-22, in no release yet) passes it through, so maintenance PINGs and MARKREADs go out at normal urgency and stop waking phones; messages and the registration probe stay high. The commit applies to v2.19.1 unchanged. Upstream added no tests; Ergo's own suite still runs in the build.
The ergo test will need a certificate from a test CA too, as the mail node has.
Each browser or phone a member turns notifications on in takes a subscription, and Ergo's default of four runs out quickly for anyone with a few devices and a beta client besides. The ergo VM test registers eleven endpoints and sees ten accepted and the eleventh refused. Ergo probes each endpoint with a push before accepting it, over HTTPS and only to a public address, so the client serves one at 203.0.113.7 with a certificate credenza trusts.
Web clients need both in their config.json. The public key comes from the push-relay-vapid-key secret in secrets/credenza.yaml; it is public, so it lives in the module. The tests share the relay's host name.
config.json gains the push block the client reads (relay origin and VAPID public key), and the CSP's connect-src lets it register devices with the relay. Needs a client that knows the push block, since it decodes config.json strictly.
8ae24d1 reads config.json's push block, so it goes out with it.
The first request through nginx raced its start: push-relay.service can be up before nginx listens on 443, and curl got connection refused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One deploy: client and relay at 8ae24d1, beta config.json push block and connect-src, and Ergo's webpush fix (#2471 backport, 10 subscriptions, no quit-line IPs). Restarts Ergo (approved). Supersedes #18.