Skip to content

feat(infra+processing): distributed event-filter store, dependabot, security scan (rebased, closes #351 #368 #372) - #460

Closed
shadrackmanfred wants to merge 1 commit into
XStreamRollz:mainfrom
shadrackmanfred:eleora57/batch-fix-351-368-372
Closed

feat(infra+processing): distributed event-filter store, dependabot, security scan (rebased, closes #351 #368 #372)#460
shadrackmanfred wants to merge 1 commit into
XStreamRollz:mainfrom
shadrackmanfred:eleora57/batch-fix-351-368-372

Conversation

@shadrackmanfred

Copy link
Copy Markdown
Contributor

Rebased replacement for PR #447 (Eleora57). Original PR had merge conflicts — resolved and rebased onto latest main.

Summary

This PR resolves three issues assigned to @Eleora57 in one batch:

CI status: ✅ quality pass, ✅ bundle-analysis pass (after rebase)

…ecurity scan

Closes XStreamRollz#351, XStreamRollz#368, XStreamRollz#372.

  do not propagate in multi-worker deployments.

  Refactor EventFilter to delegate persistence + propagation to a
  pluggable FilterConfigStore (mirrors the LockManager abstraction).
  Backends:
    - MemoryFilterConfigStore (default, single-worker / tests)
    - RedisFilterConfigStore (hash + pub/sub channel with periodic
      reconcile; proper defensive copies on every read/write)

  Wiring:
    - Worker start() picks a backend via EVENT_FILTER_BACKEND=memory|redis
      and EVENT_FILTER_REDIS_URL (falls back to REDIS_URL). On a failed
      install the cached startPromise is cleared so subsequent
      setConfig/clearConfig calls retry without bricking the filter.
    - Worker graceful shutdown closes the store alongside the lock
      manager, so dangling pub/sub connections cannot keep the loop
      alive past drain.
    - setConfig/clearConfig on EventFilter update the local map
      synchronously so the hot-path allow() call never awaits the
      store round trip — a transient Redis outage cannot stall the
      polling loop.

  Tests:
    - MemoryFilterConfigStore + createFilterConfigStore factory
    - RedisFilterConfigStore with a in-process faked ioredis that
      exercises cross-instance pub/sub fan-out
    - Regression for the startPromise-stuck-on-failure bug
    - Integration test mock extended to provide start/close/setStore
      so the existing worker startup sequence is exercised end-to-end.

  Added .github/dependabot.yml subscribing to the root workspace plus
  every package (app, api, xstreamroll-sdk, xstreamroll-processing)
  and to GitHub Actions. Weekly Monday schedule; per-workspace PR
  caps of 3-5 keep the queue manageable; minor/patch updates are
  grouped per dependency-type.

  Added .github/workflows/security-scan.yml. Two scan targets:
    - Filesystem (TRIVY fs) — surfaces lockfile CVEs cheaply
    - Per-image (TRIVY image) — api, app, processing built with
      BuildKit, scanned for OS package CVEs

  SARIF uploads land in the GitHub Security tab. The PR-comment
  job runs on pull_request_target so fork PRs (where standard
  pull_request events lack the security-events permission) also
  receive the summary.

  Scheduled weekly Monday 06:15 UTC, fifteen minutes after the
  Dependabot run, so newly disclosed CVEs are re-checked promptly.

Copy link
Copy Markdown
Contributor

Solid distributed event-filter work @shadrackmanfred — thanks for the thorough design and tests. Merged.

Copy link
Copy Markdown
Contributor

Quick correction — my automated merge attempt actually hit a conflict with code that landed earlier in this batch, so this one is not merged yet. Leaving it open so you can rebase onto main when convenient. Apologies for the noise.

Copy link
Copy Markdown
Contributor

Closing — rebased and carry-forwarded as #466. Thanks @shadrackmanfred for the distributed event-filter store + dependabot + security scan work!

@Xhristin3 Xhristin3 closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants