Skip to content

fix(runtime): expose event replay metrics (v0.1.25.58) - #249

Merged
amavashev merged 2 commits into
mainfrom
agent/event-replay-metrics-58
Jul 14, 2026
Merged

amavashev merged 2 commits into
mainfrom
agent/event-replay-metrics-58

Conversation

@amavashev

Copy link
Copy Markdown
Collaborator

Summary

  • record successful keyed POST /v1/events replays as cycles_events_total{decision="APPLIED",reason="IDEMPOTENT_REPLAY"}
  • preserve the existing replay guard on cycles_overdraft_incurred_total, so mutation-only observability remains exactly-once
  • add repository and real-Redis HTTP coverage for the tag split, identical replay body, and no overdraft double-count
  • bump the runtime revision and production Compose pins to 0.1.25.58, with the full documentation matrix

Why

Reserve, commit, and release already expose successful replay request traffic with reason=IDEMPOTENT_REPLAY. Direct-event replays were the remaining asymmetry: they returned the canonical response but emitted no cycles.events sample, contradicting the counter's every-outcome contract and making replay traffic invisible to operators.

Compatibility and performance

This is a metrics-only behavior change. It does not change the protocol schema, HTTP body/status, Redis commands, Lua scripts, ledger state, idempotency storage, evidence, or runtime-event emission. The replay path adds one in-memory Micrometer counter increment; fresh event paths are unchanged. [benchmark-skip]

Validation

  • RedisReservationDecideEventTest: 30/30 passed
  • MetricsCorrectnessIntegrationTest: 14/14 passed against Testcontainers Redis
  • full integration-profile reactor: 1,207 tests discovered (31 model, 575 data, 601 API), zero failures/errors
  • JaCoCo line coverage: data 95.14%, API 95.56%
  • both production Compose files render successfully with validation placeholders for required secrets
  • PR CI remains authoritative for the live cycles-protocol@main response contract and 11/11 operation coverage

@amavashev
amavashev marked this pull request as ready for review July 14, 2026 19:59
@amavashev
amavashev enabled auto-merge July 14, 2026 20:06
@amavashev
amavashev merged commit 4ad4567 into main Jul 14, 2026
8 checks passed
@amavashev
amavashev deleted the agent/event-replay-metrics-58 branch July 14, 2026 20:08
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.

1 participant