Skip to content

Releases

v0.1.25.62 — Share API-key verification on cache expiry

Choose a tag to compare

@amavashev amavashev released this 28 Nov 19:15
279b4b9

Concurrent requests using the same API key now share a BCrypt verification when its 60-second cache entry expires. The server still checks key and tenant records on every request.

In a paired load test at 200 offered background reserve-commit cycles per second, quiet-tenant p99 fell from 228.04 to 24.98 ms with one background tenant and from 195.12 to 22.32 ms with sixteen. Every quiet-tenant cycle completed in all four 100-second windows.

Implementation and regression test · Benchmark setup and results

v0.1.25.61 — Route events for subscriptions with encrypted headers

Choose a tag to compare

@amavashev amavashev released this 27 Nov 14:18
2e948e0

Runtime event routing now accepts subscriptions that store encrypted custom headers. Upgrade all runtime event producers to this release and all delivery workers to v0.1.25.26 before enabling the v0.1.25.56 admin writer.

Runtime changes

v0.1.25.60 — tenant permissions and reservation settlement

Choose a tag to compare

@amavashev amavashev released this 26 Nov 18:54
c7b2e46

Suspended tenants can read and settle existing reservations. New reserves, extensions, and direct-debit events return 403. Dry runs and decisions return DENY.

  • Runtime endpoints now enforce API-key permissions. Check older keys for missing grants before upgrading. To migrate them gradually, temporarily set cycles.auth.enforce-permissions=false.
  • During a rolling upgrade, leave cycles.decisions.emit-tenant-suspended-reason at its default of false until every replica supports TENANT_SUSPENDED. If you enable it and later roll back, disable it on all replicas and wait 24 hours for cached responses to expire.
  • After tenant closure, the expiry sweeper releases outstanding holds and preserves refunds already processed. It can settle due reservations even when earlier entries are still in their grace period.
  • Balance queries continue to include externally seeded budgets. Deployments where governance indexes every budget can enable faster reads with cycles.balances.use-governance-index=true.
  • Live reserve denials and overdraft crossings now emit their corresponding events. Direct-debit balance events include the applied overage policy. Framework client errors return the appropriate HTTP 4xx status.

Changes in PR #301

v0.1.25.59 — authoritative reservation TTL

Choose a tag to compare

@amavashev amavashev released this 28 Jul 15:58
1407364

Authoritative reservation TTL

  • Emit remaining_ttl_ms on reservation create and extend responses.
  • Recompute the field on idempotent replays; finalized reservations report zero.
  • Keep the timing hint outside signed evidence payloads.
  • Stabilize replay assertions for the documented dynamic-field carve-out.
  • Align generated and runtime schemas on a non-negative TTL.

v0.1.25.58 — direct-event replay metrics

Choose a tag to compare

@amavashev amavashev released this 14 Jul 20:10
4ad4567

Direct-event replay metrics

This release closes the remaining replay-observability asymmetry: successful keyed direct-event replays now appear in the domain request counter without double-counting mutation-only effects.

Observability

  • Records successful keyed POST /v1/events replays as cycles_events_total{decision="APPLIED",reason="IDEMPOTENT_REPLAY"}.
  • Keeps fresh event applications tagged reason="OK".
  • Preserves exactly-once cycles_overdraft_incurred_total accounting when an event replay follows an original debt-incurring mutation.
  • Clarifies that domain event counters cover repository-handled outcomes and documents the operations that expose replay tags.

Compatibility and validation

  • Metrics-only behavior change: no protocol schema, HTTP body/status, Redis command, Lua script, ledger state, idempotency storage, evidence, or runtime-event behavior changed.
  • Production and full-stack Compose files pin ghcr.io/runcycles/cycles-server:0.1.25.58.
  • Targeted repository tests passed: 30/30.
  • Real-Redis metrics integration tests passed: 14/14.
  • Full integration-profile reactor discovered 1,207 tests with zero failures or errors.
  • Protocol operation coverage remains 11/11.
  • JaCoCo line coverage: data 95.14%, API 95.56%.
  • All merge CI, integration, CodeQL, container, and supply-chain checks passed.
  • [benchmark-skip]: the replay path adds one in-memory Micrometer counter increment; foreground Redis and ledger paths are unchanged.

Full details: CHANGELOG.md [0.1.25.58], AUDIT.md, BENCHMARKS.md, and PR #249.

v0.1.25.57 — Redis recovery and rolling-upgrade matrices

Choose a tag to compare

@amavashev amavashev released this 14 Jul 19:32
ad1a6b7

Redis recovery and rolling-upgrade matrices

This test/documentation-only release makes Redis lost-response recovery and supported rolling-upgrade storage compatibility executable in CI, without changing production behavior.

Recovery coverage

  • Adds deterministic lost-response tests for reserve, commit, release, direct event, dry-run, and decide.
  • Retries every discarded successful response and asserts byte-identical bodies plus exactly-once ledger, evidence, runtime-event, reservation, event, and TTL-index side effects.
  • Uses a FIFO executor barrier for deterministic asynchronous event draining rather than timing sleeps.

