feat(KB-136): add shared badge pub/sub for multi-instance deployments

- Add BadgePubSub interface with Redis and in-memory adapters

- Implement cross-instance badge snapshot delivery via Redis pub/sub

- Add message validation, echo loop prevention, and structured caching

- Support graceful fallback to in-memory mode when Redis unavailable

- Update ServerOptions for dependency injection and add documentation
This commit is contained in:
gsxdsm
2026-03-30 12:52:07 -07:00
parent fc0ce7cf95
commit 2dbcf2433e
14 changed files with 1341 additions and 23 deletions

View File

@@ -8,6 +8,13 @@ export interface BadgeUpdate {
timestamp?: string;
}
/** BadgeSnapshot is the full badge state with required timestamp for caching */
export interface BadgeSnapshot {
prInfo?: PrInfo | null;
issueInfo?: IssueInfo | null;
timestamp: string;
}
export interface BadgeUpdatedMessage {
type: "badge:updated";
taskId: string;