well, with the PR and adding change set_context(%{strategy_name: :password})
to create :register_with_password
, I get Invalid value provided for record_id: is invalid
[info] GET /register
[debug] Processing with AshAuthentication.Phoenix.SignInLive.register/2
Parameters: %{}
Pipelines: [:browser]
[info] Sent 200 in 2ms
[info] CONNECTED TO Phoenix.LiveView.Socket in 11µs
Transport: :websocket
Serializer: Phoenix.Socket.V2.JSONSerializer
Parameters: %{"_csrf_token" => "GFxmXjQLVCh9ACcKST5fZyAvESYENgVbrm50y2lzDZVIdaoSRmVPjwov", "_live_referer" => "undefined", "_mount_attempts" => "0", "_mounts" => "0", "_track_static" => %{"0" => "http://localhost:4000/assets/app.css", "1" => "http://localhost:4000/assets/app.js"}, "vsn" => "2.0.0"}
[debug] MOUNT AshAuthentication.Phoenix.SignInLive
Parameters: %{}
Session: %{"_csrf_token" => "j1SnM98R9ZqC-_04rBGvnAj-", "auth_routes_prefix" => "/auth", "context" => nil, "gettext_fn" => nil, "otp_app" => nil, "overrides" => [AshEventsTestWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default], "path" => "/sign-in", "register_path" => "/register", "reset_path" => "/reset", "resources" => nil, "tenant" => nil}
[debug] Replied in 134µs
[debug] HANDLE PARAMS in AshAuthentication.Phoenix.SignInLive
Parameters: %{}
[debug] Replied in 79µs
[debug] HANDLE EVENT "change" in AshAuthentication.Phoenix.SignInLive
Component: AshAuthentication.Phoenix.Components.Password.RegisterForm
Parameters: %{"_csrf_token" => "BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6", "_target" => ["user", "email"], "user" => %{"_unused_password" => "[FILTERED]", "_unused_password_confirmation" => "[FILTERED]", "email" => "asd@add.com", "password" => "[FILTERED]", "password_confirmation" => "[FILTERED]"}}
[debug] Replied in 2ms
[debug] HANDLE EVENT "change" in AshAuthentication.Phoenix.SignInLive
Component: AshAuthentication.Phoenix.Components.Password.RegisterForm
Parameters: %{"_csrf_token" => "BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6", "_target" => ["user", "password"], "user" => %{"_unused_password_confirmation" => "[FILTERED]", "email" => "asd@add.com", "password" => "[FILTERED]", "password_confirmation" => "[FILTERED]"}}
[debug] Replied in 10ms
[debug] HANDLE EVENT "change" in AshAuthentication.Phoenix.SignInLive
Component: AshAuthentication.Phoenix.Components.Password.RegisterForm
Parameters: %{"_csrf_token" => "BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6", "_target" => ["user", "password_confirmation"], "user" => %{"email" => "asd@add.com", "password" => "[FILTERED]", "password_confirmation" => "[FILTERED]"}}
[debug] Replied in 3ms
[debug] HANDLE EVENT "submit" in AshAuthentication.Phoenix.SignInLive
Component: AshAuthentication.Phoenix.Components.Password.RegisterForm
Parameters: %{"_csrf_token" => "BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6", "user" => %{"email" => "asd@add.com", "password" => "[FILTERED]", "password_confirmation" => "[FILTERED]"}}
[debug] QUERY OK db=2.8ms idle=1205.2ms
begin []
↳ anonymous fn/3 in Ash.Changeset.with_hooks/3, at: lib/ash/changeset/changeset.ex:3760
[debug] QUERY OK db=0.3ms
SELECT pg_advisory_xact_lock($1) [2147483647]
[debug] QUERY OK source="events" db=2.9ms
INSERT INTO "events" ("data","version","metadata","resource","action","action_type","occurred_at","record_id") VALUES ($1,$2,$3,$4,$5,$6,$7,$8) RETURNING "user_id","record_id","occurred_at","system_actor","action_type","action","resource","metadata","version","data","id" [%{password: "asdfasdf", email: #Ash.CiString<"asd@add.com">, password_confirmation: "asdfasdf"}, 1, %{}, AshEventsTest.Accounts.User, :register_with_password, :create, ~U[2025-05-26 02:59:04.248203Z], "4ace8cef-09da-4426-89fa-df4860dd9baa"]
↳ AshPostgres.DataLayer.bulk_create/3, at: lib/data_layer.ex:1979
[debug] QUERY OK source="users" db=9.1ms
INSERT INTO "users" ("id","email","hashed_password") VALUES ($1,$2,$3) RETURNING "confirmed_at","hashed_password","email","id" ["e6bd53a8-0c04-41ba-925e-7de629058595", #Ash.CiString<"asd@add.com">, "$2b$12$GTPDwCO7uACTsEheZink4OKXbC.jpPfRLNyjZdSTCGLXiiUHcvm1G"]
↳ AshPostgres.DataLayer.bulk_create/3, at: lib/data_layer.ex:1979
[debug] QUERY OK db=0.2ms
SELECT pg_advisory_xact_lock($1) [2147483647]
[debug] QUERY OK db=0.3ms
rollback []
↳ anonymous fn/3 in Ash.Changeset.with_hooks/3, at: lib/ash/changeset/changeset.ex:3760
[error] GenServer #PID<0.1657.0> terminating
** (Ash.Error.Invalid)
Bread Crumbs:
> Error returned from: AshEventsTest.Events.Event.create
> Exception raised in: AshEventsTest.Accounts.Token.store_token
> Exception raised in: AshEventsTest.Accounts.User.register_with_password_ash_events_orig_impl
> Exception raised in: AshEventsTest.Accounts.User.register_with_password
Invalid Error
* Invalid value provided for record_id: is invalid.
"311f8qllfk1mdspg8g000a21"
(ash 3.5.12) lib/ash/error/changes/invalid_attribute.ex:4: Ash.Error.Changes.InvalidAttribute.exception/1
(ash 3.5.12) lib/ash/changeset/changeset.ex:6403: anonymous fn/4 in Ash.Changeset.add_invalid_errors/5
(elixir 1.18.3) lib/enum.ex:2546: Enum."-reduce/3-lists^foldl/2-0-"/3
(ash 3.5.12) lib/ash/changeset/changeset.ex:5687: anonymous fn/5 in Ash.Changeset.do_change_attribute/4
(stdlib 6.2.2) maps.erl:860: :maps.fold_1/4
(ash 3.5.12) lib/ash/changeset/changeset.ex:2298: Ash.Changeset.handle_params/4
(ash 3.5.12) lib/ash/changeset/changeset.ex:2166: Ash.Changeset.do_for_action/4
(ash_events 0.2.0) lib/events/action_wrapper_helpers.ex:77: AshEvents.Events.ActionWrapperHelpers.create_event!/4
(ash_events 0.2.0) lib/events/create_action_wrapper.ex:16: AshEvents.CreateActionWrapper.create/3
(ash 3.5.12) lib/ash/actions/create/create.ex:309: anonymous fn/6 in Ash.Actions.Create.commit/3
(ash 3.5.12) lib/ash/changeset/changeset.ex:4226: Ash.Changeset.run_around_actions/2
(ash 3.5.12) lib/ash/changeset/changeset.ex:3762: anonymous fn/3 in Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/data_layer/data_layer.ex:419: Ash.DataLayer.transaction/4
(ash 3.5.12) lib/ash/changeset/changeset.ex:3760: anonymous fn/3 in Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/changeset/changeset.ex:3904: anonymous fn/2 in Ash.Changeset.transaction_hooks/2
(ash 3.5.12) lib/ash/changeset/changeset.ex:3747: Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/actions/create/create.ex:261: Ash.Actions.Create.commit/3
(ash 3.5.12) lib/ash/actions/create/create.ex:132: Ash.Actions.Create.do_run/4
(ash 3.5.12) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4
(ash 3.5.12) lib/ash/error/invalid.ex:3: Ash.Error.Invalid.exception/1
(ash 3.5.12) /Users/albin/projects/a/ash_events_test/deps/splode/lib/splode.ex:264: Ash.Error.to_class/2
(ash 3.5.12) lib/ash/error/error.ex:108: Ash.Error.to_error_class/2
(ash 3.5.12) lib/ash/actions/create/create.ex:155: Ash.Actions.Create.do_run/4
(ash 3.5.12) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4
(ash 3.5.12) lib/ash.ex:2272: Ash.create!/3
(ash_events 0.2.0) lib/events/create_action_wrapper.ex:16: AshEvents.CreateActionWrapper.create/3
(ash 3.5.12) lib/ash/actions/create/create.ex:309: anonymous fn/6 in Ash.Actions.Create.commit/3
(ash 3.5.12) lib/ash/changeset/changeset.ex:4226: Ash.Changeset.run_around_actions/2
(ash 3.5.12) lib/ash/changeset/changeset.ex:3762: anonymous fn/3 in Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/data_layer/data_layer.ex:419: Ash.DataLayer.transaction/4
(ash 3.5.12) lib/ash/changeset/changeset.ex:3760: anonymous fn/3 in Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/changeset/changeset.ex:3904: anonymous fn/2 in Ash.Changeset.transaction_hooks/2
(ash 3.5.12) lib/ash/changeset/changeset.ex:3747: Ash.Changeset.with_hooks/3
(ash 3.5.12) lib/ash/actions/create/create.ex:261: Ash.Actions.Create.commit/3
(ash 3.5.12) lib/ash/actions/create/create.ex:132: Ash.Actions.Create.do_run/4
(ash 3.5.12) lib/ash/actions/create/create.ex:50: Ash.Actions.Create.run/4
(ash_authentication 4.8.7) lib/ash_authentication/token_resource/actions.ex:306: AshAuthentication.TokenResource.Actions.store_token/3
(ash_authentication 4.8.7) lib/ash_authentication/jwt.ex:114: AshAuthentication.Jwt.token_for_user/4
Last message: %Phoenix.Socket.Message{topic: "lv:phx-GEL0ZtcqgwZByigh", event: "event", payload: %{"cid" => 7, "event" => "submit", "meta" => %{}, "type" => "form", "value" => "_csrf_token=BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6&user%5Bemail%5D=asd%40add.com&user%5Bpassword%5D=asdfasdf&user%5Bpassword_confirmation%5D=asdfasdf"}, ref: "15", join_ref: "4"}
State: %{socket: #Phoenix.LiveView.Socket<id: "phx-GEL0ZtcqgwZByigh", endpoint: AshEventsTestWeb.Endpoint, view: AshAuthentication.Phoenix.SignInLive, parent_pid: nil, root_pid: #PID<0.1657.0>, router: AshEventsTestWeb.Router, assigns: %{path: "/sign-in", context: %{}, resources: nil, overrides: [AshEventsTestWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default], otp_app: nil, __changed__: %{}, flash: %{}, current_user: nil, live_action: :register, reset_path: "/reset", register_path: "/register", current_tenant: nil, auth_routes_prefix: "/auth", gettext_fn: nil}, transport_pid: #PID<0.1649.0>, sticky?: false, ...>, components: {%{1 => {AshAuthentication.Phoenix.Components.SignIn, "sign-in", %{id: "sign-in", path: "/sign-in", context: %{}, resources: nil, overrides: [AshEventsTestWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default], otp_app: nil, __changed__: %{}, flash: %{}, live_action: :register, myself: %Phoenix.LiveComponent.CID{cid: 1}, reset_path: "/reset", register_path: "/register", current_tenant: nil, auth_routes_prefix: "/auth", gettext_fn: nil, strategies_by_resource: [%{link: [%AshAuthentication.Strategy.MagicLink{identity_field: :email, lookup_action_name: :get_by_email, name: :magic_link, prevent_hijacking?: true, registration_enabled?: true, request_action_name: :request_magic_link, require_interaction?: true, resource: AshEventsTest.Accounts.User, sender: {AshEventsTest.Accounts.User.Senders.SendMagicLinkEmail, []}, sign_in_action_name: :sign_in_with_magic_link, single_use_token?: true, token_lifetime: {10, :minutes}, token_param_name: :token}], form: [%AshAuthentication.Strategy.Password{require_confirmed_with: nil, confirmation_required?: true, hash_provider: AshAuthentication.BcryptProvider, hashed_password_field: :hashed_password, identity_field: :email, name: :password, password_confirmation_field: :password_confirmation, password_field: :password, provider: :password, register_action_accept: [], register_action_name: :register_with_password, registration_enabled?: true, resettable: %AshAuthentication.Strategy.Password.Resettable{token_lifetime: {3, :days}, request_password_reset_action_name: :request_password_reset_token, password_reset_action_name: :reset_password_with_token, sender: {AshEventsTest.Accounts.User.Senders.SendPasswordResetEmail, []}}, resource: AshEventsTest.Accounts.User, sign_in_action_name: :sign_in_with_password, sign_in_enabled?: true, sign_in_token_lifetime: {60, :seconds}, sign_in_tokens_enabled?: true, sign_in_with_token_action_name: :sign_in_with_token}]}]}, %{live_temp: %{}, lifecycle: %Phoenix.LiveView.Lifecycle{after_render: [], handle_async: [], handle_event: [], handle_info: [], handle_params: [], mount: []}, root_view: AshAuthentication.Phoenix.SignInLive, children_cids: [2, 4, 5, 3]}, {53235540489126668440535755947336435476, %{1 => {274984422862422153202768882637895786415, %{}}, 2 => 224601609182057262826203480175630377920}}}, 2 => {AshAuthentication.Phoenix.Components.Banner, "sign-in-banner", %{id: "sign-in-banner", overrides: [AshEventsTestWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default], __changed__: %{}, flash: %{}, myself: %Phoenix.LiveComponent.CID{cid: 2}, gettext_fn: nil}, %{live_temp: %{}, lifecycle: %Phoenix.LiveView.Lifecycle{after_render: [], handle_async: [], handle_event: [], handle_info: [], handle_params: [], mount: []}, root_view: AshAuthentication.Phoenix.SignInLive, children_cids: []}, {294032448310932641089610866171078170453, %{1 => {271353884051957093198285300347873910869, %{}}, 2 => {36157643456020396772491470016395703690, %{}}, 3 => {54829494123056995042665501654766121516, %{}}}}}, 3 => {AshAuthentication.Phoenix.Components.Password, "sign-in-user-with-password", %{id: "sign-in-user-with-password", path: "/sign-in", context: %{}, strategy: %AshAuthentic (truncated)
[debug] MOUNT AshAuthentication.Phoenix.SignInLive
Parameters: %{}
Session: %{"_csrf_token" => "j1SnM98R9ZqC-_04rBGvnAj-", "auth_routes_prefix" => "/auth", "context" => nil, "gettext_fn" => nil, "otp_app" => nil, "overrides" => [AshEventsTestWeb.AuthOverrides, AshAuthentication.Phoenix.Overrides.Default], "path" => "/sign-in", "register_path" => "/register", "reset_path" => "/reset", "resources" => nil, "tenant" => nil}
[debug] Replied in 576µs
[debug] HANDLE PARAMS in AshAuthentication.Phoenix.SignInLive
Parameters: %{}
[debug] Replied in 62µs
[debug] HANDLE EVENT "change" in AshAuthentication.Phoenix.SignInLive
Component: AshAuthentication.Phoenix.Components.Password.SignInForm
Parameters: %{"_csrf_token" => "BkF-Hi4BQGNQHx8VZAVpXAgaNwVcLiYblp-pc8x1iEnVIZYhzXps2oL6", "_target" => ["user", "email"], "user" => %{"_unused_email" => "", "_unused_password" => "[FILTERED]", "email" => "", "password" => "[FILTERED]"}}
[debug] Replied in 1ms