Raise the mention regex local-part cap from 20 to 64 chars. The prior cap
silently dropped long usernames from autolinking/mentions, and for remote
handles it truncated the username and dropped the @domain, turning a remote
mention into a broken local one. Adds extensive lexer coverage.
Add tests/Unit/SnowflakeServiceTest.php covering SnowflakeService::next()
and byDate(). Datacenter/worker ids are pinned via config so ids are fully
deterministic and the sequence behaviour is assertable rather than
probabilistic.
Regression coverage for the stale-sequence bug (duplicate seq on the first
two ids -> UNIQUE constraint collisions):
- first two ids use distinct sequence values
- consecutive calls yield a strictly increasing sequence (1,2,3,...)
- a 100-id burst minted in the same frozen millisecond is fully unique
- an explicit reproduction contrasting old (1,1) vs fixed (1,2) sequences
Also covers: datacenter/worker bit encoding, sequence wraparound at 4095,
cache reseeding on missing/non-numeric counters, timestamp bit encoding,
and byDate() delegation/ordering. Verified these fail on the pre-fix code
(6 failing) and pass on the fix (14 passing).
The vips driver uses jcupitt/vips (FFI binding), which needs ext-ffi
plus the libvips shared library at runtime - not the PECL vips
extension. Add a libvips apt install step and enable ffi in both test
workflows, then switch .env.testing to vips so CI exercises the new
default driver.
Guard ImageThumbnailSupersedeTest to skip when the configured driver's
runtime is unavailable, so contributors without libvips are not blocked.
- terms/privacy/community-guidelines views accessed the cached page as an
object ($page->title), but cachedPage() returns an array, causing a 500
whenever a custom Page row existed. Switch to array access.
- PublicRouteSmokeTest: enable open_registration before hitting /register,
which 404s by default when registration is disabled.
- Api/AccountTest: derive sanctum.stateful domain from app.url instead of
hardcoding pixelfed.test, so the first-party auth test is environment
independent.
ActivityPubDeliveryService::pool() and queueDelivery() only perform HTTP
delivery when app()->environment('production'); outside production they log
and return. The pool/job delivery tests were written before that guard was
added (commit 868e09b64) and never forced production, so no requests were
made and every assertSent/assertSentCount failed (6 failing tests).
Wrap the delivery-exercising tests in a forged production environment
(restored afterwards) and seed the public-ips DNS cache plus an empty
banned-domains cache so validateDestination() passes without a real DNS
lookup or DB query. Seed after factory creation, since the lazy DB refresh
can flush the cache store.
Also fix a by-value capture bug in the onError assertions: the $errors
array was captured through an arrow-fn wrapper, so the inner callback's
by-reference mutations never reached the assertion. Use a regular closure.
No production code changed; the production delivery gate is intended
behavior.
queueDelivery() runs synchronously from the v1 follow/unfollow endpoints
(via Helpers::sendSignedObject), which commit local state before delivery
and have no try/catch. After the Http::send() rewrite, a ConnectionException
from a momentarily-unreachable remote was rethrown out of queueDelivery(),
turning a best-effort delivery into a 500 for the user after the follow/
unfollow was already persisted. For unfollows, a retry then hit the
isFollowing==false branch and never re-sent the Undo, diverging state.
Treat transport failures (ConnectionException) as best-effort on this
single-delivery path: log, record host health, and return without
propagating. Other exception types (invalid sender/destination, signing,
serialization) still throw, matching pre-rewrite precondition behavior.
Also widen SendUpdateActor's per-user catch from HttpException to Throwable
so a single bad host no longer aborts a fleet-wide actor update (the old
HttpException catch is dead for ConnectionException/invalid-destination).