增量扫描与状态合并
Incremental Scan & State Merge
跨会话增量扫描,智能合并新旧 findings 并追踪质量趋势
子问题
1.Finding upsert with first_seen/last_seen tracking
2.Auto-resolve disappeared findings
3.Suspect detector detection for anomaly alerting
4.Mechanical-to-subjective staleness propagation
5.Chronic reopener detection for findings with reopen_count >= 2
6.Ignore pattern suppression with glob/ID-prefix/file-path triple matching
7.Scan completeness tracking per language (full vs fast mode)
各项目的解法1 solutions
Signals
横向对比
| 维度 | Desloppify |
|---|---|
| 合并策略 | 7 阶段管线:metadata→inputs→upsert→suspect→resolve→stale→history |
| 异常检测 | find_suspect_detectors 三级判定:import-only / 白名单 / 产出阈值≥3 |
| 自动关闭 | auto_resolve_disappeared 带语言/路径/排除/suspect 四重过滤 |
| 联动机制 | 12 检测器→6 维度静态映射表驱动 mechanical→subjective 过期标记 |
| 历史追踪 | scan_history 20 条上限,含 4 种分数 + 完整性 + 置信度快照 |
| 持久化策略 | JSON 文件 + shutil.copy2 备份 + 损坏自动恢复 |
| 抑制机制 | glob/ID前缀/文件路径三模式 ignore + suppressed 标记不影响计数 |
最佳实践
1.Atomic state save with backup for corruption recovery
2.Scan history enables trend analysis and regression detection
3.Suspect detector heuristic: ≥3 previous open + 0 current output = likely not run
4.Only mark existing subjective assessments stale, never create new entries on mechanical change