Upgrade compatibility

  • Adds frozen legacy Redis fixtures for lifecycle fast-body rows, pre-snapshot rows, pre-v0.1.25.52 event storage, the pre-v0.1.25.51 dry-run namespace, and reservations created before the optional created-at index.
  • Pins replay, mismatch, snapshot-backfill, no-second-debit, and index-backfill behavior against the current reader.
  • Strengthens fixtures so storage-field drift cannot make compatibility tests pass vacuously.

Compatibility and validation

  • No production source, protocol wire shape, Redis layout, or foreground command path changed.
  • Production and full-stack Compose files pin ghcr.io/runcycles/cycles-server:0.1.25.57.
  • 1,206 tests passed: 31 model, 575 data, 600 API; zero failures, errors, or skips.
  • Protocol operation coverage 11/11.
  • JaCoCo line coverage: data 95.14%, API 95.56%.
  • All merge CI, integration, CodeQL, container, and supply-chain checks passed.
  • [benchmark-skip]: this release changes tests and documentation only.

Full details: CHANGELOG.md [0.1.25.57], AUDIT.md, BENCHMARKS.md, issue #247, and PR #248.

v0.1.25.56 — leased scheduled Redis maintenance

Choose a tag to compare

@amavashev amavashev released this 14 Jul 18:35
14efc2f

Leased scheduled Redis maintenance

This release coordinates all five Redis-backed scheduled maintenance jobs across runtime replicas without changing protocol behavior, ledger semantics, job cadence, or foreground request paths.

Reliability and operations

  • Adds per-job Redis SET NX PX leases for reservation expiry, audit retention, event retention, created-at index repair, and created-at index sweeping.
  • Renews and releases leases only when the owner token still matches, preventing an old process from extending or deleting a successor lease.
  • Uses a bounded heartbeat executor plus local overlap guards; abandoned leases recover automatically after TTL.
  • Keeps every maintenance job idempotent and isolates action, Redis, renewal, release, and metrics failures from the scheduler.
  • Adds cycles_maintenance_runs_total{job,outcome} and cycles_maintenance_duration_seconds{job,outcome} with structurally bounded tags.
  • Warns at startup when the renewal interval exceeds one-third of the lease TTL and documents renewal head-of-line timeout margin.

Compatibility

  • No protocol schema, HTTP request/response, ledger Lua, authoritative Redis row, maintenance cadence, or foreground request-path change.
  • New cycles:maintenance:lease:* keys are short-lived internal coordination state.
  • Mixed fleets remain idempotent but do not provide single-run guarantees until every runtime pod is upgraded.
  • Production and full-stack Compose files pin ghcr.io/runcycles/cycles-server:0.1.25.56.

Validation

  • 1,195 tests passed: 31 model, 575 data, 589 API; zero failures, errors, or skips.
  • Protocol operation coverage 11/11.
  • JaCoCo line coverage: data 95.14%, API 95.56%.
  • Real-Redis tests cover two-runner exclusion, heartbeat renewal, stale-owner release protection, abandoned-lease recovery, Redis/type/action/metrics failures, and all five scheduler delegations.
  • All PR CI, integration, CodeQL, Trivy, and container checks passed.
  • [benchmark-skip]: production changes are confined to background maintenance and bounded metrics; no HTTP or ledger hot path changed.

Full details: CHANGELOG.md [0.1.25.56], AUDIT.md, BENCHMARKS.md, issue #245, and PR #246.

v0.1.25.55 — typed reservation-query boundary

Choose a tag to compare

@amavashev amavashev released this 14 Jul 17:39
bf972c5

Typed reservation-query boundary

This release reduces the highest remaining change-risk concentration in cycles-server without changing protocol, Redis, cursor, filtering, ordering, or performance behavior.

Internal architecture

  • Introduces immutable ReservationListQuery groups for scope filters, inclusive time windows, sort state, cursors, limits, and optional projections.
  • Moves SCAN pagination, sorted fallback, and completeness-gated created-at traversal into RedisReservationQueryRepository.
  • Centralizes Redis hash projections, filter matching, finalized-time resolution, and detail/list hydration in ReservationHashMapper.
  • Retains both public RedisReservationRepository.listReservations(...) signatures as the compatibility facade.
  • Shares exact scope-segment matching between reservation and balance queries while preserving the existing first-occurrence behavior.

Correctness safeguards

  • Adds a real-Redis query matrix that executes through both a READY created-at index and the authoritative SCAN fallback.
  • Asserts identical rows, stable ordering, page boundaries, exact cursor bytes, and error code/status/message across both paths.
  • Pins the tenant, reservation_id, and created_at consistency fields in listing projections.
  • Preserves the established filter-hash argument order so in-flight sorted cursors remain valid across the upgrade.

