Skip to content

Ergo push notification fixes, with #10's quit-log change - #18

Closed
luizribeiro wants to merge 4 commits into
mainfrom
ergo-push
Closed

luizribeiro wants to merge 4 commits into
mainfrom
ergo-push

Conversation

@luizribeiro

Copy link
Copy Markdown
Owner

Bundles Ergo's changes so they ship in a single Ergo restart. Includes #10's commit (rebased onto main) and supersedes #10.

  • Stop logging Ergo's quit lines, which name client addresses (from Stop logging Ergo's quit lines, which name client addresses #10)
  • Backport upstream fix webpush always sending at high urgency ergochat/ergo#2471 ("fix webpush always sending at high urgency", merge 473c138). It's in no release yet; v2.19.1 is still the latest. Fetched with fetchpatch, and it applies to v2.19.1 unchanged. Maintenance PINGs and MARKREADs now go out at normal urgency, while messages and the registration probe stay at high. Upstream added no tests for it; Ergo's own go test suite still runs in the build and passes.
  • Set webpush.max-subscriptions = 10 (the default is 4). delay stays unset.
  • Move minica certificate building for VM tests into tests/e2e/lib/certificates.nix (mail and ergo both use it)

Test: the new ergo subtest sends 11 WEBPUSH REGISTER requests. It checks that 10 are accepted and the 11th gets MAX_REGISTRATIONS. Ergo sends a real probe push to each endpoint before accepting it, and only over HTTPS to a public address. So in tests/e2e/ergo.nix the client runs nginx on 203.0.113.7 as push.test, answering 201 with a test-CA certificate that credenza trusts.

Run locally: just prod build, plus the ergo, security and webchat VM tests.

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.
@luizribeiro

Copy link
Copy Markdown
Owner Author

Landed in main via #19 (rebased).

@luizribeiro luizribeiro closed this Nov 4, 2026
@luizribeiro
luizribeiro deleted the ergo-push branch November 4, 2026 03:10
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.

1 participant