glide-mq 0.20 lists your job schedulers with a hard size limit

2 hours ago

glide-mq 0.20 adds one new call to the Queue. getRepeatableJobsBounded lists every job scheduler on a queue, the schedules that add a job on a cron pattern or an interval, but only when their count fits under a limit you pass in. The rest of the release fixes links in the agent skills and patches development dependencies.

Ask about this presentation

Chapters

  1. 0:00Scheduler listing with a size limit
  2. 0:22Over the limit, it throws
  3. 0:42Count and read in one server call
  4. 1:02Damaged entries fail the call
  5. 1:24One argument, also in TestQueue
  6. 1:43Agent skill links fixed
  7. 2:06Development dependencies patched
  8. 2:33Upgrade
Show transcript
  1. glide-mq 0.20 adds one new call to the Queue. getRepeatableJobsBounded lists every job scheduler on a queue, the schedules that add a job on a cron pattern or an interval, but only when their count fits under a limit you pass in. The rest of the release fixes links in the agent skills and patches development dependencies.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    glide-mq 0.20

    Lists your job schedulers
    with a hard size limit

    await queue.getRepeatableJobsBounded(500);
  2. Here is a queue with five schedulers, and a limit of four. The existing getRepeatableJobs call hands back the whole inventory, whatever its size. The bounded call counts first. Five is more than four, so it throws a range error that names both numbers, and you get no entries at all. Any list it does return is complete.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    Over the limit, the call throws
    instead of returning part of the list

    bounded-aevery 1000 ms
    bounded-cron*/5 * * * *
    bounded-racafter complete
    bounded-fractionalevery 1000 ms
    maxEntries = 4
    bounded-bevery 2000 ms
    RangeError: Scheduler inventory contains 5 entries, exceeding maxEntries (4)
  3. A scheduler can be added at any moment, even while you are listing them. So the size check and the read run inside a single Valkey function call. Nothing can land between them and push the result past your limit. This ships as version 136 of the server function library, and the queue loads it onto the server when it connects.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    The count and the read happen
    in one Valkey function call

    src/functions/glidemq.lua · glidemq_getSchedulersBounded
    local count = redis.call('HLEN', keys[1]) if count > maxEntries then return {'over_limit', tostring(count)} end return {'ok', tostring(count), redis.call('HGETALL', keys[1])}

    Server function library 135 → 136, loaded onto the server when the queue connects

  4. Every entry is also checked as it comes back. The existing call quietly skips a value that isn't valid JSON. The bounded call throws instead and names the scheduler, and it does the same for a missing or out-of-range field, like the next run time. It also reads the stored job templates without running your queue's custom serializer.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    One damaged scheduler entry fails the whole call

    Malformed scheduler entry "bounded-b": value is not valid JSON
    Malformed scheduler entry "bounded-b": nextRun must be a non-negative finite number

    Stored templates are read without calling your Queue's custom serializer

  5. The limit has to be a positive whole number. Zero, a fraction, or not-a-number throws a range error before the queue even talks to the server. The in-memory TestQueue, from glide-mq/testing, gets the same method with the same size check, so your unit tests can cover the over-limit path too.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    Pass a positive whole number,
    in production and in tests

    Queue · Valkey or Redis
    queue.getRepeatableJobsBounded(500) // every scheduler, if 500 or fewer queue.getRepeatableJobsBounded(0) // RangeError: maxEntries must be // a positive safe integer
    TestQueue · glide-mq/testing, in memory
    testQueue.getRepeatableJobsBounded(500) // same size check, // same RangeError when over
  6. glide-mq ships agent skills, the guides a coding agent reads when it works with the library. Each skill installs on its own, without the repository's docs folder. So their references into that folder led nowhere. They now point at the docs on GitHub. A new lint step fails when a skill links outside its own folder, or to a file that doesn't exist.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    Docs links in the agent skills now work once installed

    skills/glide-mq-migrate-bullmq/references/new-features.md
    0.19
    [Worker crash behavior](../../../docs/DURABILITY.md#worker-crash-behavior)
    0.20
    https://github.com/avifenesh/glide-mq/blob/main/docs/DURABILITY.md#worker-crash-behavior
    npm run lint:skills

    fails on a link that leaves its skill
    or points at a missing file

  7. The security work is in the development and example dependencies. Vitest, body-parser, undici and Zod move to patched versions, Vite goes from 8.3.1 to 8.3.5, and what your app installs at runtime is unchanged. CI and the npm publish job now audit development dependencies too, down to low severity findings. Before this, CI checked only runtime dependencies, at moderate and above.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    Development tooling patched, runtime dependencies unchanged

    Vitest
    4.1.12
    with coverage-v8
    body-parser
    2.4.0
    undici
    6.29.1
    Zod
    4.6.7
    Vite
    8.3.5
    from 8.3.1
    CI and the npm publish job
    npm audit --include=dev --audit-level=low

    CI used to run --omit=dev --audit-level=moderate

  8. To upgrade, install glide-mq version 0.20.0 from npm. getRepeatableJobs is unchanged, and so are the runtime dependencies. The one thing to plan for is that the bounded call returns all or nothing. Set the limit above the number of schedulers you expect to keep. That's glide-mq 0.20, a scheduler listing with a hard size limit.

    Slide text
    glide-mq
    Added Fixed Security Upgrade

    Upgrade with one install,
    and existing calls behave the same

    npm install glide-mq@0.20.0

    getRepeatableJobs() is unchanged

    Runtime dependencies are unchanged

    The bounded call returns all or nothing.
    Set the limit above the schedulers you expect to keep.

What happened in AI today, in your inbox

One short email each evening. Read it and you’re caught up.

Built in New York with ❤️