Vincent Koc
4ca84acf24
fix(runtime): duplicate messages, share singleton state across bundled chunks ( #43683 )
...
* Tests: add fresh module import helper
* Process: share command queue runtime state
* Agents: share embedded run runtime state
* Reply: share followup queue runtime state
* Reply: share followup drain callback state
* Reply: share queued message dedupe state
* Reply: share inbound dedupe state
* Tests: cover shared command queue runtime state
* Tests: cover shared embedded run runtime state
* Tests: cover shared followup queue runtime state
* Tests: cover shared inbound dedupe state
* Tests: cover shared Slack thread participation state
* Slack: share sent thread participation state
* Tests: document fresh import helper
* Telegram: share draft stream runtime state
* Tests: cover shared Telegram draft stream state
* Telegram: share sent message cache state
* Tests: cover shared Telegram sent message cache
* Telegram: share thread binding runtime state
* Tests: cover shared Telegram thread binding state
* Tests: avoid duplicate shared queue reset
* refactor(runtime): centralize global singleton access
* refactor(runtime): preserve undefined global singleton values
* test(runtime): cover undefined global singleton values
---------
Co-authored-by: Nimrod Gutman <nimrod.gutman@gmail.com >
2026-03-12 14:59:27 -04:00
Peter Steinberger
7e59803df2
refactor(queue): use stable tuple key for recent message dedupe
2026-03-08 01:14:16 +00:00
Peter Steinberger
5edcab2eee
fix(queue): land #33168 from @rylena
...
Landed from contributor PR #33168 by @rylena.
Co-authored-by: Rylen Anil <rylen.anil@gmail.com >
2026-03-08 00:51:11 +00:00
Jealous
60130203e1
fix(queue): restart drain when message enqueued after idle window
...
After a drain loop empties the queue it deletes the key from
FOLLOWUP_QUEUES. If a new message arrives at that moment
enqueueFollowupRun creates a fresh queue object with draining:false
but never starts a drain, leaving the message stranded until the
next run completes and calls finalizeWithFollowup.
Fix: persist the most recent runFollowup callback per queue key in
FOLLOWUP_RUN_CALLBACKS (drain.ts). enqueueFollowupRun now calls
kickFollowupDrainIfIdle after a successful push; if a cached
callback exists and no drain is running it calls scheduleFollowupDrain
to restart immediately. clearSessionQueues cleans up the callback
cache alongside the queue state.
2026-03-02 19:38:08 +00:00
Peter Steinberger
d116bcfb14
refactor(runtime): consolidate followup, gateway, and provider dedupe paths
2026-02-22 14:08:51 +00:00
Peter Steinberger
b8b43175c5
style: align formatting with oxfmt 0.33
2026-02-18 01:34:35 +00:00
Peter Steinberger
31f9be126c
style: run oxfmt and fix gate failures
2026-02-18 01:29:02 +00:00
cpojer
d0cb8c19b2
chore: wtf.
2026-02-17 13:36:48 +09:00
Sebastian
ed11e93cf2
chore(format)
2026-02-16 23:20:16 -05:00
cpojer
90ef2d6bdf
chore: Update formatting.
2026-02-17 09:18:40 +09:00
cpojer
f06dd8df06
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.
2026-02-01 10:03:47 +09:00
cpojer
5ceff756e1
chore: Enable "curly" rule to avoid single-statement if confusion/errors.
2026-01-31 16:19:20 +09:00
Peter Steinberger
7cebe7a506
style: run oxfmt
2026-01-17 08:00:05 +00:00
Peter Steinberger
eb8a0510e0
refactor: unify queue drop handling
2026-01-17 06:38:33 +00:00
Peter Steinberger
c7ae5100fa
refactor: share queue helpers
...
Co-authored-by: adam91holt <adam91holt@users.noreply.github.com >
2026-01-17 06:02:27 +00:00
Peter Steinberger
c379191f80
chore: migrate to oxlint and oxfmt
...
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com >
2026-01-14 15:02:19 +00:00
Peter Steinberger
bcbfb357be
refactor(src): split oversized modules
2026-01-14 01:17:56 +00:00