Skip to content

feat: progressive_drift_fraction as a per-request InsightsOptions knob - #68

Merged
rslayer merged 1 commit into
masterfrom
cockpit/progressive-drift-option
Jul 22, 2026
Merged

feat: progressive_drift_fraction as a per-request InsightsOptions knob#68
rslayer merged 1 commit into
masterfrom
cockpit/progressive-drift-option

Conversation

@rslayer

@rslayer rslayer commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Exposes the walk-vs-dwell sensitivity (ADR 0014) as InsightsOptions.progressive_drift_fraction (default 0.5, gt=0 le=10), threaded through detect_stops_is_progressive_translation. Lower rejects movement more aggressively; a large value effectively disables the filter. Backward-compatible (same default). Verified: default rejects a slow walk (0 stops), 10.0 keeps its chunks (2), dwell still 1, out-of-range → 422. Adversary suite 63 passed.

…ons knob

The walk-vs-dwell sensitivity (ADR 0014) was a module constant
(_PROGRESSIVE_DRIFT_FRACTION=0.5). Expose it as InsightsOptions.
progressive_drift_fraction (default 0.5, gt=0 le=10) and thread it through
detect_stops -> _is_progressive_translation. A cluster is movement when its
half-to-half centroid drift exceeds fraction*stop_radius_m; lower rejects more
aggressively, a large value effectively disables the filter. Backward-compatible
(same default); direct detect_stops callers keep the module-constant default.

Verified: default (0.5) rejects a slow walk (0 stops); 10.0 keeps its chunks
(2 stops); dwell still 1 stop; out-of-range values are a clean 422.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rslayer
rslayer merged commit 71b2463 into master Jul 22, 2026
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