- Tests hash passwords at bcrypt.MinCost, set through the
PasswordCost field of db.Params. TestPasswordCost checks the
cost with and without it.
- Test IRC servers check the queue only on broker notification;
one test keeps the 100 ms fallback poll.
- The stop-timeout test shortens the timeout through a test-only
setter.
- service and handlers tests build config.Config directly instead
of through config.New, so they run in parallel. config exports
DefaultTrustedProxies and ParseTrustedProxies for the handlers
test config.
- Repeated race trials run as parallel subtests.
- Fixed sleeps become waits on the broker.
- A new test covers the relay's failed queue read, which only the
100 ms poll had reached.
Model: opus-5-5
GET /api/v1/messages read the client output queue and only then
registered with the broker. Notify wakes only the channels registered
at that moment, so a message queued between the empty read and the
registration waited out the whole long-poll timeout. The handler now
registers first and removes its channel on every exit path; the IRC
relay loop registers before each drain in the same way.
The handlers read the queue through a function field that defaults to
Database.PollMessages, so tests can act just after a read: one checks
that a message queued there comes back at once, others that no wait
channel stays registered however a request ends.
Model: opus-5-5