Kandev DB retention policy #76

Closed
opened 2026-10-11 21:02:45 +09:00 by dreampiler · 0 comments
Owner

Owner goal: Operations request relays the owner at 2026-10-11 20:4x KST: 「추천대로 진행해 줘. 특히 #3598 건은 제대로 정리하되 재발하지 않도록 처리해줘.」 The requested recommendation included clearing metadata of messages older than 14 days in finished or archived tasks and completed cleanup snapshots, followed by Operations-only VACUUM.
Observable result: Kandev periodically applies the approved completed/archived-message metadata and completed-cleanup-snapshot policy, and has a reviewed safe retention policy for session metadata, plan revisions, and repeated model-list copies. Required ongoing conversation, recovery, history, active tasks and current model selections remain usable. Logical cleanup versus file compaction is reported accurately.
This task owns general DB metadata/history retention. Delivery inbox/effects retention stays with existing task 1802f4a9; restart-midturn repair belongs to Operations fix/restart-resume-midturn-20261011; do not duplicate either.

Reported Operations facts, not independently measured by controller: 20:29 startup backup DB 10.66GB/data8.0GB; messages3.0GB with metadata2.6GB; session metadata0.73GB/~100KB per session; plan revisions0.53GB; model-list copies0.22GB. Pre-delivery growth0.4-0.75GB/day. Operations reports a stopped-window full backup, removal of eight unused durable tables on stable-pre-durable runtime f54871c390, approved metadata/snapshot clearing, VACUUM and restart. Do not rerun that operating cleanup. Available backup prefix D:/260720_Ai_Workspace_Tools/offload-c-20261011/kandev-db-before-prune-*.db is a discovery pointer, not permission to delete any file. If evidence is needed, choose an actual existing full backup path and use read-only summary queries without payload/identity/credential output.

First produce the repository-required design package before production or permanent-test edits: requirements, system design, implementation plan and atomic work orders. Canonical owner is selected from the durable DB/history contract using assigned-worktree docs/specs/README.md and relevant platform/task/session docs, not a new parallel policy owner. Read design-card invariants3-5 and design index at D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/ (card lines28-32); cite actual relevant source pointers. Read scoped AGENTS and existing retention, archive/history/continuation, DB migration and maintenance conventions. Choose the smallest safe reuse of existing scheduling and retention facilities.

Scope:

  1. Periodically clear metadata only for messages older than14days whose task is finished or archived; preserve messages and required live/recovery/continuation data. Define actual existing state/time fields, exclusions, a bounded batch, failure/cancellation semantics and restart behavior from current contracts.
  2. Apply the approved completed-cleanup-task snapshot cleanup; pin exact snapshot ownership and completion criteria, retaining snapshots still needed for recovery/history. Do not generalize to all task snapshots.
  3. Design explicit eligibility/age/count criteria for session metadata, plan revisions and repeated model-list copies, including current/latest/user-edited revision history and selected model/profile preservation. Do not invent a destructive threshold just to match byte-size targets. Distinguish established policy from reversible design defaults and actual user-only contract changes.
  4. Implementation after the explicit package checkpoint follows the normal implementation/review/merge workflow. Use narrow changed-logic source-adjacent tests and a finite isolated API/readback demonstration outside automatic collection. Show before/after counts/storage estimates and preserved required history using summary-only output. Existing sufficient checks are reused. This task does not add permanent integration/E2E/CI or a verification framework.
  5. Original operation means a periodic Kandev product cleanup feature, not a new permanent gate, fingerprint/hash/signature/audit/monitor/ledger. No full suite or automatic VACUUM competing with writes. Operations alone owns operating data/process changes and deployment.

Execution: standing parent8e3eb6b7-f0fb-4d79-a954-69aeab00993a; workspace94852851-6893-4289-908a-53022d15fd68; Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned worktree and record its path. No shared source writes, second worktree/session/native subagent/manual model, AIWS source/settings/credential changes, operating DB/process writes. Fork PRs name --repo dreampiler/kandev. Upstream writes belong solely W091 fixedOpus. Preserve profile order/session ceiling and existing behavior. Temporary confirmations stay in own untracked location outside collection; permitted queue/jobsheet route only. Never SELECT/output credential fields or raw metadata containing secrets; use counts/existence/summary only. Login/credential operations are out of scope and must not be done by this dynamic task. Engineering artifacts and public PR text are English and omit personal paths/internal operating data.
Report package paths/status, actual facts versus assumptions, validation commands/results, unresolved policy choices and completion readback. Stop at the completed design checkpoint with no generic new approval question or model switch; a later explicit package implementation instruction is required. Do not claim completion from artifact existence or merge alone.

