mirror of
https://github.com/karatektus/pl_mail.git
synced 2026-10-25 10:04:18 +00:00
The browser suite still spoke 0.x. Four shards passed and the install-wide job
did not, on two tests, for two separate reasons — both mine, from the protocol
switch in d35418c4.
currentUserId() read the subscription URL back with searchParams.get("topic").
Under 1.0 the parameter is "match", so that returned null and the helper threw
"Cannot read properties of null" — which reads like a missing element and is
really a renamed query parameter.
And the suite mints its OWN publisher token, which was still the bare
`{mercure: {publish: ["*"]}}` claim. A 1.0 hub refuses that, so those tests
would have failed on the next line anyway.
Two things were checked against the running hub rather than reasoned about,
because both could have gone either way:
- THE HUB REQUIRES `exp`. A token without one is refused with "exp claim is
required", and it says so only in its own log.
- `{match: "*"}` IS STILL EVERY TOPIC. 1.0 turns `publish: '*'` into an exact
match on "*", which looked like it might have stopped meaning "everything".
It has not: publishing with it answers 200.
PublisherTokenTest is the second of those made permanent, and it guards the
half of this that fails SILENTLY. A missing subscriber claim is loud — nothing
arrives and the indicator says so. A publish is fire-and-forget from a worker,
so a refused one is indistinguishable from a quiet mailbox, and the first
report would be somebody saying new mail sometimes needs a reload. The
component's docblock says a null lifetime means a non-expiring token, which is
exactly what the hub rejects; the bundle covers that for 1.0, and this asserts
it instead of trusting the comment.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>