i2goSignals

goSignals v0.12.0-alpha.15

Released: TBD Compare: v0.12.0-alpha.14…v0.12.0-alpha.15

Why this release

alpha.15 is the opt-in event-validation release — community spec #247, ADR 0029, shipped end-to-end in one PR (#257, merge 006a975) across nine sub-issues (#248–#256). Until now goSignals validated a SET only as a token — signature, iss, aud — and forwarded whatever payload rode inside it. A receiver that trusted goSignals inherited every malformed payload its upstream transmitters emitted. This release adds a transport-neutral validator registry (pkg/goSetValidate) and a per-receiver-stream event_validation mode, so an operator can say “if I recognize the event type, the payload had better be well-formed” — or, at the firewall end of the dial, “only events on my negotiated contract and vouched for by a validator reach my downstream”.

The feature is inert by default and this is a zero-behavior-change upgrade for validation purposes. The mode enum is NONE | WARN | ENFORCE | STRICT, defaulting to NONE, which is exactly today’s content-agnostic forwarding — no validator set is even built. WARN is the staged-rollout step (wire- invisible; a WARN log plus the new goSignals_router_event_validation_total counter is the only signal), ENFORCE rejects recognized-but-malformed events while still forwarding unknown types, and STRICT additionally rejects anything out-of-contract or unvalidatable. The knob lives on the internal StreamStateRecord (deliberately off the SSF wire-format StreamConfiguration, alongside DefaultSubjects / RetentionWindowDays / SubjectRemovalGraceSeconds), with a server-wide default from I2SIG_STREAM_EVENT_VALIDATION. It is receive-side only, applies identically on RFC 8936 poll, RFC 8935 push and SSTP, and on a bidirectional SSTP pair record the single field governs the inbound leg (COM-ADR 0018).

Spec #247 is a community-only enhancement — it creates no cross-repo slice and no consumer issue in any sister repo. Every library hook is additive only: goSetPush.ReceiverConfig, goSetPoll.ReceiverConfig and goSetSstp.VerifyConfig each gain one optional Validators field where nil reproduces today’s behavior exactly, no constructor or function signature moves (a compile-time assertion in the pkg test fails the build if VerifySET’s does), and the existing SSTP suite passes unmodified. Enterprise and admin recompile unchanged at this tag. Two behavior changes do warrant reading before upgrading — events_requested semantics (an omitted set now means “everything” rather than “nothing”, and a wildcard is enumerated rather than echoed back) and the delivery-path rejection handling, both detailed in their own sections below.

pkg/goSetValidate — the validation seam

Operator control surface: the event_validation knob

Transport enforcement: push, poll, SSTP

Validator packs: CAEP, RISC, SCIM, WISE

events_requested / events_delivered semantics (behavior change)

Delivery-path rejection handling (behavior change)

Adding a receiver-side rejection made the delivery paths’ handling of per-SET rejections load-bearing for the first time, and it was wrong in three places. Acking a SET is permanent, and all three paths cleared events on any rejection code — so a peer-side key rotation or a receiver misconfiguration became silent, unbounded event loss with the stream still reporting healthy.

Correctness fixes found in code review

Verification

go test -race ./... is green module-wide and go vet ./... is clean at 006a975; make seams passes, which is the additive-only claim for pkg/goSetPush, pkg/goSetPoll, pkg/goSetSstp and pkg/ssfModels. The window adds ~12,300 lines across 89 files, the large majority of it test code. New coverage: pkg/goSetValidate/{caep,risc,scim,wise,ssf_stream_management, validatorset,registry,parse,disposition,boundary,case_insensitive}_test.go (table-driven per-validator cases, each citing the spec/RFC section it encodes, plus the import-boundary and case-folding guards), pkg/ssfModels/{delivered_events_match,model_event_validation}_test.go and the four *_validator_coverage_test.go catalog drift guards, pkg/services/{stream_event_validation,stream_event_validation_normalize, stream_events_requested,stream_service_sstp}_test.go (knob persistence / inheritance / transmit-only warn-and-ignore, events_requested negotiation), pkg/goSetPush/receiver_validation_test.go, pkg/goSetPoll/poll_validation_test.go, pkg/goSetSstp/{verify_validation,setterr_disposition}_test.go, and the transport mode matrices in internal/server/{sstp_event_validation, sstp_second_push_feedback,sstp_seterr_clear}_test.go plus internal/server/test/{push,poll,sstp}_event_validation_test.go (one live-peer dial cycle proves a setErr reaches the wire).