Owner goal: Operations request relays the owner at 2026-10-11 20:4x KST: 「추천대로 진행해 줘. 특히 #3598 건은 제대로 정리하되 재발하지 않도록 처리해줘.」 The requested recommendation included clearing metadata of messages older than 14 days in finished or archived tasks and completed cleanup snapshots, followed by Operations-only VACUUM. Observable result: Kandev periodically applies the approved completed/archived-message metadata and completed-cleanup-snapshot policy, and has a reviewed safe retention policy for session metadata, plan revisions, and repeated model-list copies. Required ongoing conversation, recovery, history, active tasks and current model selections remain usable. Logical cleanup versus file compaction is reported accurately. This task owns general DB metadata/history retention. Delivery inbox/effects retention stays with existing task 1802f4a9; restart-midturn repair belongs to Operations fix/restart-resume-midturn-20261011; do not duplicate either. Reported Operations facts, not independently measured by controller: 20:29 startup backup DB 10.66GB/data8.0GB; messages3.0GB with metadata2.6GB; session metadata0.73GB/~100KB per session; plan revisions0.53GB; model-list copies0.22GB. Pre-delivery growth0.4-0.75GB/day. Operations reports a stopped-window full backup, removal of eight unused durable tables on stable-pre-durable runtime f54871c390, approved metadata/snapshot clearing, VACUUM and restart. Do not rerun that operating cleanup. Available backup prefix D:/260720_Ai_Workspace_Tools/offload-c-20261011/kandev-db-before-prune-*.db is a discovery pointer, not permission to delete any file. If evidence is needed, choose an actual existing full backup path and use read-only summary queries without payload/identity/credential output. First produce the repository-required design package before production or permanent-test edits: requirements, system design, implementation plan and atomic work orders. Canonical owner is selected from the durable DB/history contract using assigned-worktree docs/specs/README.md and relevant platform/task/session docs, not a new parallel policy owner. Read design-card invariants3-5 and design index at D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/ (card lines28-32); cite actual relevant source pointers. Read scoped AGENTS and existing retention, archive/history/continuation, DB migration and maintenance conventions. Choose the smallest safe reuse of existing scheduling and retention facilities. Scope: 1. Periodically clear metadata only for messages older than14days whose task is finished or archived; preserve messages and required live/recovery/continuation data. Define actual existing state/time fields, exclusions, a bounded batch, failure/cancellation semantics and restart behavior from current contracts. 2. Apply the approved completed-cleanup-task snapshot cleanup; pin exact snapshot ownership and completion criteria, retaining snapshots still needed for recovery/history. Do not generalize to all task snapshots. 3. Design explicit eligibility/age/count criteria for session metadata, plan revisions and repeated model-list copies, including current/latest/user-edited revision history and selected model/profile preservation. Do not invent a destructive threshold just to match byte-size targets. Distinguish established policy from reversible design defaults and actual user-only contract changes. 4. Implementation after the explicit package checkpoint follows the normal implementation/review/merge workflow. Use narrow changed-logic source-adjacent tests and a finite isolated API/readback demonstration outside automatic collection. Show before/after counts/storage estimates and preserved required history using summary-only output. Existing sufficient checks are reused. This task does not add permanent integration/E2E/CI or a verification framework. 5. Original operation means a periodic Kandev product cleanup feature, not a new permanent gate, fingerprint/hash/signature/audit/monitor/ledger. No full suite or automatic VACUUM competing with writes. Operations alone owns operating data/process changes and deployment. Execution: standing parent8e3eb6b7-f0fb-4d79-a954-69aeab00993a; workspace94852851-6893-4289-908a-53022d15fd68; Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned worktree and record its path. No shared source writes, second worktree/session/native subagent/manual model, AIWS source/settings/credential changes, operating DB/process writes. Fork PRs name --repo dreampiler/kandev. Upstream writes belong solely W091 fixedOpus. Preserve profile order/session ceiling and existing behavior. Temporary confirmations stay in own untracked location outside collection; permitted queue/jobsheet route only. Never SELECT/output credential fields or raw metadata containing secrets; use counts/existence/summary only. Login/credential operations are out of scope and must not be done by this dynamic task. Engineering artifacts and public PR text are English and omit personal paths/internal operating data. Report package paths/status, actual facts versus assumptions, validation commands/results, unresolved policy choices and completion readback. Stop at the completed design checkpoint with no generic new approval question or model switch; a later explicit package implementation instruction is required. Do not claim completion from artifact existence or merge alone.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dreampiler/kandev#76