test: cover deposit PI races, Identity fail-close, offboarding - #52
Draft
cursor[bot] wants to merge 5 commits into
Draft
test: cover deposit PI races, Identity fail-close, offboarding#52cursor[bot] wants to merge 5 commits into
cursor[bot] wants to merge 5 commits into
Conversation
Assert in-flight processing blocks and cancel-vs-succeeded races so deposit retries cannot double-charge or leave stuck in-progress rows. Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
Export verified_outputs parsers and assert missing name / redacted SSN cannot pass collections profile checks after Identity verification. Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
Lock active detection, completed counts, tenant vs staff step views, and resolveStepMeta so move-out checklist regressions surface early. Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
Export sanitizeBody and assert passwords/tokens nest-redact so secrets cannot leak into the owner activity log. Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
Export stripeKeyMode and assert live/test detection plus www/bare webhook URL derivation from CLIENT_ORIGIN. Co-authored-by: Jose I. Montero <2eezy77@users.noreply.github.com>
This was referenced Aug 18, 2026
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.
Risky behavior now covered
Unique vs open consolidators #49/#50 (does not re-add their suites):
processingrows block retries (DUPLICATE_PAYMENT); cancel-vs-succeeded / cancel-vs-processing / already-canceled paths for abandoned deposit PIsid_number) must not pass profile checksresolveStepMeta[redacted]sk_live/sk_testmode detection; www/bare webhook hosts fromCLIENT_ORIGIN; localhost/malformed origin handlingTiny testability exports only (no intentional behavior change): Identity output parsers +
isWithinGrace/isAlertStatus;sanitizeBody;stripeKeyMode.Test files added/updated
scripts/test-deposit-pi-race.js,scripts/test-identity-outputs.js,scripts/test-offboarding-status.js,scripts/test-activity-sanitize-body.js,scripts/test-payments-health-policy.jspackage.jsonscripts; exports intenant-identity.service.js,activity-audit.service.js,payments-health.service.jsWhy these tests materially reduce regression risk
These paths can double-charge deposits, activate leases without collections PII, mis-state move-out progress, leak secrets into the activity log, or silently miss live Stripe webhooks. Deterministic unit tests catch them without DB/Stripe.
Validation
Passed locally (no live DB/Stripe):
npm run test:deposit-pi-race,test:identity-outputs,test:offboarding-status,test:activity-sanitize-body,test:payments-health-policy, plustest:activity-auditandtest:identity-crypto.Note
Please prefer this PR for the gaps above; keep consolidators #49/#50 for their larger suites. Close/supersede overlapping draft coverage PRs once a consolidator merges.