Skip to content

feat(runtime): lease scheduled Redis maintenance (v0.1.25.56) - #246

Merged
amavashev merged 2 commits into
mainfrom
agent/redis-maintenance-runner-245
Jul 14, 2026
Merged

amavashev merged 2 commits into
mainfrom
agent/redis-maintenance-runner-245

Conversation

@amavashev

@amavashev amavashev commented Jul 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • coordinate all five scheduled Redis maintenance jobs with per-job SET NX PX leases
  • renew and release leases with owner-token Lua compare-and-expire/delete scripts
  • keep scheduler failures non-fatal and expose bounded job/outcome counters and timers
  • document multi-replica behavior, alerting, tuning, and the v0.1.25.56 release matrix

Correctness and compatibility

  • no protocol schema, HTTP request/response, ledger Lua, or foreground request-path change
  • authoritative maintenance work remains idempotent; lease loss is observable and does not let an old owner delete a successor lease
  • direct maintenance methods remain non-leased test/manual seams; every @Scheduled entry point delegates to the shared runner
  • both production Compose files validate and self-pin v0.1.25.56

Validation

  • mvn -B verify -Dcontract.spec.url=file:///.../cycles-protocol-v0.yaml
  • mvn -B verify -Pintegration-tests -Dcontract.spec.url=file:///.../cycles-protocol-v0.yaml
  • 1,195 tests: 31 model, 575 data, 589 API; zero failures/errors/skips
  • protocol operation coverage 11/11
  • JaCoCo line coverage: 95.14% data, 95.56% API
  • real-Redis coverage includes two-runner exclusion, heartbeat renewal, stale-owner release protection, abandoned lease recovery, wrong-type/acquisition/action/metrics failures, and all five scheduler delegations
  • docker compose ... config --quiet passes for both production files
  • git diff --check passes

Performance

[benchmark-skip]: production changes are confined to background maintenance coordination and metrics; no HTTP or ledger hot path changed.

Closes #245

@amavashev
amavashev marked this pull request as ready for review July 14, 2026 18:31
@amavashev
amavashev enabled auto-merge July 14, 2026 18:32
@amavashev
amavashev merged commit 14efc2f into main Jul 14, 2026
8 checks passed
@amavashev
amavashev deleted the agent/redis-maintenance-runner-245 branch July 14, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Harden scheduled Redis maintenance with shared leases and bounded metrics

1 participant