[긴급] Durable delivery inbox 보존·정리 #72
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Owner goal: Operations message ee9eb1b3 at2026-10-11T07:53:17Z relays owner「여전히 뭐가 제대로 안돌아가고 있는 것 같은데? 원인이 뭔지 확인 안해?」「원인 찾아서 해결 안 할거야?」.
Observable result: projected delivery rows are safely bounded without losing recovery/continuity, with actual retention before/after row-count and DB-size evidence plus merged isolated >=15min samePID/health200/panic0. This task owns backend delivery inbox retention and the bounded growth-cause diagnosis, separate from W092 permission waits and W095 starting settlement.
Reported observations (not independently verified by parent): inbox about1.23million rows; Oct10 112114 / Oct11 1120332 new rows; average1.38KB, only1unprojected; DB11GB/WAL64MB; read pool12/12 and13k waits, clarification8.8s/health503 at16:37KST; process resident4.27GB versus restart heap40MB. High sessions1ebd0552/e47d3c27/3d6c3168/de0b18ba/0e63842f. Timing16:36:55 W092 list_task_sessions, shared-tags22s DeadlineExceeded,16:37 send-buffer-full41. Correlation is not established cause.
Read current upstream feature/plan-backend-retenti-icy and backend-agent-delivery-retention.md requirement/design pair; verify real refs/files/status, do not assume222files all belong this fix. Define minimum safe eligibility/retention for projected rows while preserving active submissions, generation/projection cursors/replay/recovery. Prefer directly reusable upstream implementation over broad branch import. Trace actual event_type distribution and delta storage/reconstruction #4403 to explain growth; don't conflate expected streaming volume with duplicates. Read operating DB only mode=ro if necessary; no writes/VACUUM/migrate, don't repeat saturation queries. Minimal own isolated seeded data can prove cleanup and continuity.
Delivery includes narrow source-adjacent tests, fork review/merge, finalmainSHA and isolated merged >=15min with row-count/DB-size before/after; distinguish deletion from file compaction. Initial real operating cleanup is Operations-owned: stopped replacement window or safe small batches, never competing writes. Do not delete all projected rows by assumption. Backend dumps supplied by Ops: baseline backend-goroutines-20261011T0749*Z.txt; future STALL dumps are existing Ops/AIWS collector output, not new collector scope. Parent fresh runtime08:49Z is oldc8bcf5e293/start08:18:41Z despite prior6a6d install report: do not treat current deployment as proved.
Execution contract: standing parent8e3eb6b7; Worktree executor08eb0bba-37dc-459c-b34c-14322417bde7/new_workspace/repository068d4436-d120-42af-b178-8e1a45eb2279/forkmain. Use only the platform-assigned worktree; record its path. No shared checkout writes, second worktree, native subagents/manual models, credential/settings change, operating DB/process mutation or AIWS source work. Fork PRs name --repo dreampiler/kandev. Upstream GitHub writes belong solely W091 fixedOpus, not this task. Preserve profile order, session ceiling, existing working behavior. Design basis: design-card invariants3/4/5 (lines28-32) and design index at D:/260720_Ai_Workspace/projects/260926_Kandev/repo/_Prj_Knowledge/p200_index/. Read only relevant canonical sections in assigned worktree (scoped AGENTS, docs/specs/README.md, architecture Orchestrator/Agent Manager). First return the repository-required requirements/system-design/plan/work-order package for this request and report the checkpoint before production/permanent-test edits; do not invent another approval question or substitute a generic implementation prompt for that checkpoint. Existing normal later implementation/review/merge workflow applies after explicit package implementation instruction. Changed-logic source-adjacent unit tests are the Kandev exception; temporary reproductions stay in own untracked location outside automatic collection. No full suite, new permanent integration/e2e/CI, monitor/heartbeat/framework/ledger/hash/audit. Report facts vs hypotheses, exact source/head/validation/remaining inputs. Prior completed evidence is reused when relevant inputs match. Operations alone installs/restarts/cleans operating data under its existing approval. Queue/jobsheet route is the existing permitted gate exception.
(see file)
[retention] merged #226 (squash 53d8a508959c, reviewed head 3f6e4552ab) preserved; no replay. Upstream #4407 (e6692746b0, 236 files) is canonical full retention; read-only comparison vs merged #226 (10 files) recorded in task Plan f7edef2a. KEEP for Daily sync: idx_agent_delivery_effects_pending (fork-only, effect_type SEARCH evidence) + open recovery-block / submission-less-terminal guard concept (upstream equivalence UNVERIFIED, porter must verify/carry). REMOVE: fork direct-delete prefix model, reconciliation sweep wiring + Budget/Result models, silent expired handling, duplicate retired_sequence migration + terminal-lookup index, fork retention test (superseded). Source condition (1) covered by #4407 + 2 keeps at source level, NOT merged-runtime proof. One-hour merged mock measurement still UNMEASURED; Daily 15-min does not replace it. Per latest Ops: one-hour belongs ONLY to Ops existing A-E child after #4407 sync and #229 recheck; no runtime launched here. No close-item.