Repository navigation
fix: schedule audit retention cleanup - #51
Merged
OkiriGabriel merged 2 commits intoAug 31, 2026
Merged
OkiriGabriel merged 2 commits into
OkiriGabriel merged 2 commits into
Conversation
…-agent#8) Lifespan startup must run one retention pass over the de-duplicated union of ORG_ID and ORG_IDS; the spy-based test is RED until the scheduler exists. Also characterize apply_retention aged-key deletion. Co-Authored-By: Kimi K3 <[email protected]>
…ent#8) apply_retention() was implemented but never invoked. Run one retention pass at API startup, then every 24 hours, over the de-duplicated union of ORG_ID and ORG_IDS. One org's storage failure is logged and does not stop the remaining orgs; the task is cancelled and awaited at shutdown. Co-Authored-By: Kimi K3 <[email protected]>
Collaborator
|
Reviewed — CI is green across all checks. Audit retention cleanup scheduling looks good. Merging to |
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.
Description
Schedule the existing audit-retention helper from the API lifespan so cleanup runs once at startup and then every 24 hours for every configured organization. The task is cancelled and awaited during shutdown, and one organization's failure does not stop cleanup for the others.
Fixes #8
Type of Change
Platform/Component
Testing
Test Configuration
Checklist
Screenshots (if applicable)
Not applicable.
Breaking Changes
None.
Additional Notes
dabf8826292ca8c282df49f973adc90d9fac38e2passed all 10 fork-CI jobs on Python 3.10, 3.11, and 3.12, including lint, security, integration, collectors, tools, Docker, and documentation checks.AUDIT_RETENTION_DAYSis already documented; this change activates the existing setting.Reviewer Checklist
Generated by Kimi K3 (implementation, testing, verification), GPT-5.6 Sol (brief, review)