Skip to content

Add organization-level retention enforcement#209

Open
quickweb-stack wants to merge 2 commits intoCredenceOrg:mainfrom
quickweb-stack:add-organization-data
Open

Add organization-level retention enforcement#209
quickweb-stack wants to merge 2 commits intoCredenceOrg:mainfrom
quickweb-stack:add-organization-data

Conversation

@quickweb-stack
Copy link
Copy Markdown

Close: #136

Implemented organization-level retention enforcement and committed it as 1399498 (Add organization-level retention enforcement).

The change adds a durable org-scoped retention model and audit trail in [004_add_organization_retention.ts], plus repositories for organizations, policy resolution, and batched cleanup in [organizationRepository.ts], [retentionPolicyRepository.ts], and [retentionRecordRepository.ts]. Cleanup runs through the new worker in [retentionCleanupWorker.ts], using bounded batches and global-policy fallback with org overrides; it’s wired into startup in [index.ts].

Focused tests passed:
npm test -- retentionPolicyRepository retentionCleanupWorker

I also verified the requested policy-resolution order and cleanup eligibility with new tests in [retentionPolicyRepository.test.ts] and [retentionCleanupWorker.test.ts].

The full npm run build still fails in this repo for pre-existing unrelated TypeScript issues outside this feature area, so I did not treat that as a blocker for this retention change.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 26, 2026

@quickweb-stack Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@quickweb-stack
Copy link
Copy Markdown
Author

Done, Close: #209

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add organization-level data retention policy enforcement

2 participants