Proposal: ActiveJob::Attributes to persist data between steps

I already opened the PR and only later remembered I should’ve opened a discussion here, so belatedly:

At work we have multi-step jobs where we need to temporarily hold on to some intermediate data from one step that’s required for a subsequent step, and we don’t want/need to persist these long term on our Active Record models. We originally solved this problem with job-iteration and overriding the serialize/deserialize methods (gist w/ prototype).

Rails 8.1 made multi-step jobs a first-class citizen with Active Job Continuation. For our needs the step DSL is an ergonomic improvement but it still missing a way to persist data across interruptions and resumptions. This PR adds that capability with ActiveJob::Attributes, using Active Model Attributes under the hood. It is included by default in ActiveJob::Continuable, where IMO it is most useful, but could also be used standalone.

PR: Add ActiveJob::Attributes to persist data between steps #57208