Repository navigation
feat: erasure guardrails, OpenAPI drift check, migration failure-mode docs - #626
Merged
robertocarlous merged 1 commit intoOct 19, 2026
Conversation
… docs - Neurowealth#600: require distinct requester/approver/executor, typed DELETE confirmation, default dry-run on execute, revoke all user sessions before deletion, dedicated erasure rate limiter; lifecycle tests - Neurowealth#601: add scripts/check-openapi-drift.js with baseline, run in API contract CI, drift report, backfill erasure routes in openapi.yaml - Neurowealth#602: add Common failure modes appendix to docs/MIGRATIONS.md and link from the runbook
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.
Closes #600
Closes #601
Closes #602
#600 Privacy erasure guardrails
DELETE <userId>(422 otherwise)POST /erasure/requests/:id/executewithoutconfirmis a dry run: returns preview and required phrase, changes nothingrevokeAllUserSessions) before the delete transactionerasureRateLimiter(5 req / 15 min) on all erasure routesKnown gap: no executing status, so a small race remains between session revocation and the deletion transaction; closing it needs a schema migration.
#601 OpenAPI drift check
scripts/check-openapi-drift.js(npm run check:openapi-drift) diffs routes mounted under/api/v1againstdocs/openapi.yaml, wired into the API contract CI jobdocs/openapi-drift-baseline.json; CI fails on new drift and on baseline entries that were fixeddocs/OPENAPI_DRIFT_REPORT.md(156 routes without spec entry, 17 spec entries without route)#602 Migration lessons
docs/MIGRATIONS.mdAppendix A covers the webhook index CONCURRENTLY recipe, the referral duplicate-column recipe, and failed-rehearsal recoverydocs/RUNBOOK.mdand MIGRATIONS.mdVerification
eslint clean, tsc clean, 7 affected suites pass (111 tests), Redocly lint passes.