Skip to content

F-130: C1 recovery-mode admin HTTP surface#11

Merged
fdatoo merged 9 commits intomainfrom
feature/f-130-c1-implement-recovery-mode-admin-http-surface
May 10, 2026
Merged

F-130: C1 recovery-mode admin HTTP surface#11
fdatoo merged 9 commits intomainfrom
feature/f-130-c1-implement-recovery-mode-admin-http-surface

Conversation

@fdatoo
Copy link
Copy Markdown
Owner

@fdatoo fdatoo commented May 9, 2026

Summary

  • Adds ReplayError typed error to internal/eventstore so replay failures carry the failing position and projector name, extractable via errors.As
  • Adds RecoveryProvider interface in internal/observability/ with five HTTP handlers: GET /events, GET /projection-cursors, GET /skipped-events, POST /events/{position}/skip, POST /shutdown
  • Implements RecoveryProvider on *Daemon; all five endpoints guarded by InRecovery() — return 404 when daemon is not in recovery phase
  • Adds 30-second heartbeat goroutine in enterRecovery that logs failure reason + position until daemon context is cancelled
  • Wires shutdownCancel on Daemon so the POST /shutdown handler can cancel the daemon's context and trigger a clean exit
  • Adds ProjectorNames() to eventstore.Store so the skip handler can validate the projector field against registered projectors

Test plan

  • go test ./internal/eventstore/...TestReplay_ReturnsReplayError, TestReplay_SkipEventAllowsReplayToProceed, TestStore_ProjectorNames
  • go test ./internal/observability/... — 20 handler tests covering not-in-recovery (404), success paths, empty slices, bad input, unknown projector, shutdown
  • go build ./... — clean compile

🤖 Generated with Claude Code

@fdatoo fdatoo merged commit 2ff7bfd into main May 10, 2026
11 checks passed
@fdatoo fdatoo deleted the feature/f-130-c1-implement-recovery-mode-admin-http-surface branch May 10, 2026 06:49
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