Repository navigation
Archive shared teams with billing shutdown and held deletion - #142
Merged
Merged
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2975348015
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary Archive a shared UOA team across connected products without erasing it. Organisation owners and administrators confirm the selected team through a fresh exact-team human assertion. The team leaves active directories, its sessions and assurances are revoked across consuming products, and an immutable operation holds permanent deletion. - Stop exact-team billing with durable reconciliation: cancel subscriptions immediately without proration or a final invoice, expire checkouts, pause automatic invoice collection and cancel unsettled payment intents. Receipt reads can advance pending work after the human session ends. - Fence provider creates, usage meter dispatch and cancellation-recovery collection against the archive. Ordinary disabled teams remain eligible to settle earned usage. Disable automatic reload through its consent-generation rules, end seat evidence through canonical roster triggers, and preserve financial history, sibling teams and shared organisation billing. - Refuse reactivation and permanent erasure while held. Add the terminal archive state to the existing administration panel. No erasure job or purge timer is created. Nessie's Advanced → Danger flow consumes this contract. This API must be deployed before that doorway is merged. ## Testing On Maxis, with isolated PostgreSQL on 127.0.0.1:6313: - 113 focused API unit and PostgreSQL cases passed: shared archive/RLS/role refusal, cross-product revocation, lifecycle regressions, provider cancellation and recovery, consent disable, seat evidence, correction collection fencing, organisation responsibility, funding/region pricing and active/disabled/archived usage export. The archive, seat and split usage suites passed their final focused reruns. - API and Admin typechecks; focused ESLint; OpenAPI lint (valid, 43 existing warnings). - Headless Chromium at 1280 and 390 px: rendered the real archived administration panel with fixture state; confirmed that reactivation and erasure actions are absent. - Nessie's consuming headless journey covers the two confirmations and signed-out receipt recovery in all seven locales. Provider effects there are fixtures. The wider local database-free run had 2,772 passes and six failures caused by the missing local Auth/dist/index.html. That unchanged Auth bundle was not built locally; CI builds it before these entrypoint tests.
No real team was archived. Live Stripe effects and logout in a second production product were not exercised. Cross-product consumers retain their existing live-admission and revocation contracts; offline JWT acceptance requires introspection/revocation or bounded expiry. ## Screenshots Only the new Archived state visibly changes in the administration panel. Screenshots use fixture state, the same light theme, and 900 px height. | Before | After | | --- | --- | | Archived team · desktop, 1280 px
| | Archived team · phone, 390 px
|
New held-archive state; no prior equivalent. | Archived team · desktop, 1280 px
New held-archive state; no prior equivalent. | Archived team · phone, 390 px