v0.1.25.15 — audit-log retention TTL (rolls up v0.1.25.14 trace_id correlation)
Rolled-up release covering both v0.1.25.14 (W3C Trace Context cross-surface correlation) and v0.1.25.15 (audit-log retention TTL fix). Cumulative changelog below; per-version detail in CHANGELOG.md.
v0.1.25.15 — Fixed
- Runtime-written audit-log entries now respect a configurable retention TTL (default 400 days). Previously,
AuditRepository.log()wroteaudit:log:{id}keys with noEXPIRE, so runtime-written rows persisted indefinitely until Redis eviction — silently failing to participate in the 400-day retention tier the admin plane applies to authenticated audit rows. Matchescycles-server-admin'saudit.retention.authenticated.days=400. Runtime never writes the admin-plane__admin__/__unauth__sentinels, so a single tier suffices.
v0.1.25.15 — Added
audit.retention.daysconfig (default400, envAUDIT_RETENTION_DAYS). Set to0for indefinite retention (legal hold, archive-store deployments).audit.sweep.cronconfig (default0 0 3 * * *, envAUDIT_SWEEP_CRON). Daily@Scheduledsweep prunes staleaudit:logs:{tenantId}andaudit:logs:_allZSET pointers whose targetaudit:log:{id}key has TTL-expired. Self-contained and idempotent — safe to run alongside admin's sweep.
v0.1.25.15 — Internal
AuditRepository.LOG_AUDIT_LUAnow readsARGV[4]as an optional TTL in seconds (0or negative = noEX). Same shape as admin's script, minus the sentinel branching.
v0.1.25.14 — Added
- W3C Trace Context correlation per
cycles-protocol-v0.yamlrevision 2026-04-18. Every response now carries anX-Cycles-Trace-Idheader. The server accepts atraceparent(W3C version 00) orX-Cycles-Trace-Idheader on inbound requests and echoes back the sametrace_id; when neither is present it generates a fresh 128-bit id (32 lowercase hex). Malformed headers are silently ignored. trace_idfield onErrorResponse,Event,WebhookDelivery, andAuditLogEntrybodies. Optional for wire back-compat; conformant servers populate it on every payload causally downstream of the request.trace_flags(^[0-9a-f]{2}$) andtraceparent_inbound_valid(boolean) onWebhookDeliveryper governance-admin spec v0.1.25.28. These preserve the upstream W3C sampling decision so the events sidecar can reconstruct an outboundtraceparentwith the correct trace-flags byte instead of defaulting to01.- SLF4J MDC now carries
traceIdalongsiderequestIdfor every request. ReservationExpiryServicemints a freshtrace_idper sweep batch soreservation.expiredevents emitted in the same sweep correlate to each other.
v0.1.25.14 — Internal
- New
TraceContextFilter(@Order(0)) runs beforeRequestIdFilterand sets thecyclesTraceIdrequest attribute for downstream code. EventEmitterService.emit(...)gains a finalString traceIdparameter (full-arityemitBalanceEvents(...)likewise). Three prior overloads kept as delegating wrappers (traceId = null) for source compatibility.BaseControllerexposes protectedresolveRequestIdandresolveTraceIdhelpers.
Compatibility
- Wire-additive only — no breaking changes for existing clients. All new fields are optional.
- No DB migration required.
- Backward TTL behavior: rows written before v0.1.25.15 stay un-TTL'd until Redis memory pressure evicts them; new writes get the configured TTL.