Skip to content

feat(events): publish Gateway HTTP and gRPC audit schemas - #2019

Merged
flemzord merged 1 commit into
mainfrom
feat/audit-grpc-event-schema
Nov 10, 2026
Merged

flemzord merged 1 commit into
mainfrom
feat/audit-grpc-event-schema

Conversation

@flemzord

@flemzord flemzord commented Nov 9, 2026

Copy link
Copy Markdown
Member

The Stack event catalogue has no schema for Gateway AuditLog events. This adds the v2 gateway / AUDIT envelope, covering existing HTTP events and the optional payload.grpc extension 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 ./... and go mod tidy -diff in the events module all passed. Fixtures were captured from the real Gateway producer at aadadb2 through 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.0 catalogue key groups envelope version: 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 a476c6c75c480b91626c64919f7450a3625a16ab plus staged diff SHA-256 74c9ab4cbcad2695e7556d6f352aca7194e017c4c74a77d9b4d9947d45f0c875. Commit 0116a97ceeb844249bce729a1189e7515bb92af3 adds 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.

Actual member and options R3 conclusion
ai_relay/claude-opus-5-5, thinking=max APPROVE; verified producer parity and generated schema composition. Advisory documentation clarifications applied. Exchange
ai_relay/gpt-6.1-sol, thinking=max APPROVE; companion sol-loop R1, no blocker/should/nit findings. Tests, vet, tidy and binary boundaries independently verified. Exchange
ai_relay/mistral-large-4, thinking=high APPROVE; verified exact binary bounds, nullable fields and additive HTTP compatibility. Draft-07 requirement documented. Exchange

Coordinator 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.

@NumaryBot NumaryBot added risk: medium NumaryBot classified this pull request as medium risk. bot-reviewed NumaryBot completed its review workflow for the current head. review-approved The NumaryBot review gate is satisfied for the current head. labels Nov 9, 2026

@NumaryBot NumaryBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The required automated review completed with no remaining findings.

@flemzord
flemzord merged commit cc452c0 into main Nov 10, 2026
3 checks passed
@flemzord
flemzord deleted the feat/audit-grpc-event-schema branch November 10, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-reviewed NumaryBot completed its review workflow for the current head. review-approved The NumaryBot review gate is satisfied for the current head. risk: medium NumaryBot classified this pull request as medium risk.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants