Skip to content

Mission Control: scheduled artifact retention + auditable deletion logs#160

Closed
krusty-agent wants to merge 1 commit intomainfrom
feat/artifact-retention-audit-logs
Closed

Mission Control: scheduled artifact retention + auditable deletion logs#160
krusty-agent wants to merge 1 commit intomainfrom
feat/artifact-retention-audit-logs

Conversation

@krusty-agent
Copy link
Collaborator

@krusty-agent krusty-agent commented Mar 3, 2026

Summary

Implements Mission Control launch-gate item for artifact retention with 30-day default and auditable deletion logs, including scheduler wiring.

What shipped

  • Added Convex cron scheduler (convex/crons.ts) to run daily retention sweep:
    • job id: mission-control-artifact-retention
    • schedule: 17 3 * * * (UTC)
  • Added internal retention sweep mutation in convex/missionControlCore.ts:
    • runArtifactRetentionSweep
    • sweeps owners (or single owner), enforces retention, deletes stale artifact refs
    • writes audit logs with trigger: "system", actor DID, cutoff, deleted artifacts
  • Extended audit schema in convex/schema.ts:
    • missionArtifactDeletionLogs.schedulerJobId
    • by_run_created index for run-level auditability
  • Updated retention docs in docs/mission-control/mission-runs-api.md
  • Added validation test script:
    • scripts/validate-mission-control-retention.mjs
    • npm script: mission-control:validate-retention

Evidence

Ran:

npm run mission-control:validate-retention

Output:

[retention-validate] OK

Notes

  • Existing operator-triggered retention API path remains intact (applyArtifactRetention dry-run/live).
  • Could not run npx convex codegen in this environment due missing CONVEX_DEPLOYMENT; runtime deploy/codegen should be done in configured environment.

@krusty-agent
Copy link
Collaborator Author

Superseded by consolidated integration PR #161: #161

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.

1 participant