Skip to content

Replay authenticated requests and track calculations - #3

Merged
fc-anjos merged 2 commits into
mainfrom
feature/warden-replay
Aug 2, 2026
Merged

fc-anjos merged 2 commits into
mainfrom
feature/warden-replay

Conversation

@fc-anjos

@fc-anjos fc-anjos commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Motivation

Reactive controller replays currently run outside the original request. When a page reads current_user, Devise expects request.env["warden"], so delivery fails with Devise::MissingWarden even though the original request was authenticated.

Aggregate-only views have a separate gap. Active Record routes count, sum, average, minimum, and maximum through Relation#calculate, but Upkeep only observes relation loading and pluck. A dashboard count can therefore render correctly without registering the query that should invalidate it.

Changes

  • capture observed Warden users as replay inputs
  • serialize authenticated records by model and id
  • reconstruct the Warden read surface for controller replay
  • support authenticate! and preserve Warden scope semantics
  • track Active Record calculations through their shared calculate path
  • preserve selected, grouped, predicate, and aggregate-column dependencies
  • cover serialized authenticated replay and aggregate invalidation in the Rails integration suite
  • bump the release to 0.2.2

Verification

  • bundle exec rake test
  • 385 runs, 2,211 assertions, 0 failures
  • native package workflow passes on x86_64 macOS, arm64 macOS, x86_64 Linux, aarch64 Linux, and x64 Windows

@fc-anjos fc-anjos changed the title Replay authenticated controller requests Replay authenticated requests and track calculations Aug 2, 2026
@fc-anjos
fc-anjos merged commit 2a01e12 into main Aug 2, 2026
6 checks passed
@fc-anjos
fc-anjos deleted the feature/warden-replay branch August 2, 2026 19:04
fc-anjos added a commit that referenced this pull request Aug 5, 2026
Replay authenticated requests and track calculations
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