You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9bb42bb
Browse filesBrowse the repository at this point in the historyBrowse files
fix(plugin-auth): hold the environment-user outbox to the invitation rules
No invitation is sent to a deactivated person; a removal holds to pending
people at the write; calls are recorded only on a cloud-managed kernel,
where the worker drains them. Prose says which calls are recorded.
Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L9qibx2sFAzcNAfxCPdUtF
Copy file name to clipboardExpand all lines: .changeset/33228-remove-pending-outbox.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@
5
5
'@objectstack/cli': patch
6
6
---
7
7
8
-
feat(auth): a cloud-managed environment can remove a pending person, cancelling their invitation, and every call to the environment-user host is retried from a durable outbox
8
+
feat(auth): a cloud-managed environment can remove a pending person, cancelling their invitation, and every invitation call to the environment-user host is retried from a durable outbox
9
9
10
-
Clause-②: yes (widening) — added: `POST /api/v1/auth/admin/remove-sso-user` (platform administrators, cloud-managed environments only) removes a person who is still pending (`sys_user.source = 'idp_pending'`) and cancels their invitation at the host; the environment-user host contract gains an optional `userRemoved` member and an optional `deliveryId` on every event; the add, import, ban and unban answers gain an optional `invitation: { id, status }`; a new read-only system object `sys_environment_user_outbox` records each call. Nothing that was accepted is refused, and no existing answer field changes.
10
+
Clause-②: yes (widening) — added: `POST /api/v1/auth/admin/remove-sso-user` (platform administrators, cloud-managed environments only) removes a person who is still pending (`sys_user.source = 'idp_pending'`) and cancels their invitation at the host; the environment-user host contract gains an optional `userRemoved` member and an optional `deliveryId` on every event; the add, import, ban and unban answers gain an optional `invitation: { id, status }`; a new read-only system object `sys_environment_user_outbox` records each invitation call on a cloud-managed environment. Nothing that was accepted is refused, and no existing answer field changes.
11
11
Metadata-protocol: none
12
12
13
13
On a cloud-managed environment, a person added to sign in through the hosting organisation's identity provider stays pending until their first sign-in. Before this change a pending person with a typo in their email could only be deactivated, and a host call that failed (a network error, a host outage) was logged and lost.
@@ -18,9 +18,9 @@ On a cloud-managed environment, a person added to sign in through the hosting or
18
18
- A host refusal (403/409) answers with the host's sentence, and no one is removed.
19
19
- A host that cannot be reached does not block the removal. The cancellation is queued and retried.
20
20
- With no host wired, the person is removed and the answer says `host: { notified: false, reason: 'no_host' }`.
21
-
- A person who is not pending answers `409`: deactivate them instead. A person that other records still point at (`deleteBehavior: 'restrict'`) answers the engine's refusal, and nothing is removed. If the host had already cancelled the invitation, a re-send is queued so they stay pending as before.
21
+
- A person who is not pending answers `409`: deactivate them instead. This holds at the removal itself, so a person who signs in while the host is asked is not removed. A person that other records still point at (`deleteBehavior: 'restrict'`) answers the engine's refusal, and nothing is removed. The answer says what the host was told. If the host had already taken the cancellation, a re-send is queued for a person who is still pending and not deactivated. A deactivated person is never sent an invitation.
22
22
- On an environment that is not cloud-managed the door answers `409` and removes no one.
23
23
24
-
**Outbox.** Every call to the host about a person (invited, deactivated while pending, re-sent on reactivation, removed) writes a row to `sys_environment_user_outbox`. The door that acts still makes the first call itself, outside any database transaction, so a typed refusal (such as the developer member cap) still reaches the administrator on that request. A call the host did not take stays `pending` and a worker retries it, backing off from one minute to twelve hours, until the host takes it or twelve attempts fail (`failed`, logged as an error). A typed refusal on a retry ends the row as `failed` with the host's code and sentence, and the person stays pending. The worker starts only on a cloud-managed environment with a host wired. Each call carries the row id as `deliveryId`, so a host can drop a repeat. The newest row of a person is their invitation status, which Setup → Users reads through the data API (`get` / `list`, platform administrators only). An `added` row becomes `accepted` when the person first signs in.
24
+
**Outbox.** On a cloud-managed environment, every invitation call to the host about a person (invited, deactivated while pending, re-sent on reactivation, removed) writes a row to `sys_environment_user_outbox`; the deactivation of a person who has signed in is asked of the host but not recorded, and off a cloud-managed environment nothing is recorded. The door that acts still makes the first call itself, outside any database transaction, so a typed refusal (such as the developer member cap) still reaches the administrator on that request. A call the host did not take stays `pending` and a worker retries it, backing off from one minute to twelve hours, until the host takes it or twelve attempts fail (`failed`, logged as an error). A typed refusal on a retry ends the row as `failed` with the host's code and sentence, and the person stays pending. The worker starts only on a cloud-managed environment with a host wired. Each call carries the row id as `deliveryId`, so a host can drop a repeat; a host cancels by `userId` or `deliveryId`, never by email address. The newest row of a person is their invitation status, which Setup → Users reads through the data API (`get` / `list`, platform administrators only). An `added` row becomes `accepted` when the person first signs in.
25
25
26
26
Nothing to migrate. A host that ignores `deliveryId` keeps working: repeats of the same call already happen today when a person is re-added.
0 commit comments