Compatibility

  • No protocol schema, HTTP signature, response shape, Redis key, Lua script, Redis command sequence, cursor encoding, filter, ordering, index readiness, or feature-flag change.
  • Production and full-stack Compose files pin ghcr.io/runcycles/cycles-server:0.1.25.55.

Validation

  • 1,182 tests passed: 31 model, 562 data, 589 API; zero failures, errors, or skips.
  • Protocol operation coverage 11/11.
  • JaCoCo line coverage: data 95.22%, API 95.56%.
  • Real-Redis created-at index suite 24/24, including explicit INDEX and SCAN_DISABLED parity coverage.
  • Three paired candidate and three v0.1.25.54 baseline benchmark trials completed all 17 cases with zero errors.
  • Sorted-list p50 remained 17.0 ms at 1,000 rows and moved from 16.9 ms to 17.6 ms (+4.1%) at 10,000 rows, classified as performance-neutral.
  • All PR CI, integration, CodeQL, Trivy, and container checks passed.

Full details: CHANGELOG.md [0.1.25.55], AUDIT.md, BENCHMARKS.md, issue #243, and PR #244.

v0.1.25.54 — bounded created-at reservation listing

Choose a tag to compare

@amavashev amavashev released this 14 Jul 15:57
182ea05

Bounded created-at reservation listing

This release makes the default created_at_ms reservation listing population-independent while preserving reservation hashes as the authority and retaining the complete full-SCAN fallback whenever index completeness is uncertain.

Performance

  • Adds a per-tenant created_at_ms ZSET, atomically dual-written by reservation creation.
  • Serves the default sorted query in bounded, tie-safe candidate batches only after READY/count validation succeeds.
  • Reduces same-host p50 from 22.5 ms to 10.7 ms at 1,000 rows and from 164.9 ms to 11.1 ms at 10,000 rows.
  • Leaves the other six sort keys on the authoritative full-SCAN implementation.

Reliability and rollout

  • Uses restartable backfill, expected-count validation before and after hydration, lazy stale cleanup, and a nightly authoritative sweep.
  • Invalidates readiness on malformed authoritative rows and repairs exclusively owned wrong-type index keys without creating complete-looking omissions.
  • Isolates scheduled maintenance on a bounded four-thread pool and backs off deterministic malformed-row reconciliation failures for one hour.
  • Validates sorted cursor boundaries before Redis work so indexed and fallback paths return the same 400 INVALID_REQUEST.
  • Defaults the read/backfill switch off in the application and both production Compose files; enable RESERVATION_CREATED_AT_INDEX_ENABLED only after every writer runs v0.1.25.54 or newer.

Compatibility

  • No protocol schema, response body, filtering, ordering, or cursor-format change.
  • Disabling the feature flag immediately restores the previous full-SCAN read path.
  • Production and full-stack Compose files pin ghcr.io/runcycles/cycles-server:0.1.25.54.

Validation

  • 1,181 tests passed: 31 model, 561 data, 589 API; zero failures, errors, or skips.
  • Protocol operation coverage 11/11.
  • JaCoCo line coverage: data 95.10%, API 95.56%.
  • Real-Redis coverage includes 10,000-row traversal, 300-way timestamp ties, rollout/readiness races, malformed cursors, corruption fallback, wrong-type repair, sweep isolation, and repair backoff.
  • Three local benchmark trials completed all 17 cases with zero errors; the release workflow will independently enforce the rolling 25% regression gate.
  • Production Compose configurations render successfully.

Full details: CHANGELOG.md [0.1.25.54], AUDIT.md, BENCHMARKS.md, and PR #242.

v0.1.25.53 — sorted reservation scaling baseline

Choose a tag to compare

@amavashev amavashev released this 14 Jul 13:42
23e4176

Sorted reservation scaling baseline

This benchmark-only release establishes the pre-index comparison point for cycles-server#240 without changing production request, Lua, Redis-storage, or wire behavior.

Added

  • end-to-end GET /v1/reservations sorted-list benchmarks at 1,000 and 10,000 total reservation hashes
  • a 50/50 authenticated-tenant/unrelated-tenant fixture that exposes the current global SCAN and hydration cost
  • list_sorted_1k_p50_ms and list_sorted_10k_p50_ms in benchmark parsing, three-trial medians, nightly history, and release regression gating
  • a revised completeness-safe Phase B design: one default-sort index, explicit post-rollout readiness, expected-count validation, restartable backfill, stale cleanup, stable tie pagination, and full-SCAN fallback

Baseline

Three same-host medians against the unchanged v0.1.25.52 runtime:

  • 1,000 total / 500 tenant rows: 22.5 ms p50, 40.9 ms p95, 48.3 ms p99
  • 10,000 total / 5,000 tenant rows: 164.9 ms p50, 210.2 ms p95, 232.0 ms p99

Validation

  • 1,144 tests; zero failures, errors, or skips
  • protocol operation coverage 11/11
  • JaCoCo line coverage: data 95.12%, API 95.56%
  • release benchmark profile 17/17 with all nine headline metrics parsed
  • production Compose configurations validated