Skip to content

Make Node rule violation delivery observable - #113

Merged
cport1 merged 1 commit into
mainfrom
fix/violation-delivery-outcomes
Nov 22, 2026
Merged

cport1 merged 1 commit into
mainfrom
fix/violation-delivery-outcomes

Conversation

@cport1

@cport1 cport1 commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Count acknowledged, failed, discarded, and buffered rule events per SDK instance. Keep unattempted batches queued while the client is paused, and join sends during graceful shutdown.
  • Attach a Next.js rule batch to the request's waitUntil hook when available. Monitor-mode framework adapters send dry-run violations and omit tripwire clearance tokens.
  • Document the distinction between rule violations and Detections. The SDK leaves attempted batches with uncertain acknowledgment out of subsequent sends because the existing ingest endpoint can already have written them.

Verification

  • 633 tests passed across Node, Next.js, Express, Fastify, and Hono on Node 22. Workspace build, lint, and edge compatibility checks passed.
  • The real HTTP loopback receiver measured a 503 for the first 100 events and one successful send of the five remaining events after cooldown.
  • The built Next.js middleware returned 200 in monitor mode with a dry-run report and 403 in enforce mode with an enforceable report. Both HTTP batches completed through the supplied lifecycle hook.
  • Existing ingest tripwire and violation tests passed.

Part of WebDecoy/app#1945.

@cport1
cport1 merged commit 563c35b into main Nov 22, 2026
2 checks passed
@cport1 cport1 mentioned this pull request Nov 22, 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.

1 participant