-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
after_compaction hook ctx missing sessionKey in handlers.compaction.ts #27836
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Bug
pi-embedded-subscribe.handlers.compaction.ts passes an empty object {} as hook context to runAfterCompaction, while before_compaction in the same file correctly passes { sessionKey: ctx.params.sessionKey }.
This causes any plugin after_compaction hook that depends on ctx.sessionKey to silently skip.
Affected Code
// pi-embedded-subscribe.handlers.compaction.ts:70-76
void hookRunnerEnd.runAfterCompaction(
{ messageCount: ..., compactedCount: ... },
{}, // BUG: should be { sessionKey: ctx.params.sessionKey }
)Compare with before_compaction (line 22-35) which correctly passes { sessionKey: ctx.params.sessionKey }.
Fix
One-liner: {} → { sessionKey: ctx.params.sessionKey }
Impact
Any plugin using after_compaction with ctx.sessionKey (e.g. session-scoped handoff injection via enqueueSystemEvent) silently fails.
Version
2026.2.25
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Give feedbackNo fields configured for issues without a type.