Repository navigation
feat(events): publish Gateway HTTP and gRPC audit schemas - #2019
Merged
Merged
Conversation
NumaryBot
approved these changes
Nov 9, 2026
NumaryBot
left a comment
There was a problem hiding this comment.
The required automated review completed with no remaining findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Stack event catalogue has no schema for Gateway AuditLog events. This adds the v2
gateway/AUDITenvelope, covering existing HTTP events and the optionalpayload.grpcextension introduced by https://github.com/formancehq/gateway/pull/157.The contract distinguishes observed gRPC status from local termination and HTTP status, preserves optional and nullable values emitted by Go, and validates base64 capture prefixes up to 64 KiB per direction. The standalone schema and both current and legacy catalogues are regenerated. No runtime code, generator, component pin or consumer reporting changes are included.
Validation:
nix develop --command just generate-events,go test -race ./...,go vet ./...andgo mod tidy -diffin the events module all passed. Fixtures were captured from the real Gateway producer ataadadb2through Caddy, grpc-go and NATS: HTTP, unary success, NotFound and an unavailable upstream. Tests check the embedded and generated schemas and both catalogues, invalid events, exact binary limits and HTTP compatibility. Regeneration is deterministic and the two catalogues are byte-identical. The unrelated OpenAPI build was not run.The
gateway/v2.0.0catalogue key groups envelopeversion: v2, first emitted by Gateway v2.2.0; it does not assert that old Gateway releases emit the optional gRPC extension. The current Stack Gateway pin is unchanged. Publishing this contract does not deploy Gateway support or update downstream HTTP-status-based reporting.Council review
This is the companion-contract round R3/5 of the AuditLog council; R1/R2 reviewed the Gateway architecture and implementation in https://github.com/formancehq/gateway/pull/157. All three Pi members approved the Stack contract in R3; stopped on convergence with no blocking objections.
Reviewed: base
a476c6c75c480b91626c64919f7450a3625a16abplus staged diff SHA-25674c9ab4cbcad2695e7556d6f352aca7194e017c4c74a77d9b4d9947d45f0c875. Commit0116a97ceeb844249bce729a1189e7515bb92af3adds only subsequent README clarifications about Gateway release history, generic consumer wording and draft-07 support; those text changes were not reviewed in another round. The schemas, catalogues and tests are unchanged after approval.ai_relay/claude-opus-5-5,thinking=maxai_relay/gpt-6.1-sol,thinking=maxai_relay/mistral-large-4,thinking=highCoordinator recommendation: publish the companion contract. No dissent or unresolved blocking objection. Consumer reporting and production routing remain outside this schema-only scope. Validation ran on Go 1.26.10 with source compatible with the events module's Go 1.21.6 target. No runtime changes followed review.