feat(links): unlink every Steam id before an account is deleted (MODULE_API 1.20.0) #70

Merged
whitlocktech merged 1 commits from feature/account-deletion-hook into edge 2026-10-29 23:48:57 -05:00
Member

Step 3 of docs/website/ACCOUNT_DELETION.md §6, the Rust half of §4.4. Core side: website#232 (merged, 7bd93b8).

What it does

Core calls api.onUserDeleting({ userId, deletedBy }) before the users row goes (AD10). This module registers links.unlinkForDeletion, which:

  • runs the player's own unlinkOwned(steamId, userId) for every Steam link the account holds. That keeps what a cascade would skip: the prompt Teams re-sync, and a rust.account.unlink activity entry per link, with detail: { steamId, reason: 'account deleted', deletedBy }.
  • then marks every server's permission sync dirty. The desired set reaches a user's grants through rust_account_links, so once the links are gone the grants have already left it. The next tick pushes the withdrawal instead of waiting for the digest check.

It never waits on a game. The link is the site's own record and the plugin keeps none, so there is never pending work; anything the hook doesn't finish, the cascade does.

Also

  • coreApi is ^1.20.0. A 1.19.0 core has no api.onUserDeleting, and register() would throw.
  • ci/core-ref.json is pinned to website main at 7bd93b8, the sha #232 merged as.
  • engagement-triggers.json is regenerated; only its embedded coreApi changed.
  • demo.test.js asserted coreApi was exactly ^1.19.0. It now asserts a floor of 1.19.0, which is what it was protecting.

Checked

  • Server: npm test 734/734. check:imports, check:bundle, check:swagger and check:engagement all pass.
  • Client: npm run build, and npm test 101/101.
  • The frozen-manifest job, reproduced locally against core 7bd93b8:
    • core alone: route manifest up to date (282 routes)
    • with this module installed: routes.manifest.json is current — 89 routes, all documented
    • core's loader accepted the onUserDeleting registration.
  • New tests:
    • a deletion unlinks every link through unlinkOwned, logs each, re-syncs Teams, and marks the whole fleet dirty
    • an account with no links touches nothing
    • the hook is registered

Not walked yet: a real deletion against a rig is ACCOUNT_DELETION §6 step 6.

  • AI-assisted (Claude Code)

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

Step 3 of `docs/website/ACCOUNT_DELETION.md` §6, the Rust half of §4.4. Core side: website#232 (merged, `7bd93b8`). ## What it does Core calls `api.onUserDeleting({ userId, deletedBy })` before the users row goes (AD10). This module registers `links.unlinkForDeletion`, which: - runs the player's own `unlinkOwned(steamId, userId)` for every Steam link the account holds. That keeps what a cascade would skip: the prompt Teams re-sync, and a `rust.account.unlink` activity entry per link, with `detail: { steamId, reason: 'account deleted', deletedBy }`. - then marks **every** server's permission sync dirty. The desired set reaches a user's grants through `rust_account_links`, so once the links are gone the grants have already left it. The next tick pushes the withdrawal instead of waiting for the digest check. It never waits on a game. The link is the site's own record and the plugin keeps none, so there is never pending work; anything the hook doesn't finish, the cascade does. ## Also - `coreApi` is `^1.20.0`. A 1.19.0 core has no `api.onUserDeleting`, and `register()` would throw. - `ci/core-ref.json` is pinned to website `main` at `7bd93b8`, the sha #232 merged as. - `engagement-triggers.json` is regenerated; only its embedded `coreApi` changed. - `demo.test.js` asserted `coreApi` was exactly `^1.19.0`. It now asserts a floor of 1.19.0, which is what it was protecting. ## Checked - Server: `npm test` 734/734. `check:imports`, `check:bundle`, `check:swagger` and `check:engagement` all pass. - Client: `npm run build`, and `npm test` 101/101. - **The frozen-manifest job, reproduced locally** against core `7bd93b8`: - core alone: `route manifest up to date (282 routes)` - with this module installed: `routes.manifest.json is current — 89 routes, all documented` - core's loader accepted the `onUserDeleting` registration. - New tests: - a deletion unlinks every link through `unlinkOwned`, logs each, re-syncs Teams, and marks the whole fleet dirty - an account with no links touches nothing - the hook is registered **Not walked yet:** a real deletion against a rig is ACCOUNT_DELETION §6 step 6. - [x] AI-assisted (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-29 22:57:10 -05:00
feat(links): unlink every Steam id before an account is deleted (MODULE_API 1.20.0)
All checks were successful
PR Checks / server-tests (pull_request) Successful in 1m1s
PR Checks / frozen-manifest (pull_request) Successful in 1m28s
PR Checks / client-build (pull_request) Successful in 43s
b5573d9ae3
ACCOUNT_DELETION.md §4.4 (AD10). api.onUserDeleting calls links.unlinkForDeletion,
which runs the player's own unlinkOwned per link, logs rust.account.unlink with
reason 'account deleted', and marks every server's permission sync dirty so the
withdrawn grants reach the game on the next tick. coreApi ^1.20.0; core-ref pinned
to website#232's merge (7bd93b8); engagement manifest regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit e30c7d591d into edge 2026-10-29 23:48:57 -05:00
whitlocktech deleted branch feature/account-deletion-hook 2026-10-29 23:48:58 -05:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: RunicGateway/Module-Rust#70
No description provided.