[codex] Harden workspace onboarding withdrawal recovery - #11
Draft
SadPossum wants to merge 4 commits into
Draft
Conversation
SadPossum
force-pushed
the
codex/gma-train-withdrawal-hardening
branch
from
August 11, 2026 10:50
4b4a116 to
11041d4
Compare
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.
What changed
Why
Organizations withdrawal and request events use independent durable subscriptions. A withdrawal delivered first could exhaust broker retries before Workspaces learned the claim id, leaving a pending onboarding record and staged applicant data. Existing terminalization also had source-finalization races, and the fixed-global Admin authentication profile could not administer a non-default tenant under ActiveSession.
The implementation keeps product state in Workspaces, generic lifecycle authority in Organizations, identity state in Staff/Auth, and reuses the existing source coordinator instead of creating cross-module internals.
User and operator impact
A withdrawn applicant converges to a terminal redacted Workspaces state even with out-of-order or overlapping delivery. Recovery and retention can repair bound pending claims, tenant export/destruction includes the deferred fact, and malformed or contradictory authority fails closed. Admin authentication remains global while tenant RBAC remains the authorization authority.
This branch does not add a deployment, enable production withdrawal by itself, or claim end-to-end rollout completion.
Verification
Exact head
11041d4don baseb684edf4:dotnet format style --verify-no-changes, release, security, source-package, solution, submodule, diff, and clean-status checks passedStaff v19 immutable evidence:
2ea2548e0142b9b9dcb36fdbab663337f511dd57d49f7d86d4ce098fa400b325046696ce337d86aebdf4a6b2d2ab2158333559c9138a3227e700cf3ad7da549b30e3e20610d9cdc7bca48c30d2c9c38eeede0511986e88a7fae43fa16cedf95cThe default whitespace formatter still reports the repository's existing configuration contradiction:
.gitattributesforces LF while the C#.editorconfigsection requests CRLF. Verify mode made no edits; the scoped style verifier above is green. Hosted Ubuntu and Windows validation, Security Baseline, and Trivy checks passed on this exact pushed head.Release blockers and rollout gates
This draft is not release-ready until all of the following are resolved and evidenced:
Prefer forward repair; downgrade must stop v12 writers first and the migration refuses destructive rollback while withdrawal state exists.