chore(fix-sentry): add skip-list for cross-session dedup and refine triage rules#1785
chore(fix-sentry): add skip-list for cross-session dedup and refine triage rules#1785
Conversation
…riage rules - Add Step 1.1b (Load Skip List): daemon mode reads ~/.aionui-fix-sentry/skip-list.json to skip previously triaged issues, with TTL-based expiration per classification - Add Step 3.1 (Update Skip List): writes skipped issues back with appropriate TTLs (system_level: 7d, already_fixed: 48h, unfixable: 24h, fix_pending_merge: 12h) - Refine SingletonCookie/SingletonLock triage: reclassify as defensive fix when Seer actionability >= medium and root cause is missing userData directory
- Clean up orphan worktrees on daemon startup (loop + prune) - Replace `kill 0` trap with dedicated cleanup function that: - Removes current worktree (with rm -rf fallback) - Runs git worktree prune - Kills only child jobs (not entire process group) - Outputs a single "Daemon stopped" line (not dozens) - Track CURRENT_WORKTREE variable to ensure cleanup on signal - Add rm -rf fallback when git worktree remove --force fails
Code Review:chore(fix-sentry): add skip-list for cross-session dedup and refine triage rules (#1785)变更概述本 PR 为 fix-sentry daemon 新增了两项改进:(1)跨 session 的 skip-list 机制,避免重复分析已处理过的 Sentry issue;(2)对 SingletonCookie/SingletonLock 错误增加例外规则,允许在根因为缺少目录时作为 Defensive fix 处理。同时修复了 daemon 脚本中 worktree 泄漏的问题。 方案评估结论:✅ 方案合理 Skip-list 机制通过 TTL-based JSON 文件解决了 daemon 日志中每 session 重复分析约 15 个 issue(7 sessions × 15 issues ≈ 100 次冗余 API 调用)的实际问题,设计简单有效。TTL 按分类分级(system_level 7d、already_fixed 48h、unfixable 24h、fix_pending_merge 12h)的设计合理,平衡了缓存效果与新鲜度。daemon 脚本的 问题清单🔵 LOW — Step 1.1b 未说明目录不存在时的创建行为文件: 问题说明:仅说明文件不存在时从空列表开始,但未说明应先 修复建议:在 On load 第 1 条补充: 1. Ensure `~/.aionui-fix-sentry/` directory exists (`mkdir -p`)
2. Read the file (if it doesn't exist, start with an empty skip list)汇总
结论✅ 批准合并 — 无阻塞性问题,代码质量良好。skip-list 机制设计清晰,daemon 脚本的 worktree 泄漏修复正确,唯一问题为文档中的 LOW 级遗漏,不影响功能。 本报告由本地 |
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
Summary
~/.aionui-fix-sentry/skip-list.jsonwith TTL-based expiration, so subsequent sessions skip previously analyzed issues instead of re-triaging them every cycleSingletonCookie/SingletonLockerrors are no longer unconditionally skipped — when Seer actionability ≥ medium and root cause is a missinguserDatadirectory, they're reclassified as defensive fixesMotivation
Daemon log analysis showed each session re-analyzing the same ~15 issues (ELECTRON-6X, ELECTRON-A7, etc.) before finding new work. 7 sessions × 15 issues = ~100 redundant Sentry API calls and triage cycles. The skip-list eliminates this overhead.
Changes
.claude/skills/fix-sentry/SKILL.md.claude/skills/fix-sentry/references/triage-rules.mdTest plan
/fix-sentry limit=1— verify skip-list.json is created after session/fix-sentry limit=1— verify cached issues are skipped immediately/fix-sentry) ignores skip-list